Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Making a solver restart the search

    Posted 07/29/08 12:07 AM

    Originally posted by: SystemAdmin


    [cosmicsolution said:]

    Hello, I am trying to implement a simple randomized search strategy with restarts.

    This is, if after X amount of time, solver did not find a feasible solution, i would make X = 2*X and restart from scratch the search.

    The following code does not work, it says 'abort' when the member function solve is called for the second time.
    Any ideas?
    Thanks!

    int X = 5;
    solver.setTimeLimit(time_value);
    solFound = solver.solve(goal);
    while (!solFound)
    {
      time_value = 2*time_value;
      solver.setTimeLimit(time_value);
      solver.startNewSearch(goal,IloSynchronizeAndRestart);
      solFound = solver.solve(goal);
    }


    #CPOptimizer
    #DecisionOptimization


  • 2.  Re: Making a solver restart the search

    Posted 07/29/08 03:42 PM

    Originally posted by: SystemAdmin


    [Gwyneth said:]


    I believe you should remove the startNewSearch line and use the following version of IloSolver::solve.

    solve
    public IloBool solve(const IloGoal goal, IloSynchronizeMode mode=IloSynchronizeAndRestart, IloBool restore=IloFalse) const
    This member function solves a problem by using the goal passed as a parameter. By means of the mode parameter, you control how solver synchronizes with the current model. When using the default parameter, IloSynchronizeAndRestart, the instance of IloSolver will end in a state equivalent to a deletion of the instance of IloSolver and a reload of the current model. Use the parameter IloSynchronizeAndContinue only if all changes since the last synchronization are monotonic. In this case, the instance of IloSolver will apply all the changes from the current state and continue from there. The parameter restore indicates whether or not at the end of the search the invoking solver should restore the state that it was in prior to the search. This restoration of a state influences only the search, not the synchronization with a model. This member function is used only at the top level of the search.


    #CPOptimizer
    #DecisionOptimization