Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
Expand all | Collapse all

Post processing when using warm start in OPL 5.5

  • 1.  Post processing when using warm start in OPL 5.5

    Posted 02/16/09 10:55 PM

    Originally posted by: SystemAdmin


    [rub said:]

    Hi,

    I had a question regarding post processing solutions when using warm start. I have an OPL5.5 code which has both pre-processing (warm start) and post-processing (solution outputting to text files) scripts. Even though the post-processing script works fine without warm start, I can't get the solution transferred to text files when the warm start script is activated. Can anyone suggest a solution to this?

    Thanks!

    RUB
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Post processing when using warm start in OPL 5.5

    Posted 02/18/09 09:25 PM

    Originally posted by: SystemAdmin


    [Can_T_OM said:]

    Hi Rub,

    I have already used warm start technique in different situations where output script transfers the solution into a text file. All you have to do is to write a simple statement in a Cplex1.solve() loop where Cplex1 is the problem that you want to solve.
    The statement is:
    Cplex.solve()
    {
    opl1.postProcess();
    }

    More precisely,
    writeln("the second optimization phase is starting with an initial solution of opl0 of problem0");
     
     
        var Source1 = new IloOplModelSource("problem1.mod");
        var Def1 = new IloOplModelDefinition(Source1);
       
        var Cplex1 = new IloCplex();
        var opl1 = new IloOplModel(Def1, Cplex1);
        var Data1 = new IloOplDataSource("problem1.dat");
     
        opl1.addDataSource(Data1);
    // You can customize your optimization, e.g.  Cplex1.MemoryEmphasis = 1;
        opl1.generate();
       
        // Make sure to attach the current solution value (all variables) as a solution starting point

    Cplex1.solve()
    {
    opl1.postProcess();
    }

    I hope this helps.

    #DecisionOptimization
    #OPLusingCPLEXOptimizer