Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Pooling Solutions after Decomposition for Readout with setParam()

    Posted 06/11/13 02:29 AM

    Originally posted by: Ketov


    Dear colleagues,

    I am using Concert C++ API and after a decomposition a an optimization problem I have solved several subproblems als cplex instances. I would now like to write a function which will put these solutions into one single IloCplex Instance in order to use the existing readout. I tried to do this through the setVectors functionality in the cplex instances (there without the decomposition)

            //Put all IloNumVar Instanzes into ArrayDecisionvariables and values into ArrayValues

            /* */

            cplex_master.setVectors(ArrayValues, 0, ArrayDecisionvariables, 0, 0, 0);
            cplex_master.setParam(IloCplex::TreLim ,0);
            cplex_master.setParam(IloCplex::TiLim, 0);
            cplex_master.solve();

    I do not want to execute the optimization, but without the cplex instance cannot be used for a readout with IloCplex::getValue(). Is there any better way to do this? This approch leads to errors because obviously cplex cannot find the solution.

    Thank you very much!

    Ketov


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Pooling Solutions after Decomposition for Readout with setParam()

    Posted 06/11/13 03:05 AM

    The easiest way to get the solution is to fix the variables to the values in the solution and then call solve:

    for (IloInt i = 0; i < ArrayValues.getSize(); ++i)
       ArrayDecisionvariables[i].setBounds(ArrayValues[i], ArrayValues[i]);
    cplex_master.solve();

    This should produce the solution you expect. If not all integer variables are fixed by the above loop then maybe consider IloCplex::IntSolLim=1 to stop at the first feasible solution.


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Pooling Solutions after Decomposition for Readout with setParam()

    Posted 06/11/13 03:08 AM

    Originally posted by: Ketov


    Great, thank you Daniel!


    #CPLEXOptimizers
    #DecisionOptimization