FRAMES NO FRAMES

Enumeration IloSynchronizeMode

Definition file: ilsolver/basic.h
Include file: <ilsolver/ilosolver.h>

The values in this enumeration indicate how Solver should synchronize changes in a model with its search for solutions. In general, you cannot modify the current extracted model during a search. In other words, you cannot change a model while the search is active. A search is active during the call of IloSolver::solve and between a call of IloSolver::startNewSearch and the corresponding call of IloSolver::endSearch. You can change the model only at top level (that is, not nested).

Solver buffers changes you make in a model; the buffered changes are not applied immediately. Certain member functions check that buffer:

The values of the enumeration IloSynchronize mode serve as parameters to such member functions as IloSolver::startNewSearch.

Example

The following lines highlight changes in the model, buffering, and Solver search.

 IloEnv env;
 IloModel model(env);

 // add extractable objects to model

 IloSolver solver(model);
 solver.solve();

 // modify the model (A)

 solver.startNewSearch(mygoal, mode);
 solver.next();
 solver.endSearch();
 

Solver buffers the changes in part (A). The buffered changes will be taken into account only at top level (not nested).

While part (A) is going on, (that is, while you are making changes to the model), the solver (the instance of IloSolver) is not notified about those changes. Instead, Solver silently buffers the changes that will be checked.

See Also:

Fields

IloNoSynchronization 
IloSynchronizeAndRestart 
IloSynchronizeAndContinue