Class Evaluation.GoalEvaluation
java.lang.Object
gov.nasa.jpl.aerie.scheduler.solver.Evaluation.GoalEvaluation
- Enclosing class:
Evaluation
description of the satisfaction of a single goal in isolation
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Map<SchedulingActivity, Boolean> a map associating each activity that contributed to the goal to a boolean stating whether the goal created it or notprotected final Map<Conflict, ConflictSolverResult> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddConflicts(Collection<Conflict> conflict) voidassociate(SchedulingActivity act, boolean createdByThisGoal, Conflict conflict) flags given activity as contributing to the goal's (dis)satisfactionvoidassociate(Collection<SchedulingActivity> acts, boolean createdByThisGoal, Conflict conflict) flags all given activities as contributing to the goal's (dis)satisfactionDuplicates the GoalEvaluationfetches the set of all activities that contributed to the evaluationfetches the set of all activities that this goal inserted in the plandoublegetScore()fetches the numeric evaluation score for the goalvoidvoidreplace(SchedulingActivity toBeReplaced, SchedulingActivity replacement) Replaces an activity in the goal evaluation by another activityvoidsetConflictSatisfaction(Conflict conflict, ConflictSatisfaction conflictSatisfaction)
-
Field Details
-
acts
a map associating each activity that contributed to the goal to a boolean stating whether the goal created it or not -
conflicts
-
-
Constructor Details
-
GoalEvaluation
public GoalEvaluation()
-
-
Method Details
-
getScore
public double getScore()fetches the numeric evaluation score for the goal- Returns:
- the numeric evaluation score for the goal
-
getSatisfaction
-
associate
flags given activity as contributing to the goal's (dis)satisfaction- Parameters:
act- IN the activity instance that contributed to the goal's evaluationcreatedByThisGoal- IN a boolean stating whether the instance has been created by this goal or not
-
setConflictSatisfaction
-
replace
Replaces an activity in the goal evaluation by another activity- Parameters:
toBeReplaced- the activity to be replacedreplacement- the replacement activity
-
duplicate
Duplicates the GoalEvaluation- Returns:
- the duplicate
-
addConflicts
-
associate
public void associate(Collection<SchedulingActivity> acts, boolean createdByThisGoal, Conflict conflict) flags all given activities as contributing to the goal's (dis)satisfaction- Parameters:
acts- IN container of activities that contributed to the goal's evaluationcreatedByThisGoal- IN a boolean stating whether the instance has been created by this goal or notconflict- IN a conflict if the activity has been associated to satisfy a specific conflict, can be null
-
removeAssociation
-
getAssociatedActivities
fetches the set of all activities that contributed to the evaluation- Returns:
- the set of all activities that contributed to the evaluation
-
getInsertedActivities
fetches the set of all activities that this goal inserted in the plan- Returns:
- the set of all activities that this goal inserted in the plan
-