Originally posted by: EdKlotz
>>>>>>>>>>>>>>>>>>>>>>>>>>
-
I set CPX_PARAM_ADVIND to 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