Class Goal
java.lang.Object
gov.nasa.jpl.aerie.scheduler.goals.Goal
- Direct Known Subclasses:
ActivityExistentialGoal,CompositeAndGoal,OptionGoal,Procedure
describes some criteria that is desired in the solution plans
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classGoal.Builder<T extends Goal.Builder<T>>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
FieldsModifier and TypeFieldDescriptionprotected Stringthe human-legible identifier of the goal never nullprotected PlanningHorizonprotected gov.nasa.jpl.aerie.constraints.tree.Expression<gov.nasa.jpl.aerie.constraints.time.Windows> state constraints applying to the goalbooleanWhether 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 -
Method Summary
Modifier and TypeMethodDescriptionvoidextractResources(Set<String> names) 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 upongetName()fetches the human-legible identifier of the goalgov.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 appliesvoidsetTemporalContext(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 appliesboolean
-
Field Details
-
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> temporalContextthe 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> resourceConstraintsstate constraints applying to the goal -
simulateAfter
public boolean simulateAfterWhether 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
-
-
Constructor Details
-
Goal
protected Goal()ctor creates a new empty goal without identification client code should use derived type builders to instance goals -
Goal
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
-
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 againstsimulationResults-- 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()
-