Module org.maxicp

Interface CPConstraint

All Superinterfaces:
ConcreteConstraint<ConcreteCPModel>
All Known Implementing Classes:
Absolute, AbstractCPConstraint, AllDifferentDC, AllDifferentFWC, Alternative, Among, AtLeastNValueDC, AtLeastNValueFWC, BinaryKnapsack, BinPacking, CardinalityMaxFWC, CardinalityMinFWC, Circuit, CostAllDifferentDC, CostCardinalityMaxDC, CPConstraintClosure, CPConstraintClosureWithDelta, Cumulative, CumulativeDecomposition, Distance, DoNothingConstraint, Duration, Element1D, Element1DDC, Element1DVar, Element2D, EndAfter, EndAtEnd, EndAtStart, EndBefore, EndBeforeEnd, EndBeforeStart, Equal, Exclude, GeneralizedCumulativeChecker, GeneralizedCumulativeConstraint, GeneralizedCumulativeConstraintBaseLine, GeneralizedCumulativeSweepMax, GeneralizedCumulativeSweepMin, Insert, IntervalVarEnd, IntervalVarEndOrValue, IntervalVarLength, IntervalVarLengthOrValue, IntervalVarStart, IntervalVarStartOrValue, InversePerm, IsEndAfter, IsEndBefore, IsEndBeforeEnd, IsEndBeforeStart, IsEqual, IsEqualVar, IsIncluded, IsLessOrEqual, IsLessOrEqualVar, IsOr, IsStartBefore, IsStartBeforeEnd, IsStartBeforeStart, IsSubset, LessOrEqual, LightBinaryKnapsack, Maximum, Mul, MulCte, MulCteRes, MulVar, NegTableCT, NoOverlap, NoOverlapBC, NoOverlapBinary, NoOverlapBinaryWithTransitionTime, NotBetween, NotEqual, NotSubset, Or, Precedence, RelaxedSequence, Require, SetCard, ShortTableCT, SoftCardinalityDC, Sorted, Square, StartAfter, StartAtEnd, StartAtStart, StartBefore, StartBeforeEnd, StartBeforeStart, SubCircuit, SubSequence, Subset, Sum, TableCT, TransitionTimes

public interface CPConstraint extends ConcreteConstraint<ConcreteCPModel>
Interface implemented by every Constraint
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns the active status of the constraint.
    boolean
    Returns the schedule status in the fix-point.
    void
    Initializes the constraint when it is posted to the solver.
    int
     
    void
    Propagates the constraint.
    void
     
    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.
    void
     
  • Method Details

    • post

      void post()
      Initializes the constraint when it is posted to the solver.
    • propagate

      void propagate()
      Propagates the constraint.
    • setScheduled

      void setScheduled(boolean scheduled)
      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.
      Parameters:
      scheduled - a value that is true when the constraint is enqueued in the propagation queue, false when dequeued
      See Also:
    • isScheduled

      boolean isScheduled()
      Returns the schedule status in the fix-point.
      Returns:
      the last setScheduled(boolean) given to setScheduled
    • setActive

      void setActive(boolean active)
      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.

      Parameters:
      active - the status to be set, this state is reversible and unset on state restoration StateManager.restoreState()
    • isActive

      boolean isActive()
      Returns the active status of the constraint.
      Returns:
      the last setValue passed to {setActive(boolean) in this state frame StateManager.restoreState().
    • registerDelta

      void registerDelta(Delta delta)
    • updateDeltas

      void updateDeltas()
    • priority

      int priority()