Module org.maxicp

Class DoNothingConstraint

java.lang.Object
org.maxicp.cp.engine.core.DoNothingConstraint
All Implemented Interfaces:
CPConstraint, ConcreteConstraint<ConcreteCPModel>

public class DoNothingConstraint extends Object implements CPConstraint
  • Constructor Details

    • DoNothingConstraint

      public DoNothingConstraint()
  • Method Details

    • post

      public void post()
      Description copied from interface: CPConstraint
      Initializes the constraint when it is posted to the solver.
      Specified by:
      post in interface CPConstraint
    • propagate

      public void propagate()
      Description copied from interface: CPConstraint
      Propagates the constraint.
      Specified by:
      propagate in interface CPConstraint
    • priority

      public int priority()
      Specified by:
      priority in interface CPConstraint
    • setScheduled

      public void setScheduled(boolean scheduled)
      Description copied from interface: CPConstraint
      Set 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:
      setScheduled in interface CPConstraint
      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: CPConstraint
      Returns the schedule status in the fix-point.
      Specified by:
      isScheduled in interface CPConstraint
      Returns:
      the last CPConstraint.setScheduled(boolean) given to setScheduled
    • setActive

      public void setActive(boolean active)
      Description copied from interface: CPConstraint
      Activates 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:
      setActive in interface CPConstraint
      Parameters:
      active - the status to be set, this state is reversible and unset on state restoration StateManager.restoreState()
    • isActive

      public boolean isActive()
      Description copied from interface: CPConstraint
      Returns the active status of the constraint.
      Specified by:
      isActive in interface CPConstraint
      Returns:
      the last setValue passed to {CPConstraint.setActive(boolean) in this state frame StateManager.restoreState().
    • registerDelta

      public void registerDelta(Delta delta)
      Specified by:
      registerDelta in interface CPConstraint
    • updateDeltas

      public void updateDeltas()
      Specified by:
      updateDeltas in interface CPConstraint