Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Repeating 'n' times an optimization model.

    Posted 08/03/12 11:50 AM

    Originally posted by: AsimAkhtar


    Dear All,

    I want to repeat the following optimization problem 800 times. As you may see that in the SUBJECT TO caption I had added the decision varaibles to equal to an array, this array is basically resulted by means of pre optimization calculations. Now I wish to have the optimized result for each of the 800 values of that array. I will then copy the resulted 800 values to an spread sheet for further analysis. Kindly guide me.

    The code is as follows:
    dvar float+ Pg1;
    dvar float+ Pg2;

    minimize
    *((0.01/2)*Pg1^2 + 1.25*Pg1 +100)*
    *+((0.0125/2)*Pg2^2 + Pg2 + 125);*

    subject to {

    forall(g in 1..720)
    Pg1 + Pg2 == Inter_2[g];

    20<=Pg1<=280;
    0.01<=Pg2<=280;
    }
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Repeating 'n' times an optimization model.

    Posted 08/23/12 08:23 AM

    Originally posted by: SystemAdmin


    If you have a model that you want to run with the same data, except some elements, you should look at:
    • custock to know how to create an OplModel with partial data and init the missing data. (The 800 models will be run 1 after the other).
    or
    • in Java examples: ConcurrentProcessing which is an examples that run N instances of a model in parralel with some different data for few elements.

    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: Repeating 'n' times an optimization model.

    Posted 09/12/12 05:09 PM

    Originally posted by: KingCC


    How about the performance? It seems that in the cutstock example for each of the 800 optimizations, CPLEX needs to load the same model and data again and again. This loading costs significant time over 800 times. Can the re-loading be avoided?

    Thanks.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: Repeating 'n' times an optimization model.

    Posted 08/27/12 09:49 PM

    Originally posted by: SystemAdmin


    Are you using OPL?If so, read the cutstock model.

    If you want to access the objective value,use IloCplex::getObjValue(),to obtain the solution,use IloOpl::dvar.solutionValue,dvar is the decision variable name specified by you.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer