Originally posted by: SystemAdmin
[UDOPS said:]
Update: well, I have some partial answers
I found how to make .getObjValue() and .getCplexStatus() work. I have to define the data objects outside the execute statement, and then assign values to the objects within the execute statement, and finally the "ProblemSolution" object is then accessible to the odbc call in my .dat file.
I am still looking for an accurate reference to these "methods". For example, .getVersion() does not appear to work in OPL. Where can I find a key to the meaning of the Cplex status codes?
tuple solverresult {int solve_code; float obj_value; int problem_id;}
float currObj; int currResult;
{solverresult} ProblemSolution={<currResult, currObj, p> | p in {Problem[1].problem_id}}; //problem_id is defined earlier in the model
execute {
currObj=cplex.getObjValue();
currResult=cplex.getCplexStatus();
} //end of execute
#DecisionOptimization#OPLusingCPLEXOptimizer