Module org.maxicp

Record Class Activity

java.lang.Object
java.lang.Record
org.maxicp.cp.engine.constraints.scheduling.Activity

public record Activity(CPIntervalVar interval, CPIntVar height) extends Record
Represents a scheduling activity i.e. an interval variable that consumes an ammount of resource over time.
Author:
Pierre Schaus, Charles Thomas
  • Constructor Details

    • Activity

      public Activity(CPIntervalVar interval, CPIntVar height)
      Creates an instance of a Activity record class.
      Parameters:
      interval - the value for the interval record component
      height - the value for the height record component
  • Method Details

    • getStartMin

      public int getStartMin()
    • getStartMax

      public int getStartMax()
    • getEndMin

      public int getEndMin()
    • getEndMax

      public int getEndMax()
    • getHeightMin

      public int getHeightMin()
    • getHeightMax

      public int getHeightMax()
    • getLengthMin

      public int getLengthMin()
    • getLengthMax

      public int getLengthMax()
    • isPresent

      public boolean isPresent()
    • isAbsent

      public boolean isAbsent()
    • isOptional

      public boolean isOptional()
    • hasFixedPartAt

      public boolean hasFixedPartAt(int t)
    • hasFixedPart

      public boolean hasFixedPart()
    • isStartFixed

      public boolean isStartFixed()
    • isLengthFixed

      public boolean isLengthFixed()
    • isEndFixed

      public boolean isEndFixed()
    • isFixed

      public boolean isFixed()
    • setStartMin

      public void setStartMin(int val)
    • setStartMax

      public void setStartMax(int val)
    • setEndMin

      public void setEndMin(int val)
    • setEndMax

      public void setEndMax(int val)
    • setLengthMin

      public void setLengthMin(int val)
    • setLengthMax

      public void setLengthMax(int val)
    • setHeightMin

      public void setHeightMin(int val)
    • setHeightMax

      public void setHeightMax(int val)
    • setPresent

      public void setPresent()
    • setAbsent

      public void setAbsent()
    • toString

      public String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • interval

      public CPIntervalVar interval()
      Returns the value of the interval record component.
      Returns:
      the value of the interval record component
    • height

      public CPIntVar height()
      Returns the value of the height record component.
      Returns:
      the value of the height record component