is the model in which all the variables referenced by the constraints are declared.
set to true if the PropagationElement is one that can break or make dependency cycles in the dynamic dependency graph managed by the PropagationComponent basically, set to true if the determiningElement is not in the same component and if this PropagationElement belongs to a cycle in the static dependency graph
set to true if the PropagationElement is one that can break or make dependency cycles in the dynamic dependency graph managed by the PropagationComponent basically, set to true if the determiningElement is not in the same component and if this PropagationElement belongs to a cycle in the static dependency graph
the position in the topological sort
the position in the topological sort
it gives the unique ID of the PropagationElement.
it gives the unique ID of the PropagationElement. those uniqueID are expected to start at 0 and to increase continuously An exception is tolerated: UniqueID is set to -1 if the Propagation Element is not mentioned in the propagation structure, such as for constants yet is mentioned in the dependencies of registered propagation elements
is the model in which all the variables referenced by the constraints are declared.
To override whenever possible to spot errors in invariants.
To override whenever possible to spot errors in invariants. this will be called for each invariant after propagation is performed. It requires that the Model is instantiated with the varible debug set to true.
Must be invoked before the violation can be queried.
Must be invoked before the violation can be queried. no constraint can be added after his method has been called. this method must also be called before closing the model.
this refers to the propagationComponent that contains the PropagationElement.
this refers to the propagationComponent that contains the PropagationElement. it is managed by the propagation structure
this sets the value of IsBoundary according to the definition of this variable
this sets the value of IsBoundary according to the definition of this variable
the value of IsBoundary
this must be called by all invariant after they complete their initialization that is: before they get their output variable.
this must be called by all invariant after they complete their initialization that is: before they get their output variable. This performs some registration to the model, which is discovered by exploring the variables that are statically registered to the model no more variable can be registered statically after this method has been called.
returns the value of the objective variable if the assignment described by parameter a was performed This proceeds through explicit state change and restore.
returns the value of the objective variable if the assignment described by parameter a was performed This proceeds through explicit state change and restore. this process is efficiently performed as the objective Varaible is registered for partial propagation
registerForPartialPropagation() in Model
returns the value of the objective variable if variable a was assigned the value v.
returns the value of the objective variable if variable a was assigned the value v. This proceeds through explicit state change and restore. this process is efficiently performed as the objective Varaible is registered for partial propagation
registerForPartialPropagation() in Model
returns the variables on which the constraint is posted.
returns the variables on which the constraint is posted. These variables have an associated degree of violation. this is necessary to know on which variables the constraint is posted
the variable that influence on the dependencies of the proapgation element these are propagated first to constitute the dynamic propagatoin graph
the variable that influence on the dependencies of the proapgation element these are propagated first to constitute the dynamic propagatoin graph
This returns the dot node to display on the DOT output for the node.
This returns the dot node to display on the DOT output for the node. Only the argument of the nodes example: "[label= \"toto\" shape=diamond color=red]"
the constraints posted in the constraint system, together with their weighting factor.
returns a reference to the propagationStructure where the PropagationElement is registered
returns a reference to the propagationStructure where the PropagationElement is registered
through this method, the PropagationElement must declare which PropagationElement it is listening to in the static dependency graph.
through this method, the PropagationElement must declare which PropagationElement it is listening to in the static dependency graph. The result must be stable after the call to setupPropagationStructure. to override
through this method, the PropagationElement must declare which PropagationElement listen to it in the static dependency graph.
through this method, the PropagationElement must declare which PropagationElement listen to it in the static dependency graph. The result must be stable after the call to setupPropagationStructure. to override
returns the value of the objective variable if the two variables a and b were swapped values.
returns the value of the objective variable if the two variables a and b were swapped values. This proceeds through explicit state change and restore. this process is efficiently performed as the objective Varaible is registered for partial propagation
registerForPartialPropagation() in Model
Returns the global violation of the constraint system, that is the weighted sum of the violation of the posted constraints close() should have been called prior to calling this method.
Returns the global violation of the constraint system, that is the weighted sum of the violation of the posted constraints close() should have been called prior to calling this method.
The degree of violation associated with the variable v.
The degree of violation associated with the variable v. The constraint system must have been closed prior to calling this method.
must have been previously declared through the registerForViolation(v:Variable) method
set to true if the PropagationElement is scheduled for propagation, false otherwise.
set to true if the PropagationElement is scheduled for propagation, false otherwise. this is managed by the PropagationElement
facility to check that the constraint is enforced
facility to check that the constraint is enforced
this is the propagation method that should be overridden by propagation elements.
this is the propagation method that should be overridden by propagation elements. notice that it is only called in a propagation wave if: 1: it has been registered for propagation since the last time it was propagated 2: it is included in the propagation wave: partial propagation wave do not propagate all propagation elements; it only propagates the ones that come in the predecessors of the targeted propagation element overriding this method is optional, so an empty body is provided by default
Method used to post a constraint in the constraint system.
Method used to post a constraint in the constraint system. Cannot be called after the constraint system has been closed. The violation degree of the constraint system is the weighted sum of the violation degree of the posted constraints. The same weighting is used to compute the violation degree of a specific variable, as it might be involved in several constraints.
is the posted constraint.
is the weight that is used in the weighted sum of the violation degrees.
Performs the propagation, and some bookkeeping around it.
Performs the propagation, and some bookkeeping around it.
This should be called by the constraint to declare the set of constrained variables.
This should be called by the constraint to declare the set of constrained variables. this should be done at the same time as the registration for invariant API The sole purpose of this is to know which variable have an associated degree of violation this is not correlated wit the registration for dependencies in the invariants. eg: A constraint can constraint a variable, but subcontract the computation and implementation of the constraint to invariants notice that all variables sent here which are actually constants are not kept, as they are not variables, actually. This is tested by looking that the variable has a model associated.
the variable that is declared as constrained by the constraint
register to determining element.
register to determining element. It must be in the static dependency graph
must belong to the statically listened elements.
must belong to the statically listened elements. cannot be added to the dynamically listened ones (it is added through this method, so you cannot remove it)
the element that determines the dynamic dependencies of the propagation element
an additional value that is stored in this element together with the reference to this, can be use for notification purposes
Call this from within the invariant to notify that you will listen to this variable.
Call this from within the invariant to notify that you will listen to this variable. The variable must be registered in the static propagation graph. You CANNOT register a variable twice. It is undetected, but will lead to unexpected behavior.
the variable that you want to listen to (and be notified about change)
a handle that is required to remove the listened var from the dynamically listened ones
this registers to the element in the dynbamic propagation graph.
this registers to the element in the dynbamic propagation graph. this element must have been registered o the static propagation graph before, or be accessible through a bulk
the element that we register to
a value that can be exploited by the element to notify its updates. normally, this value should be an int, if other type is used, the invariant should override a dedicated notification method.
a key that is needed to unregister the element in the dynamic propagation graph
performs the same operation as registerForViolation on the given variables
Call this method to notify that the variable should have a violation degree computed for the whole constraint system.
Call this method to notify that the variable should have a violation degree computed for the whole constraint system. it is not compulsory that the variable is directly involved in the constraints. It can be involved indirectly, even through invariants. The variables registered here are the ones and only ones that are considered as constrained by the constraint system, and returned by the method getConstrainedVariables
the variable that is registered
this method is an alternative to the two call to the registration methods it performs the registration to the static and dynamic graphs at once.
this method is an alternative to the two call to the registration methods it performs the registration to the static and dynamic graphs at once. just to spare one call
the variable that we want to register to
the integer value that will be passed to the invariant to notify some changes in the value of this variable
registers static and dynamic dependency to all items in the array let be i, a position in the array, the idenx used for dynamic dependency registration is i+offset
registers static and dynamic dependency to all items in the array let be i, a position in the array, the idenx used for dynamic dependency registration is i+offset
the variable that are registered
and offset applied to the position in the array when reigstering the dynamic dependency
Call this from within the invariant to notify that you will statically listen to this variable.
Call this from within the invariant to notify that you will statically listen to this variable. You CANNOT register a variable twice. It is undetected, but will lead to unexpected behavior.
the variable that you want to listen to (and be notified about change)
registers an element in the static dependency graph.
registers an element in the static dependency graph. Beware that you also need to register elements in the dynamic propagation graph for something to happen.
the element that we register to
to invoque to force inclusion of the propagation element in the current or next propagation wave.
to invoque to force inclusion of the propagation element in the current or next propagation wave.
Sets the Position oto the number of element that need to be decremented, not belonging to same connex component for connex component, set it to the number of element that are referenced from othercomponents
Sets the Position oto the number of element that need to be decremented, not belonging to same connex component for connex component, set it to the number of element that are referenced from othercomponents
true if there is a dependency, false otherwise
the output var of a constraint is whether the constraint is true or not; it is not the violation degree
the output var of a constraint is whether the constraint is true or not; it is not the violation degree
the variable that is the output variable of the invariant.
Call this from within the invariant to notify that you stop listen to this variable.
Call this from within the invariant to notify that you stop listen to this variable. The variable must have been be registered in the static propagation graph.
the handle that was returned when the variable added to the dynamic graph
unregisters an element in the dynamic propagation graph.
unregisters an element in the dynamic propagation graph.
the key that was given when the eement was registered in the dynamic propagation graph
supposed to be false between each pass of the algorithm
supposed to be false between each pass of the algorithm
A constraint system is a composition of constraints. It is itself a constraint, offering the same features, namely, a global violation and a violation specific to each variable. monitoring the violation of a variable requires that the ConstraintSystem has been notified that the variable should have an associated violation degree. This is achieved by calling the method registerForViolation(v:Variable).