Record Class RelativeActivityTemplate

java.lang.Object
java.lang.Record
gov.nasa.jpl.aerie.scheduler.constraints.activities.RelativeActivityTemplate
Record Components:
type - activity type to schedule
parameterProfiles - the parameters of the activity should be equal to the value of these profiles at the start of the activity
relativeTo - one activity should be placed relative to each span in this expression
relation - Allen Interval Algebra relation for how the activity should be placed relative to the span
allowReuse - if a single existing activity or activity conflict satisfies the relations for multiple spans, whether it can be used to satisfy all of them, or just one.

public record RelativeActivityTemplate(ActivityType type, Map<String,gov.nasa.jpl.aerie.constraints.model.DiscreteProfile> parameterProfiles, gov.nasa.jpl.aerie.constraints.tree.Expression<gov.nasa.jpl.aerie.constraints.time.Spans> relativeTo, IntervalRelation relation) extends Record
Defines an activity that should be scheduled relative to a span. Used by SpansGoal.
  • Constructor Details

    • RelativeActivityTemplate

      public RelativeActivityTemplate(ActivityType type, Map<String,gov.nasa.jpl.aerie.constraints.model.DiscreteProfile> parameterProfiles, gov.nasa.jpl.aerie.constraints.tree.Expression<gov.nasa.jpl.aerie.constraints.time.Spans> relativeTo, IntervalRelation relation)
      Creates an instance of a RelativeActivityTemplate record class.
      Parameters:
      type - the value for the type record component
      parameterProfiles - the value for the parameterProfiles record component
      relativeTo - the value for the relativeTo record component
      relation - the value for the relation record component
  • Method Details

    • toString

      public final 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.
    • type

      public ActivityType type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • parameterProfiles

      public Map<String,gov.nasa.jpl.aerie.constraints.model.DiscreteProfile> parameterProfiles()
      Returns the value of the parameterProfiles record component.
      Returns:
      the value of the parameterProfiles record component
    • relativeTo

      public gov.nasa.jpl.aerie.constraints.tree.Expression<gov.nasa.jpl.aerie.constraints.time.Spans> relativeTo()
      Returns the value of the relativeTo record component.
      Returns:
      the value of the relativeTo record component
    • relation

      public IntervalRelation relation()
      Returns the value of the relation record component.
      Returns:
      the value of the relation record component