Interface Plan
- All Known Implementing Classes:
PlanInMemory
public interface Plan
a solution to a planning problem including a schedule of activities
may only be a partial solution to the whole planning problem, ie some
goals may be left unsatisfied
-
Method Summary
Modifier and TypeMethodDescriptionvoidadd(SchedulingActivity act) adds the given activity instance to the scheduled plan solution the provided instance must have start time specifiedvoidadd(Collection<SchedulingActivity> acts) adds the given activity instances to the scheduled plan solution the provided instances must have start times specifiedvoidaddEvaluation(Evaluation eval) adds a new evaluation to the plan note that different solvers or metrics will have different evaluations for the same plangov.nasa.jpl.aerie.merlin.protocol.types.DurationDuplicates a planfind(ActivityExpression template, gov.nasa.jpl.aerie.constraints.model.SimulationResults simulationResults, gov.nasa.jpl.aerie.constraints.model.EvaluationEnvironment evaluationEnvironment) finds activity instances in the plan that meet the given criteriafetches activities in the planMap<gov.nasa.jpl.aerie.types.ActivityDirectiveId, SchedulingActivity> fetches activities in the plan by idfetches activities in the plan ordered by start timefetches activities in the plan by typeSet<gov.nasa.jpl.aerie.types.ActivityDirectiveId> fetches evaluation posted to the planvoidremove(SchedulingActivity act) removes the given activity instance to the scheduled plan solution the provided instance must have start time specifiedvoidremove(Collection<SchedulingActivity> acts) adds the given activity instances to the scheduled plan solution the provided instances must have start times specifiedvoidreplaceActivity(SchedulingActivity oldAct, SchedulingActivity newAct) replace and old activity by a new onereplaceIds(Map<gov.nasa.jpl.aerie.types.ActivityDirectiveId, gov.nasa.jpl.aerie.types.ActivityDirectiveId> map)
-
Method Details
-
duplicate
Plan duplicate()Duplicates a plan- Returns:
- the duplicate plan
-
add
adds the given activity instances to the scheduled plan solution the provided instances must have start times specified- Parameters:
acts- IN the set of activity instances to schedule into the plan
-
add
adds the given activity instance to the scheduled plan solution the provided instance must have start time specified- Parameters:
act- IN activity instance to schedule into the plan
-
remove
adds the given activity instances to the scheduled plan solution the provided instances must have start times specified- Parameters:
acts- IN the set of activity instances to remove from the plan
-
remove
removes the given activity instance to the scheduled plan solution the provided instance must have start time specified- Parameters:
act- IN activity instance to remove from the plan
-
replaceActivity
replace and old activity by a new one- Parameters:
oldAct- Old ActivitynewAct- New Activity
-
getActivitiesByTime
List<SchedulingActivity> getActivitiesByTime()fetches activities in the plan ordered by start time- Returns:
- set of all activities in the plan ordered by start time
-
getActivitiesByType
Map<ActivityType,List<SchedulingActivity>> getActivitiesByType()fetches activities in the plan by type- Returns:
- map of all activities in the plan by type
-
getActivitiesById
Map<gov.nasa.jpl.aerie.types.ActivityDirectiveId,SchedulingActivity> getActivitiesById()fetches activities in the plan by id- Returns:
- map of all activities in the plan by id
-
getActivities
Set<SchedulingActivity> getActivities()fetches activities in the plan- Returns:
- set of all activities in the plan
-
getAnchorIds
Set<gov.nasa.jpl.aerie.types.ActivityDirectiveId> getAnchorIds()- Returns:
- the set of anchors from all activities in the plan
-
find
Collection<SchedulingActivity> find(ActivityExpression template, gov.nasa.jpl.aerie.constraints.model.SimulationResults simulationResults, gov.nasa.jpl.aerie.constraints.model.EvaluationEnvironment evaluationEnvironment) finds activity instances in the plan that meet the given criteria- Parameters:
template- IN the matching criteria to use on activity instances- Returns:
- collection of instances that match the given template
-
addEvaluation
adds a new evaluation to the plan note that different solvers or metrics will have different evaluations for the same plan- Parameters:
eval- IN the new evaluation to add to the plan
-
getEvaluation
Evaluation getEvaluation()fetches evaluation posted to the plan- Returns:
- evaluation posted to the plan
-
calculateAbsoluteStartOffsetAnchoredActivity
gov.nasa.jpl.aerie.merlin.protocol.types.Duration calculateAbsoluteStartOffsetAnchoredActivity(SchedulingActivity actAnchorTo) -
replaceIds
-