Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

Restarting MIP optimization from new root without presolve

  • 1.  Restarting MIP optimization from new root without presolve

    Posted Tue June 30, 2015 06:17 PM

    Originally posted by: gtoptimizer


    My setting is the following under 12.6.1:

    1. I run CPXmipopt (with CPX_PARAM_ADVIND set to default 1)
    2. Before the optimization completes, I terminate it (using CPXsetterminate)
    3. I set CPX_PARAM_ADVIND to 2
    4. I set CPX_PARAM_REDUCE to CPX_PREREDUCE_NOPRIMALORDUAL
    5. I re-run CPXmipopt

    My understanding is that setting CPX_PARAM_ADVIND to 2 and calling CPXmipopt again should start a search from a new root. However, I have noticed that if I do step 4, calling CPXmipopt resumes the optimization from where it was interrupted in step 2. If I omit step 4, then step 5 runs as expected from a new root.

    Looking back at the documentation for advanced start switch, I noticed that "Setting 2 retains the current incumbent (if there is one), re-applies presolve, and starts a new search from a new root."

    Is that the reason behind my observations?

    Also, how can I get the desired behavior, namely, restarting from a new root without any presolve reductions?

    Thanks!

     

    EDIT: More specifically, I need to restart 1) from a new root, and 2) without eliminating any variables


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Restarting MIP optimization from new root without presolve

    Posted Thu July 02, 2015 11:23 PM

    Originally posted by: EdKlotz


    >>>>>>>>>>>>>>>>>>>>>>>>>>

    1. I set CPX_PARAM_ADVIND to 2
    2. I set CPX_PARAM_REDUCE to CPX_PREREDUCE_NOPRIMALORDUAL

    >>>>>>>>>>>>>>>>>>>>>>>>>>>>

    These settings are somewhat contradictory.   A nonzero value for ADVIND instructs CPLEX  to continue from where it left off.  Changing presolve reductions only makes sense when starting from scratch, but that would contradict the setting of ADVIND = 2.  So, CPLEX chose to continue the optimization from where it left off when you make your second call to CPXmipopt.   I think this is reasonable behavior.

     

    Also, setting ADVIND = 2 is primarily intended for continuous models, where dual variables are available, and presolve reductions are simpler (i.e. you don't have MIP reductions like coefficient reduction that actually tighten the MIP model).

     

     

    >>>>>>>>>>>>>>>>>>>>>>

    Also, how can I get the desired behavior, namely, restarting from a new root without any presolve reductions?

    >>>>>>>>>>>>>>>>>>>>>>

    1.  Run CPXmipopt, stopping by whatever means you wish.

    2.  Query the primal solution values

    3.  Do something to reload the model into CPLEX, so that the current tree and optimization info will be discarded.   Possibilities include adding a dummy constraint and then deleting it.  

    4.  Set ADVIND to 1 if it currently resides at some other value

    5.  Turn off all presolve reductions as you did above.

    6.  Provide the solution from the first optimization queried in step 2 via CPXaddmipstarts.

    7.  Call CPXmipopt again.  

     

    That should do the job.   Note that steps 2 and  6 are optional if you do the simple row addition and deletion, as CPLEX will keep around the solutions in the solution pool if you just make a problem modification.   But, if you truly reload the whole problem, you need save and reload the solution as well.

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Restarting MIP optimization from new root without presolve

    Posted Sat July 11, 2015 11:42 AM

    Originally posted by: gtoptimizer


    Thanks Ed.

    I ended up doing something slightly different, since what you suggest restarts the optimization on the MIP that is not presolved (in step 1).

    I retrieve the MIP in a callback before stopping in step 1, and then re-optimize that with the steps you suggested.


    #CPLEXOptimizers
    #DecisionOptimization