java.lang.Object
gov.nasa.jpl.aerie.scheduler.goals.Goal
Direct Known Subclasses:
ActivityExistentialGoal, CompositeAndGoal, OptionGoal, Procedure

public class Goal extends Object
describes some criteria that is desired in the solution plans
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    the builder can construct goals piecemeal via a series of specifier calls the builder's piecemal specifier method calls all modify the builder and return it so that such calls may be chained directly.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected String
    the human-legible identifier of the goal never null
    protected PlanningHorizon
     
    protected gov.nasa.jpl.aerie.constraints.tree.Expression<gov.nasa.jpl.aerie.constraints.time.Windows>
    state constraints applying to the goal
    boolean
    Whether to resimulate after this goal or make the next goal use stale results.
    protected gov.nasa.jpl.aerie.constraints.tree.Expression<gov.nasa.jpl.aerie.constraints.time.Windows>
    the contiguous range of time over which the goal applies
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    ctor creates a new empty goal without identification client code should use derived type builders to instance goals
    protected
    Goal(String name)
    ctor creates a new empty goal with default priority
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    getConflicts(Plan plan, gov.nasa.jpl.aerie.constraints.model.SimulationResults simulationResults, gov.nasa.jpl.aerie.constraints.model.EvaluationEnvironment evaluationEnvironment, gov.nasa.jpl.aerie.merlin.protocol.model.SchedulerModel schedulerModel)
    identifies issues in a plan that diminishes this goal's satisfaction the method must return the same issues in the same order given the same input plan, but they need not be otherwise sorted an empty return list indicates that no issues could be identified in the plan that this goal would care to improve upon
    fetches the human-legible identifier of the goal
    gov.nasa.jpl.aerie.constraints.tree.Expression<gov.nasa.jpl.aerie.constraints.time.Windows>
     
    gov.nasa.jpl.aerie.constraints.tree.Expression<gov.nasa.jpl.aerie.constraints.time.Windows>
    fetch the (dis)contiguous range of time over which the goal applies
    void
    setTemporalContext(gov.nasa.jpl.aerie.constraints.tree.Expression<gov.nasa.jpl.aerie.constraints.time.Windows> tc)
    set the (dis)contiguous range of time over which the goal applies
    boolean
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • name

      protected String name
      the human-legible identifier of the goal never null
    • temporalContext

      protected gov.nasa.jpl.aerie.constraints.tree.Expression<gov.nasa.jpl.aerie.constraints.time.Windows> temporalContext
      the contiguous range of time over which the goal applies
    • resourceConstraints

      protected gov.nasa.jpl.aerie.constraints.tree.Expression<gov.nasa.jpl.aerie.constraints.time.Windows> resourceConstraints
      state constraints applying to the goal
    • simulateAfter

      public boolean simulateAfter
      Whether to resimulate after this goal or make the next goal use stale results. True is the default behavior. If False, the durations of the activities inserted by *this* goal will not be simulated and checked, and the *next* goal will not have up-to-date sim results if this goal placed any activities.
    • planHorizon

      protected PlanningHorizon planHorizon
  • Constructor Details

    • Goal

      protected Goal()
      ctor creates a new empty goal without identification client code should use derived type builders to instance goals
    • Goal

      protected Goal(String name)
      ctor creates a new empty goal with default priority
      Parameters:
      name - IN the human legible name of the goal
  • Method Details

    • shouldRollbackIfUnsatisfied

      public boolean shouldRollbackIfUnsatisfied()
    • extractResources

      public void extractResources(Set<String> names)
    • getName

      public String getName()
      fetches the human-legible identifier of the goal
      Returns:
      a human-legible identifier for this goal, never null
    • getTemporalContext

      public gov.nasa.jpl.aerie.constraints.tree.Expression<gov.nasa.jpl.aerie.constraints.time.Windows> getTemporalContext()
      fetch the (dis)contiguous range of time over which the goal applies
      Returns:
      the (dis)contiguous range of time over which the goal applies
    • setTemporalContext

      public void setTemporalContext(gov.nasa.jpl.aerie.constraints.tree.Expression<gov.nasa.jpl.aerie.constraints.time.Windows> tc)
      set the (dis)contiguous range of time over which the goal applies
    • getConflicts

      public Collection<Conflict> getConflicts(Plan plan, gov.nasa.jpl.aerie.constraints.model.SimulationResults simulationResults, gov.nasa.jpl.aerie.constraints.model.EvaluationEnvironment evaluationEnvironment, gov.nasa.jpl.aerie.merlin.protocol.model.SchedulerModel schedulerModel)
      identifies issues in a plan that diminishes this goal's satisfaction the method must return the same issues in the same order given the same input plan, but they need not be otherwise sorted an empty return list indicates that no issues could be identified in the plan that this goal would care to improve upon
      Parameters:
      plan - IN: the plan that this goal should be evaluated against
      simulationResults -
      Returns:
      a list of issues in the plan that diminish goal satisfaction
    • getResourceConstraints

      public gov.nasa.jpl.aerie.constraints.tree.Expression<gov.nasa.jpl.aerie.constraints.time.Windows> getResourceConstraints()