Class MissingActivityTemplateConflict


public class MissingActivityTemplateConflict extends MissingActivityConflict
describes plan problem due to lack of a matching instance for a template such conflicts are typically addressed by scheduling additional activities using the corresponding creation template
  • Constructor Details

    • MissingActivityTemplateConflict

      public MissingActivityTemplateConflict(Goal goal, gov.nasa.jpl.aerie.constraints.time.Windows temporalContext, ActivityExpression template, gov.nasa.jpl.aerie.constraints.model.EvaluationEnvironment evaluationEnvironment, int cardinality, Optional<gov.nasa.jpl.aerie.types.ActivityDirectiveId> anchorIdTo, Optional<Boolean> anchorToStart, Optional<gov.nasa.jpl.aerie.merlin.protocol.types.Duration> totalDuration, ScheduleAt scheduleAtEarliest)
      ctor creates a new conflict regarding a missing activity
      Parameters:
      goal - the dissatisfied goal that issued the conflict
      temporalContext - the times in the plan when the goal was
      template - desired activity template
      evaluationEnvironment - the evaluation environment at the time of creation so variables can be retrieved later at instantiation
      cardinality - the desired number of times the activity template should be inserted
      anchorIdTo - represents the id of the activity to which we need to create an anchor
      totalDuration - the desired total duration
  • Method Details

    • getAnchorId

      public Optional<gov.nasa.jpl.aerie.types.ActivityDirectiveId> getAnchorId()
    • getAnchorToStart

      public Optional<Boolean> getAnchorToStart()
    • getCardinality

      public int getCardinality()
    • getTotalDuration

      public Optional<gov.nasa.jpl.aerie.merlin.protocol.types.Duration> getTotalDuration()
    • scheduleAt

      public ScheduleAt scheduleAt()
      Specified by:
      scheduleAt in class MissingActivityConflict
    • getTemporalContext

      public gov.nasa.jpl.aerie.constraints.time.Windows getTemporalContext()
      the times over which the goal was dissatisfied and induced this conflict the relevant times may be composed of several discontinous spans the times over which the activity's absence is itself causing a problem does not consider other constraints on the possible activity, eg timing with respect to other events or allowable state transitions or even the activity's own duration limits the times encompass both the start and end of the missing activity (they are not just start windows) REVIEW: maybe better to just have start windows? gets confusing and easy to mix up the times over which the missing activity template is causing a problem does not consider other constraints on the possible activity, eg timing with respect to other events or allowable state transitions or even the activity's own duration limits the times encompass just the desired start times of the missing activity
      Specified by:
      getTemporalContext in class MissingActivityConflict
      Returns:
    • getGoal

      public ActivityTemplateGoal getGoal()
      the goal whose dissatisfaction initially created this conflict
      Overrides:
      getGoal in class Conflict
      Returns:
      reference to the dissatisfied goal that caused this conflict
    • getActTemplate

      public ActivityExpression getActTemplate()
    • toString

      public String toString()
      Overrides:
      toString in class Object