Originally posted by: Mintch Zulitch
HI,
I'm trying to run the following piece of code, but I can't get the solution values for the decision variables:
dvar float+ x1;
dvar float+ x2;
maximize x1 + x2;
subject to {
-5*x1 + 4*x2 <=0;
5*x1 + 2*x2 <= 15;
}
main{
thisOplModel.generate;
if(cplex.solve()){
writeln("x1: ", thisOplModel.x1);
writeln("x2: ", thisOplModel.x2);
}
}
I run the file but, "scripting log" gives this:
x1: [a IloNumVar]
x2: [a IloNumVar]
#DecisionOptimization#OPLusingCPLEXOptimizer