public abstract class AbstractConstraint extends Object implements Constraint
| Constructor and Description | 
|---|
| AbstractConstraint(Solver cp) | 
| Modifier and Type | Method and Description | 
|---|---|
| Solver | getSolver() | 
| boolean | isActive()Returns the active status of the constraint. | 
| boolean | isScheduled()Returns the schedule status in the fix-point. | 
| void | post()Initializes the constraint when it is posted to the solver. | 
| void | propagate()Propagates the constraint. | 
| void | setActive(boolean active)Activates or deactivates the constraint such that it is not scheduled any more. | 
| void | setScheduled(boolean scheduled)Set the status of the constraint as
 scheduled to be propagated by the fix-point. | 
public AbstractConstraint(Solver cp)
public void post()
Constraintpost in interface Constraintpublic Solver getSolver()
public void propagate()
Constraintpropagate in interface Constraintpublic void setScheduled(boolean scheduled)
ConstraintsetScheduled in interface Constraintscheduled - a value that is true when the constraint
                  is enqueued in the propagation queue,
                  false when dequeuedSolver.fixPoint()public boolean isScheduled()
ConstraintisScheduled in interface ConstraintConstraint.setScheduled(boolean) given to setScheduledpublic void setActive(boolean active)
ConstraintTypically called by the Constraint to let the solver know it should not be scheduled any more when it is subsumed.
By default the constraint is active.
setActive in interface Constraintactive - the status to be set,
               this state is reversible and unset
               on state restoration StateManager.restoreState()public boolean isActive()
ConstraintisActive in interface ConstraintConstraint.setActive(boolean)
         in this state frame StateManager.restoreState().Copyright © 2018 Laurent Michel, Pierre Schaus, Pascal Van Hentenryck. All rights reserved.