Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  what are the extractables

    Posted 01/15/13 10:13 AM

    Originally posted by: beckywang


    I sometime get error such as IloExtractable is not extractable... before I call getValue(myvar) (concert).

    my question is if myvar is used in objective function but not in constraints, is myvar extractable?
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: what are the extractables

    Posted 01/15/13 03:15 PM

    Originally posted by: beckywang


    I also want to compare the cost of between using isExtractable() and adding IloExtractableArray to the model. Is adding IloExtractableArray to the model making optimization problem harder? or Calling isExtractable() more expansive?
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: what are the extractables

    Posted 01/16/13 02:34 AM

    Originally posted by: SystemAdmin


    When you say "isExtractable()" do you mean "IloCplex::isExtracted()"?
    Adding a variable to a model and not using that variable in the objective or any constraint will not make the optimization problem harder. The solver engine will notice that the variable is not used and get rid of that variable before it starts solving.
    If I had to make a choice I would prefer add() over isExtracted() since this keeps the code cleaner. Or just prepare for the NotExtractedException:
    try { value = cplex.getValue(var); }
    catch (IloAlgorithm::NotExtractedException& e) {
      // Variable var was not extracted. Depending on whether this is
      // expected or not either set value to a default value or error out.
    }
    

    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: what are the extractables

    Posted 01/15/13 05:54 PM

    Originally posted by: SystemAdmin


    > beckywang wrote:
    > I sometime get error such as IloExtractable is not extractable... before I call getValue(myvar) (concert).
    >
    > my question is if myvar is used in objective function but not in constraints, is myvar extractable?

    When you say "extractable" do you mean "extracted"? If myvar is used in the objective function but not in constraints, it will be extracted when you create the instance of IloCplex from your IloModel (C++ API).

    Paul

    Mathematicians are like Frenchmen: whenever you say something to them, they translate it into their own language, and at once it is something entirely different. (Goethe)
    #CPLEXOptimizers
    #DecisionOptimization