Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  using getValue method to obtain variable values at optimality

    Posted 11/28/11 12:21 PM

    Originally posted by: SystemAdmin


    Using OPL script, I generate 100 problems and solve them. After each solve, I need to get some of the decision variable values at optimality. I use the following code:

    if (g_cplex.solve()) {
    for (i=1; i<= N_Local; i++){
    for (l=1; l<= T_local; l++){
    xval= g_cplex.getValue(X[i][l]);

    }
    }
    }
    and get the following error:

    scripting runtime error: unknown property 'getValue'

    What is wrong with my use of getValue? I am using IBM ILOG Optimization Studio (cplex 12.2) as a side note.

    Thank you.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: using getValue method to obtain variable values at optimality

    Posted 11/28/11 12:41 PM

    Originally posted by: SystemAdmin


    I solved the problem. This question no longer needs an answer.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer