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