Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Using the “warm start” functionality

    Posted 09/17/08 05:46 AM

    Originally posted by: SystemAdmin


    [agus said:]

    Hi,

    I have problem in using the warm start functionality in OPL. Right now I am using OPL 6.0.

    I have looked the example warmstart.mod, but it is still not clear to me how to feed the initial solution to CPLEX. Could someone help me with this?
    A small example will be very helpful.

    And also will this warm start feature reduce the computational time?

    Thanks a lot

    Agus

    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Using the “warm start” functionality

    Posted 09/17/08 01:05 PM

    Originally posted by: SystemAdmin


    [alain.chabrier said:]

    Hi,

    let's look at the warmstart example :

    You have some variables to which you want to provide some initial values :
    dvar int+ x[r];
    Which initial values will be stored in :
    float values[i in r

    For this, before you call solve() on cplex, you have to:
    1. create a vector container
      var vectors = new IloOplCplexVectors();
    2. add into it all the combinations variables/values that you want to pass to the engine (does not need to be for all variables) :
    vectors.attach(opl2.x,opl2.values);
    3. attach the vector to the cplex instance that will use it :
    vectors.setVectors(cplex);
    4. run CPLEX serach :
    cplex.solve(); 

    In the CPELX log you can see the provided solutions is used :
    1 of 1 MIP starts provided solutions.
    MIP start 'm1' defined initial solution with objective 65.0000.

    In the didactical example, the improvement of performance is obviously not visible, both version (with and without start values) go too fast), but in general providing an initial starting point to CPLEX will help the search.

    Hope this helps,

    Alain

    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: Using the “warm start” functionality

    Posted 09/18/08 05:23 AM

    Originally posted by: SystemAdmin


    [agus said:]

    Hi Alain,
    Thanks for the tip. I have successfully used the warm start feature. But I can’t see the result in the solution browser after it finished.
    This is how I coded the warm start:

    main{
      thisOplModel.generate(); 
      var def = thisOplModel.modelDefinition;   
      var opl2 = new IloOplModel(def, cplex);
      opl2.generate();
      var vectors = new IloOplCplexVectors();
      vectors.attach(opl2.x1,opl2.initx1);
      vectors.attach(opl2.x2,opl2.initx2);
      vectors.attach(opl2.t,opl2.initt);
      vectors.attach(opl2.x,opl2.initx);
      vectors.attach(opl2.y,opl2.inity);
      vectors.setVectors(cplex);
      cplex.solve();
    }


    I put this part at the end of the model, after all the constraints.
    Do I have to put any command to see the solution it generates?
    Thanks
    Agus

    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: Using the “warm start” functionality

    Posted 09/18/08 07:36 PM

    Originally posted by: SystemAdmin


    [alain.chabrier said:]

    Hello,

    unfortunately, I guess yuo have a bad combination of 2 existing limitations :
    - models with a main script do not have problem browser
    - IloOplCplexVectors is only available in such main scripts


    I have no good solution in mind.

    Alain
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 5.  Re: Using the “warm start” functionality

    Posted 09/18/08 10:27 PM

    Originally posted by: SystemAdmin


    [agus said:]

    Hi Alain,

    thanks for your response.

    So, there is no way you can get the solution once you use the warm start functionality?
    that seems kind of strange.
    I don't need to see the solution is the problem browser. I just need to see the solution in any format once I finished running my model with warm start functionality.

    I hope there is a way to get the solution, otherwise the warm start functionality will be useless.

    Thanks

    Agus
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 6.  Re: Using the “warm start” functionality

    Posted 09/19/08 12:46 AM

    Originally posted by: SystemAdmin


    [alain.chabrier said:]

    Hi,
    there is no way to get it in the problem browser, but you can get it in the solution tab.
    You can also use any scrtip post processing to write it in the console, and also have exportations to DB/Excel be done using .dat and post-processing.

    What is not supported in this case is the problem browser.
    Alain
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 7.  Re: Using the “warm start” functionality

    Posted 02/16/09 10:53 PM

    Originally posted by: SystemAdmin


    [rub said:]

    Hi,

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

    Thanks!

    RUB
    #DecisionOptimization
    #OPLusingCPLEXOptimizer