Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only

error with updating objective function

  • 1.  error with updating objective function

    Posted 08/26/09 06:52 PM

    Originally posted by: SystemAdmin


    [billdoors said:]

    I need to call cplex.solve() several times to solve models with same constraints and different objective function.
    ie,

    IloModel model(env);
    model.add(constraints);

    for(i = 0; i<10;i++)<br />{
    IloObjective obj;
    IloMinimize(env,expr);   //where expr here is IloExpr and updated at each loop
    model.add(obj);
    IloCplex cplex;
    cplex.extract(model);
    cplex.solve();

    expr.end();
    obj.end();
    cplex.end();

    }



    But after only 2 or 3 times or the loop, error was thrown "out of memory". I destruct cplex each time at the end of the loop.

    also each time, there is message like "mip start values provide initial solution with objective *". But according to my understanding, cplex is destruct at the end of the loop, why there is a "provide initial solution"

    thank you so much for answering my questions.

    below is the screen print


    Presolve has eliminated 50 rows and 0 columns...
    Presolve has improved bounds 117649 times...
    Tried aggregator 1 time.
    MIP Presolve eliminated 50 rows and 0 columns.
    MIP Presolve modified 352947 coefficients.
    Reduced MIP has 701093 rows, 237797 columns, and 1637531 nonzeros.
    Presolve time =   14.88 sec.
    Clique table members: 232897.
    MIP emphasis: balance optimality and feasibility.
    Root relaxation solution time =    2.02 sec.


    MIP start values provide initial solution with objective 0.0000.
    Presolve has eliminated 50 rows and 1 columns...
    Presolve has improved bounds 117649 times...
    Tried aggregator 1 time.
    MIP Presolve eliminated 50 rows and 1 columns.
    MIP Presolve modified 352947 coefficients.
    Reduced MIP has 701093 rows, 237797 columns, and 1637531 nonzeros.
    Presolve time =   14.69 sec.
    Clique table members: 232897.
    MIP emphasis: balance optimality and feasibility.
    Root relaxation solution time =   15.10 sec.
    t_k = 92.5228
    this is the objective value 0

    MIP start values provide initial solution with objective 9067.2310.
    Presolve has eliminated 50 rows and 1 columns...
    Presolve has improved bounds 117649 times...
    Tried aggregator 1 time.
    MIP Presolve eliminated 50 rows and 1 columns.
    MIP Presolve modified 352947 coefficients.
    Reduced MIP has 701093 rows, 237797 columns, and 1637531 nonzeros.
    Presolve time =   14.37 sec.
    Clique table members: 232897.
    MIP emphasis: balance optimality and feasibility.
    Root relaxation solution time =   40.16 sec.
    t_k = 20.3099
    this is the objective value -36268.9

    [b]MIP start values provide initial solution with objective 5528.7994.[/b]
    Presolve has eliminated 50 rows and 1 columns...
    Presolve has improved bounds 117649 times...
    Tried aggregator 1 time.
    MIP Presolve eliminated 50 rows and 1 columns.
    MIP Presolve modified 352947 coefficients.
    Reduced MIP has 701093 rows, 237797 columns, and 1637531 nonzeros.
    Presolve time =   16.27 sec.
    Clique table members: 232897.
    MIP emphasis: balance optimality and feasibility.
    Root relaxation solution time =   21.29 sec.
    t_k = 16.9108
    this is the objective value -784.82

    [b]MIP start values provide initial solution with objective 7726.3818.[/b]
    Presolve has eliminated 50 rows and 1 columns...
    Presolve has improved bounds 117649 times...
    Tried aggregator 1 time.
    MIP Presolve eliminated 50 rows and 1 columns.
    MIP Presolve modified 352947 coefficients.
    Reduced MIP has 701093 rows, 237797 columns, and 1637531 nonzeros.
    Presolve time =   14.74 sec.
    Clique table members: 232897.
    MIP emphasis: balance optimality and feasibility.
    Root relaxation solution time =   62.57 sec.

           Nodes                                         Cuts/
      Node  Left     Objective  IInf  Best Integer     Best Node    ItCnt     Gap
          Variable B Parent  Depth

         0     0    -6087.4621   528     7726.3818    -6087.4621   121382  178.79%
        0+    0                   0    -4494.8512    -6087.4621   121382   35.43%
                    -6081.6960   371    -4494.8512   Fract:  200   121430   35.30%
                    -6078.9265   195    -4494.8512   Fract:  200   121460   35.24%
    *     0+    0                   0    -5538.4781    -6078.9265   121460    9.76%
    *     0+    0                   0    -6028.5906    -6078.9265   121460    0.83%
    *     0+    0                   0    -6045.1287    -6078.9265   121460    0.56%
    *     0+    0                   0    -6062.1142    -6078.9265   121460    0.28%
    *     0+    0                   0    -6064.0445    -6078.9265   121460    0.25%

    Gomory fractional cuts applied:  9
    Concert exception caught: CPLEX Error  1001: Out of memory.


    #CPLEXOptimizers
    #DecisionOptimization