java.lang.Object
org.maxicp.cp.engine.core.AbstractCPConstraint
org.maxicp.cp.engine.constraints.seqvar.Exclude
- All Implemented Interfaces:
CPConstraint,ConcreteConstraint<ConcreteCPModel>
Excludes a node from a sequence
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisActive()Returns the active status of the constraint.booleanReturns the schedule status in the fix-point.voidpost()Initializes the constraint when it is posted to the solver.voidPropagates the constraint.voidregisterDelta(Delta delta) voidsetActive(boolean active) Activates or deactivates the constraint such that it is not scheduled any more.voidsetScheduled(boolean scheduled) Set the status of the constraint as scheduled to be propagated by the fix-point.voidMethods inherited from class org.maxicp.cp.engine.core.AbstractCPConstraint
getSolver, priority
-
Constructor Details
-
Exclude
Excludes a node from a sequence- Parameters:
seqVar- sequence from which the node must be excludednode- node to exclude
-
-
Method Details
-
post
public void post()Description copied from interface:CPConstraintInitializes the constraint when it is posted to the solver.- Specified by:
postin interfaceCPConstraint- Overrides:
postin classAbstractCPConstraint
-
propagate
public void propagate()Description copied from interface:CPConstraintPropagates the constraint.- Specified by:
propagatein interfaceCPConstraint- Overrides:
propagatein classAbstractCPConstraint
-
setScheduled
public void setScheduled(boolean scheduled) Description copied from interface:CPConstraintSet the status of the constraint as scheduled to be propagated by the fix-point. This method Called by the solver when the constraint is enqueued in the propagation queue and is not intended to be called by the user.- Specified by:
setScheduledin interfaceCPConstraint- Overrides:
setScheduledin classAbstractCPConstraint- Parameters:
scheduled- a value that is true when the constraint is enqueued in the propagation queue, false when dequeued- See Also:
-
isScheduled
public boolean isScheduled()Description copied from interface:CPConstraintReturns the schedule status in the fix-point.- Specified by:
isScheduledin interfaceCPConstraint- Overrides:
isScheduledin classAbstractCPConstraint- Returns:
- the last
CPConstraint.setScheduled(boolean)given to setScheduled
-
setActive
public void setActive(boolean active) Description copied from interface:CPConstraintActivates or deactivates the constraint such that it is not scheduled any more.Typically 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.
- Specified by:
setActivein interfaceCPConstraint- Overrides:
setActivein classAbstractCPConstraint- Parameters:
active- the status to be set, this state is reversible and unset on state restorationStateManager.restoreState()
-
isActive
public boolean isActive()Description copied from interface:CPConstraintReturns the active status of the constraint.- Specified by:
isActivein interfaceCPConstraint- Overrides:
isActivein classAbstractCPConstraint- Returns:
- the last setValue passed to {
CPConstraint.setActive(boolean)in this state frameStateManager.restoreState().
-
registerDelta
- Specified by:
registerDeltain interfaceCPConstraint- Overrides:
registerDeltain classAbstractCPConstraint
-
updateDeltas
public void updateDeltas()- Specified by:
updateDeltasin interfaceCPConstraint- Overrides:
updateDeltasin classAbstractCPConstraint
-