diff --git a/scheduler-driver/src/main/java/gov/nasa/jpl/aerie/scheduler/goals/Goal.java b/scheduler-driver/src/main/java/gov/nasa/jpl/aerie/scheduler/goals/Goal.java index 59db44d9da..5d74ec1307 100644 --- a/scheduler-driver/src/main/java/gov/nasa/jpl/aerie/scheduler/goals/Goal.java +++ b/scheduler-driver/src/main/java/gov/nasa/jpl/aerie/scheduler/goals/Goal.java @@ -219,7 +219,7 @@ protected Goal fill(Goal goal) { if (this.resourceConstraints.size() > 1) { goal.resourceConstraints = new And(resourceConstraints); } else { - goal.resourceConstraints = resourceConstraints.getFirst(); + goal.resourceConstraints = resourceConstraints.get(0); } } diff --git a/scheduler-driver/src/main/java/gov/nasa/jpl/aerie/scheduler/solver/PrioritySolver.java b/scheduler-driver/src/main/java/gov/nasa/jpl/aerie/scheduler/solver/PrioritySolver.java index f14be89a03..5f2ad6cb64 100644 --- a/scheduler-driver/src/main/java/gov/nasa/jpl/aerie/scheduler/solver/PrioritySolver.java +++ b/scheduler-driver/src/main/java/gov/nasa/jpl/aerie/scheduler/solver/PrioritySolver.java @@ -617,7 +617,7 @@ private Optional makeActivityNetworkConflict( curPreviouslyInstantiated = null; } taskNetwork.startsAfterStart( - allActivitiesInNetwork.get(allActivitiesInNetwork.size()), + allActivitiesInNetwork.get(allActivitiesInNetwork.size()-1), activityName, missingRecurrenceConflict.minMaxConstraints.start, missingRecurrenceConflict.minMaxConstraints.end); @@ -634,12 +634,12 @@ private Optional makeActivityNetworkConflict( //add constraints between last task and end boundary if (missingRecurrenceConflict.afterBoundIsActivity) { taskNetwork.addStartInterval( - allActivitiesInNetwork.get(allActivitiesInNetwork.size()), + allActivitiesInNetwork.get(allActivitiesInNetwork.size()-1), missingRecurrenceConflict.nextStart.minus(missingRecurrenceConflict.minMaxConstraints.end), missingRecurrenceConflict.nextStart.minus(missingRecurrenceConflict.minMaxConstraints.start)); } else { taskNetwork.addStartInterval( - allActivitiesInNetwork.get(allActivitiesInNetwork.size()), + allActivitiesInNetwork.get(allActivitiesInNetwork.size()-1), missingRecurrenceConflict.nextStart.minus(missingRecurrenceConflict.minMaxConstraints.end) , missingRecurrenceConflict.nextStart); }