Skip to main content
FRAMES NO FRAMES

Reversibility in CP Optimizer
PREVIOUS NEXT

A reversible class is one where the data members will be restored automatically by CP Optmizer when it backtracks.

Objects that use only reversible classes are called reversible objects.

All CP Optimizer objects are reversible objects.

Thus, the state of CP Optimizer variables, including their domains and the constraints posted on them, are automatically restored when CP Optimizer backtracks.

Functions that use only reversible assignments are called reversible functions.

All CP Optimizer functions and member functions are reversible functions unless otherwise documented.

In particular, all the member functions and predefined functions for posting constraints in CP Optimizer are reversible. Thus, the state of constrained variables, including their domains and the constraints posted on them, is automatically restored when CP optimizer backtracks. CP Optimizer saves the state before the function call.

See the concepts Propagation in CP Optimizer and State in CP Optimizer for more information.

See also

IlcConstraint

PREVIOUS NEXT