Decision Optimization

Decision Optimization

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


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

Starting CP Optimizer from an existing solution

  • 1.  Starting CP Optimizer from an existing solution

    Posted 09/08/15 01:02 PM

    Originally posted by: AdamGregory


    Hi everyone,

    How can you start the CP optimizer from an existing feasible solution?
    I am working on a 2 stage optimization solution to a particular scheduling problem. After the first stage optimization problem completes, I attempt to solve a second stage using the results of the first stage as the starting solution, but it does not appear to be working correctly.
    I have added an array of alternative interval variables to the solution and all other decision variables should be able to be determined based on the presence and absence of these intervals.

    However, the solver seems to be ignoring the provided starting points. When I set the number of workers and logging to 1 I notice that the solver does not find an initial feasible solution for several hundred iterations whereas the provided starting point should be feasible.


    What steps am I missing in order to start my cp optimizer from my provided solution?
    using Java CP API
     


    #CPOptimizer
    #DecisionOptimization


  • 2.  Re: Starting CP Optimizer from an existing solution

    Posted 09/11/15 04:09 AM

    Originally posted by: Petr Vilím


    Hello,

    maybe you can diagnose the problem using function IloCP.restore(IloSolution). From the documentation of this function:

    This member function uses the invoking CP optimizer object to instantiate the variables in solution with their saved values. The value of any objective added to the solution is not restored. If the solution does not violate any constraints of the model extracted by the invoking CP optimizer, then true is returned and the state of the constraint variables in the CP optimizer reflect those stored in solution. Otherwise the optimizer's state remains unchanged and false is returned.

    So if the function returns false then there is some violated constraint in the model. And therefore the solution doesn't help as starting point.

    And if the function returns true then you can check whether all variables are fixed after the restoration. If they are not then, when the solution is used as starting point, CP Optimizer isn't probably able to find values for the remaining unfixed variables in reasonable time.

    Best regards, Petr


    #CPOptimizer
    #DecisionOptimization