Decision Optimization

  • 1.  Retrieving the solution atcertain time during the execution

    Posted 15 days ago
    Hello everyone,
    I coded my MIP model on c++ and calling the cplex to solve it. I need to test by limiting compuation time and see the results. In the very beginning step, we thought to check bestObjectiveValue (Best LB) and best UB at the end of 60s,300s. Instead of running the instances for 60s and 300s , I want to set the computation time to 300s and retrieve the Best LB and UB values found at 60s. Is it possible ? How can I do that ? ( The execution will nnot stop at 60s , it will go on non stop (if there is no optimal solution until that time)  until 300s)
    Thank you so much

    ------------------------------
    milena kafka
    ------------------------------


  • 2.  RE: Retrieving the solution atcertain time during the execution

    Posted 15 days ago
    Call solve() with a time limit of 60s, retrieve the bounds, then call solve() again with a time limit of 240s. As long as you leave the advanced start switch (IloCplex::Param::Advance) at its default setting of 1, change only parameters (time limit in this case) and do not change the model, the second call to solve() will resume working with the partially completed search tree from the first call.

    ------------------------------
    Paul Rubin
    Professor Emeritus
    Michigan State University
    ------------------------------



  • 3.  RE: Retrieving the solution atcertain time during the execution

    Posted 9 days ago
    Thank you so much Prof.Rubin, 
    Then , following your proposition, I can retrieve the first Relaxed solution as follows: 
    cplex.nodelimit=1
    cplex. cplex.getBestObjValue()

    Would not it be correct ? Thank you so much

    ------------------------------
    milena kafka
    ------------------------------



  • 4.  RE: Retrieving the solution atcertain time during the execution

    Posted 9 days ago
    That should get you the objective value of the LP relaxation at the root node (after CPLEX has added any cuts it is going to add to the root).

    ------------------------------
    Paul Rubin
    Professor Emeritus
    Michigan State University
    ------------------------------