<< Prev | - Up - |
The CPI provides abstractions to implement constraint systems from scratch. Five classes provide the required functionality. They allow to implement new constraint system at a high level of abstraction without sacrificing efficiency (e.g., it is straightforward to take advantage of wake-up lists for distinct wake-up events [lower bound changed, upper bound changed etc.]).
This part of the CPI is based on the principles developed by [Hol90].
The following classes are provided:
OZ_CtDefinition
The class OZ_CtDefinition
serves as an identifier for a particular constraint system and defines certain parameters for that constraint system, as for example the number of wake-up lists. See Section 2.1 of ``The Mozart Constraint Extensions Reference'' for details.
OZ_Ct
The class OZ_Ct
represents the actual constraint attached to a constrained variable. See Section 2.4 of ``The Mozart Constraint Extensions Reference'' for details.
OZ_CtVar
The class OZ_CtVar
provides access to a constrained variable in the constraint store. Amongst other things, it provides the following services:
handling of local and global variables transparently (trailing).
Making the actual constraints in the store accessible from within a propagator to allow to manipulate them.
Triggering the scanning of appropriate wake-up lists (using OZ_CtProfile
).
See Section 2.5 of ``The Mozart Constraint Extensions Reference'' for details.
OZ_CtProfile
The class OZ_CtProfile
stores characteristic parameters of a constraint (called its profile) to determine the wake-up list(s) to be scanned. Typically, this happens when a propagator is left. See Section 2.3 of ``The Mozart Constraint Extensions Reference'' for details.
OZ_CtWakeUp
An instance of the class OZ_CtWakeUp
controls which wake-up lists have to be scanned and is produced by comparing the current state of a constraint and a previously taken constraint profile. See Section 2.2 of ``The Mozart Constraint Extensions Reference'' for details.
Further, there is a function OZ_mkCtVariable()
that allows to create a new constrained variable according to a given definition and a given constraint. Additionally, the class OZ_Expect
provides the member function OZ_Expect::expectGenCtVar()
to handle constrained variables appropriately.
To demonstrate the usage of this part of the CPI, constraints over real-intervals are implemented in Section 2.2.
<< Prev | - Up - |