Class ProceduralCreationGoal.Builder
java.lang.Object
gov.nasa.jpl.aerie.scheduler.goals.Goal.Builder<ProceduralCreationGoal.Builder>
gov.nasa.jpl.aerie.scheduler.goals.ActivityExistentialGoal.Builder<ProceduralCreationGoal.Builder>
gov.nasa.jpl.aerie.scheduler.goals.ProceduralCreationGoal.Builder
- Enclosing class:
ProceduralCreationGoal
public static class ProceduralCreationGoal.Builder
extends ActivityExistentialGoal.Builder<ProceduralCreationGoal.Builder>
the builder can construct goals piecemeal via a series of method calls
-
Field Summary
FieldsFields inherited from class gov.nasa.jpl.aerie.scheduler.goals.ActivityExistentialGoal.Builder
childCustodyFields inherited from class gov.nasa.jpl.aerie.scheduler.goals.Goal.Builder
ending, name, planHorizon, range, resourceConstraints, starting -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()uses all pending specifications to construct a matching new goal object this is typically the last client call after a chain of specifiers, but the builder object remains viable to be further specified and build additional goalsprotected ProceduralCreationGoalfill(ProceduralCreationGoal goal) populates the provided goal with specifiers from this builder and above typically called by any derived builder classes to fill in the specifiers managed at this builder level and abovegenerateWith(Function<Plan, Collection<SchedulingActivity>> generator) specifies the procedure used to generate desired activities the procedure takes as input the "current" partial plan as of the execution of this goal's satisfaction and produces a list of activity instances that must exist to satisfy this goal.protected ProceduralCreationGoal.BuildergetThis()returns the current builder object (but typed at the lowest level) should be implemented by the builder at the bottom of the type heirarchyMethods inherited from class gov.nasa.jpl.aerie.scheduler.goals.ActivityExistentialGoal.Builder
fill, ownedMethods inherited from class gov.nasa.jpl.aerie.scheduler.goals.Goal.Builder
attachStateConstraint, endingAt, fill, forAllTimeIn, named, shouldRollbackIfUnsatisfied, simulateAfter, startingAt, withinPlanHorizon
-
Field Details
-
generateWith
-
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
generateWith
public ProceduralCreationGoal.Builder generateWith(Function<Plan, Collection<SchedulingActivity>> generator) specifies the procedure used to generate desired activities the procedure takes as input the "current" partial plan as of the execution of this goal's satisfaction and produces a list of activity instances that must exist to satisfy this goal. the activities are not immediately inserted in the plan. partial satisfaction is possible, using the heuristic that more matching activities is always preferable to fewer. individual instances must match exactly (all arguments) the procedure may recommend creation of a list of activities all at once, or may make repeated incremental recommendations for single additional activities at a time the procedure should be a pure function and not have any internal state that could produce variant results on re-invocation with different hypothetical inputs this specifier is required. it replaces any previous specification. TODO: generator function should take arg for temporal context- Parameters:
generator- IN/OUT the function invoked to generate the desired activity instances, which takes the plan as input and outputs a list of activity instances. should be an idempotent pure function. may be called out of order from different contexts.- Returns:
- this builder, ready for additional specification
-
build
uses all pending specifications to construct a matching new goal object this is typically the last client call after a chain of specifiers, but the builder object remains viable to be further specified and build additional goals- Overrides:
buildin classActivityExistentialGoal.Builder<ProceduralCreationGoal.Builder>- Returns:
- a newly allocated goal object matching all specifications
-
getThis
returns the current builder object (but typed at the lowest level) should be implemented by the builder at the bottom of the type heirarchy- Specified by:
getThisin classGoal.Builder<ProceduralCreationGoal.Builder>- Returns:
- reference to the current builder object (specifically typed)
-
fill
populates the provided goal with specifiers from this builder and above typically called by any derived builder classes to fill in the specifiers managed at this builder level and above- Parameters:
goal- IN/OUT a goal object to be filled with specifiers from this level of builder and above- Returns:
- the provided object, with details filled in
-