Class IntervalVar


public class IntervalVar extends PropagationBaseObject
Interval variables are often used in scheduling. The main characteristics
of an IntervalVar are the start position, duration, and end
date. All these characteristics can be queried and set, and demons can
be posted on their modifications.

An important aspect is optionality: an IntervalVar can be performed or not.
If unperformed, then it simply does not exist, and its characteristics
cannot be accessed any more. An interval var is automatically marked
as unperformed when it is not consistent anymore (start greater
than end, duration < 0...)
  • Constructor Details

    • IntervalVar

      public IntervalVar(long cPtr, boolean cMemoryOwn)
  • Method Details

    • getCPtr

      public static long getCPtr(IntervalVar obj)
    • swigRelease

      public static long swigRelease(IntervalVar obj)
    • finalize

      protected void finalize()
      Overrides:
      finalize in class PropagationBaseObject
    • delete

      public void delete()
      Overrides:
      delete in class PropagationBaseObject
    • getKMinValidValue

      public static long getKMinValidValue()
      The smallest acceptable value to be returned by StartMin()
    • getKMaxValidValue

      public static long getKMaxValidValue()
      The largest acceptable value to be returned by EndMax()
    • startMin

      public long startMin()
      These methods query, set, and watch the start position of the
      interval var.
    • startMax

      public long startMax()
    • setStartMin

      public void setStartMin(long m)
    • setStartMax

      public void setStartMax(long m)
    • setStartRange

      public void setStartRange(long mi, long ma)
    • oldStartMin

      public long oldStartMin()
    • oldStartMax

      public long oldStartMax()
    • whenStartRange

      public void whenStartRange(Demon d)
    • whenStartRange

      public void whenStartRange(Runnable closure)
    • whenStartBound

      public void whenStartBound(Demon d)
    • whenStartBound

      public void whenStartBound(Runnable closure)
    • durationMin

      public long durationMin()
      These methods query, set, and watch the duration of the interval var.
    • durationMax

      public long durationMax()
    • setDurationMin

      public void setDurationMin(long m)
    • setDurationMax

      public void setDurationMax(long m)
    • setDurationRange

      public void setDurationRange(long mi, long ma)
    • oldDurationMin

      public long oldDurationMin()
    • oldDurationMax

      public long oldDurationMax()
    • whenDurationRange

      public void whenDurationRange(Demon d)
    • whenDurationRange

      public void whenDurationRange(Runnable closure)
    • whenDurationBound

      public void whenDurationBound(Demon d)
    • whenDurationBound

      public void whenDurationBound(Runnable closure)
    • endMin

      public long endMin()
      These methods query, set, and watch the end position of the interval var.
    • endMax

      public long endMax()
    • setEndMin

      public void setEndMin(long m)
    • setEndMax

      public void setEndMax(long m)
    • setEndRange

      public void setEndRange(long mi, long ma)
    • oldEndMin

      public long oldEndMin()
    • oldEndMax

      public long oldEndMax()
    • whenEndRange

      public void whenEndRange(Demon d)
    • whenEndRange

      public void whenEndRange(Runnable closure)
    • whenEndBound

      public void whenEndBound(Demon d)
    • whenEndBound

      public void whenEndBound(Runnable closure)
    • mustBePerformed

      public boolean mustBePerformed()
      These methods query, set, and watch the performed status of the
      interval var.
    • mayBePerformed

      public boolean mayBePerformed()
    • cannotBePerformed

      public boolean cannotBePerformed()
    • isPerformedBound

      public boolean isPerformedBound()
    • setPerformed

      public void setPerformed(boolean val)
    • wasPerformedBound

      public boolean wasPerformedBound()
    • whenPerformedBound

      public void whenPerformedBound(Demon d)
    • whenPerformedBound

      public void whenPerformedBound(Runnable closure)
    • whenAnything

      public void whenAnything(Demon d)
      Attaches a demon awakened when anything about this interval changes.
    • whenAnything

      public void whenAnything(Runnable closure)
      Attaches a closure awakened when anything about this interval changes.
    • startExpr

      public IntExpr startExpr()
      These methods create expressions encapsulating the start, end
      and duration of the interval var. Please note that these must not
      be used if the interval var is unperformed.
    • durationExpr

      public IntExpr durationExpr()
    • endExpr

      public IntExpr endExpr()
    • performedExpr

      public IntExpr performedExpr()
    • safeStartExpr

      public IntExpr safeStartExpr(long unperformed_value)
      These methods create expressions encapsulating the start, end
      and duration of the interval var. If the interval var is
      unperformed, they will return the unperformed_value.
    • safeDurationExpr

      public IntExpr safeDurationExpr(long unperformed_value)
    • safeEndExpr

      public IntExpr safeEndExpr(long unperformed_value)
    • accept

      public void accept(ModelVisitor visitor)
      Accepts the given visitor.