Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  limit time to find a new solution

    Posted 03/01/16 03:28 AM

    Originally posted by: Zele


    Hi all,

    I'm solving a MIP problem.  Looking at the log file, in a point, cplex is trying, during a long time, to find a better solution. My question is: Is there any function that limit the time that cplex tries to find a better integer solution for the problem?For example, if in half and hour cplex doesn't find a better solution than it has, stop. (I know how to limit the total time but I am not looking for it). I am using callable library with c++.

     

    Thanks in advance.

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: limit time to find a new solution

    Posted 03/01/16 03:36 AM

    I am not exactly clear what you mean. Do you mean

    • If the incumbent solution did not improve for half an hour then CPLEX should stop, or
    • At any given point in the search tree, CPLEX should not spent more than half an hour on a single heuristic

    ?

    Also, where/how in the log did you observe that CPLEX was spending a lot of time in a heuristic? Did you see 'heuristic still running' messages or did you conclude that from something else?


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: limit time to find a new solution

    Posted 03/01/16 03:47 AM

    Originally posted by: Zele


    Hi Daniel,

    I attach a small example for that I am saying.

    Actually, when 1 hour is reached, Cplex stops. But, for example, during long time, you have as "best integer" value 15218,38.

    For me, is important not being a lot time although solution is not the optimal one. I am trying to reduce this time and I think that if cplex doesn't improve that incumbent solution then Cplex should stop. (really I don't known if the second option you write in your previous post is better than I am trying).

    Thanks

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: limit time to find a new solution

    Posted 03/01/16 05:07 AM

    OK, now I understand.

    What you have in mind is usually implemented using an info callback. In this callback you query the current incumbent objective via CPXgetcallbackinfo. Then you record this and the time at which you observed it. Whenever you observe that the incumbent objective value did not change for a long time then you abort the optimization from the callback.

    You may want to look at the mipex4 example shipped with CPLEX. This implements something very similar.


    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: limit time to find a new solution

    Posted 03/01/16 06:53 AM

    Originally posted by: Zele


    Thanks, Daniel.

    I will try this.


    #CPLEXOptimizers
    #DecisionOptimization