Question: How to extract specific decision variable solutions from a solution set using LPSolve?

I was curious to know if one can extract a specific solution from a LPSolve routine. 

As an example, consider the following output to a constrained linear problem. The objective value is 8 and the decision variable values (binary) are given.

Sol := [8, [w[1, 1] = 1., x[0, 0, 1] = 0, x[0, 1, 1] = 1, x[0, 2, 1] = 0, x[1, 0, 1] = 0, x[1, 1, 1] = 0, x[1, 2, 1] = 1, x[2, 0, 1] = 0, x[2, 1, 1] = 0, x[2, 2, 1] = 0, y[0, 0] = 0., y[0, 1] = 0., y[1, 1] = 2.]]

I am interested to know if we can isolate any variable value from this solution. I know that Sol[1] will return 8, and Sol[2] will return the remaining terms. But what if I wanted, say, x[1,2,1] alone?

Thanks for reading!

Please Wait...