Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  IloExtractable error!

    Posted 10/27/11 10:03 PM

    Originally posted by: JDalal


    Hi all,

    I am facing a strange problem! I am not sure, it may be something trivial that I am missing. Any help is appreciated.

    I have a MIP model, where x[i][j] are continuous and y[j] are binary variables. I am solving the model iteratively. In each iteration, I am trying to fix some x[i][j] and some y[j] values, like :

    ilo_model.add(x[i][j] == 0.52);
    ilo_model.add(y[j] == 1);

    this is done within some for loop with i,j index in usual way.

    Now, when I am solving the model with above fixed values and using
    IloNum x_ij = cplex.getValue(x[i][j]);

    I am getting following error :
    "ERROR: The referenced IloExtractable has not been extracted by the IloAlgorithm".

    I have checked that if I fix some x[i]http://j], the error occurs exactly for that index. I mean if I fix say, x{2[3] = 0.9 then the error comes when I want to use cplex.getValue(x[2][3])! What is the reason??
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: IloExtractable error!

    Posted 10/28/11 12:34 AM

    Originally posted by: SystemAdmin


    This exception usually occurs when the respective variable is not contained in any constraint or the objective of the model. Does variable x[2][3] appear in any constraint that is in the model or in the model's objective? If not, then you need to add it explicitly. Try one of
    model.add(x[2][3]);
    model.add(x[2][3] >= x[2][3].getLB());
    

    before extracting the model to IloCplex.
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: IloExtractable error!

    Posted 10/28/11 09:15 AM

    Originally posted by: JDalal


    Yes, the variable is present in several constraints and objective function. I have tried your suggestion too, but still getting same error. Any other possibility?
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: IloExtractable error!

    Posted 10/28/11 11:38 AM

    Originally posted by: JDalal


    Thanks, it has worked.
    #CPLEXOptimizers
    #DecisionOptimization