Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
Expand all | Collapse all

Printing the time and objective function value of each integer feasible solution

  • 1.  Printing the time and objective function value of each integer feasible solution

    Posted 05/11/14 10:40 PM

    Originally posted by: oozaltin


    Hello,

    I am trying to print the objective function value and the time for each integer feasible solution recovered during the optimization of an MIP.

    I figured out that the easiest way would be doing this in the incumbent callback. However, setting incumbent callback disables the dynamic search, and I would like to have dynamic search because it is in the default settings of CPLEX.

    Another way I tried is setting the CPX_PARAM_INTSOLLIM parameter to 1 and re-optimizing the problem until it finds the optimal solution. This way, I can print the time and objective function of every solution to a file before resuming the optimization. However, this approach caused a significant performance decay in CPLEX, probably because stopping and resuming the optimization over and over after each feasible solution. 

    So, I am looking for a way to print the objective function value and the time for each integer feasible solution recovered during the optimization of an MIP WITHOUT  changing the default behavior of CPLEX. By default behavior, I mean the way CPLEX mipopt would work without making any changes to the optimization strategy.

    Thanks

    Osman


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Printing the time and objective function value of each integer feasible solution

    Posted 05/12/14 01:34 AM

    Setting CPX_PARAM_INTSOLFILEPREFIX will make CPLEX write each incumbent found to a file. The file does not contain the solution time but you can easily get the time the solution was found by checking the file's creation/modification time.

    Another option would be to use the info callback (CPXXsetinfocallbackfunc). The info callback does not disable dynamic search but is not invoked for each incumbent. It is invoked frequently during optimization, so this may still me enough.

    Finally, this question has been asked many times before on this Forum. You may want to search for it and figure out what other people did.


    #CPLEXOptimizers
    #DecisionOptimization