Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Objective value as stopping condition for solution polishing

    Posted 02/01/20 09:08 PM

    Originally posted by: Michael C


    I'm using the solution polishing heuristic for a particular problem and as you know, it is not effective at proving optimality. But say you know the optimal objective value ahead of time. Is it possible to specify that the solver stops after it reaches a given objective value? Relative and absolute gap aren't a good option here since the upper/lower bound that the solver finds aren't always the same when using the solution polishing heuristic. Please give advice for python, if possible.

     

    Thanks!


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Objective value as stopping condition for solution polishing

    Posted 02/02/20 02:58 AM

    Hi

    you could try cutoff

     

    https://www.ibm.com/support/knowledgecenter/SSSA5P_12.10.0/ilog.odms.cplex.help/CPLEX/Parameters/topics/CutLo.html

     

    parameters.mip.tolerances.lowercutoff and

    parameters.mip.tolerances.uppercutoff

    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Objective value as stopping condition for solution polishing

    Posted 02/04/20 11:44 AM

    The cutoff will probably not achieve what was intended, since it cuts off any solution worse than the cutoff. It will not make CPLEX stop as soon as a solution of certain quality is found.

    Would it be an option to use a callback? In a callback you could easily query the current best known solution and compute your own gap (based on the known optimal value). Then you can abort the search from the callback if the gap is small enough.


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Objective value as stopping condition for solution polishing

    Posted 02/04/20 03:38 PM

    Let's say you are minimizing f(x). Suppose you add a variable z to the model, set z = f(x) in a constraint, and set a lower bound on z equal to your desired stopping value (the known optimum, or possibly something a bit larger). The solver will stop when it hits or approaches that bound, (You will need to set the absolute and relative MIP gaps to zero, or close to zero.) For maximizing, do the same but fix the upper bound of z.

    The bound set on z may affect preprocessing and decision making in the branch and cut algorithm. Depending on your luck, it might speed solution, or it might slow it down.

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: Objective value as stopping condition for solution polishing

    Posted 02/05/20 03:14 PM

    Originally posted by: Michael C


    Paul's advice is working quite well for me. I always thought it was a bad idea to add a constraint like this so it didn't cross my mind to try, so I am happy you suggested it. Thank you all for your input.


    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: Objective value as stopping condition for solution polishing

    Posted 02/05/20 05:47 PM

    Your "bad idea" impression is generally correct. It's a bad idea to add a constraint f(x) ~ b (where ~ is any of >=, =, <=) while optimizing f(x), because having the same linear expression in the objective function and as a constraint causes dual degeneracy. Fortunately, the "cheat" of using a variable as the objective function and setting one of its bounds doesn't seem to cause as much damage (charitably assuming that the presolver doesn't remove it and revert to the previous case). Glad it's working for you.


    #CPLEXOptimizers
    #DecisionOptimization