Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Extracting solution information from a 3-dimensional decision variable

    Posted 07/02/09 10:39 PM

    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


  • 2.  Re: Extracting solution information from a 3-dimensional decision variable

    Posted 07/02/09 10:44 PM

    Originally posted by: SystemAdmin


    [rajtvm said:]

    Note that the i subscript is missing in the pasted code above, but it is present in the actual code. The i vanishes when I post here!!
    #DecisionOptimization
    #MathematicalProgramming-General


  • 3.  Re: Extracting solution information from a 3-dimensional decision variable

    Posted 07/03/09 12:14 PM

    Originally posted by: SystemAdmin


    [alain.chabrier said:]

    Hi,

    it seems one of the variable you try to get value for (using cplex.getValue) is not used in the model (at least never get extracted by the engine).
    it means any value for this variable is possible.

    I think there is a "cplex.isExtracted()" method to know if a variable has been extracted.


    Alain

    #DecisionOptimization
    #MathematicalProgramming-General


  • 4.  Re: Extracting solution information from a 3-dimensional decision variable

    Posted 07/03/09 07:54 PM

    Originally posted by: SystemAdmin


    [prubin said:]

    [quote author=rajtvm link=topic=1244.msg3516#msg3516 date=1246556619]
    Note that the i subscript is missing in the pasted code above, but it is present in the actual code. The i vanishes when I post here!!


    The forum software interprets left bracket - i - right bracket as the start of italics.  I understand why, but in this particular forum it's extremely annoying.  We need some sort of notice to all forum users to use ii rather than i as a subscript, or some other workaround.
    #DecisionOptimization
    #MathematicalProgramming-General