Originally posted by: SystemAdmin
[rajtvm said:]
I have a 3-D decision variable in my model, and the variable declaration and model building works fine. I can see that CPLEX is also doing the job, by running cplex.solve() and looking at the objective function value.
Now I am trying to extract the solution for the 3-D decision variable into another 3-D variable, and the code is giving an error. I also know that the definition of the new 3-D variable is working, since I am able to print the empty arrays with all 0s. This is what I have coded to get the values -
for (i=0; i < iMax; i++) <br /> for (j=0; j < jMax; j++)<br /> for (k=0; k < kMax; k++)<br /> solutionDelta[i][j][k] = cplex.getValue(delta[i][j][k]);
When I run the code, I am getting this error -
Error: IloExtractable 3 IloNumVarI has not been extracted by IloAlgorithm 0x88e96e8
Anyone know whats going wrong with seemingly simple code? Thanks!
Raj
#DecisionOptimization#MathematicalProgramming-General