Skip to content

Commit

Permalink
Fix behavior of binary mutex when not applicable to inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienmaillard committed May 27, 2022
1 parent 1a1ed75 commit 3e6a6be
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ public Windows findWindows(Plan plan, Windows windows, Conflict conflict, Simula


private Windows findWindows(Plan plan, Windows windows, ActivityType actToBeScheduled, SimulationResults simulationResults) {

Windows validWindows = new Windows(windows);
if (!(actToBeScheduled.equals(actType) || actToBeScheduled.equals(otherActType))) {
throw new IllegalArgumentException("Activity type must be one of the mutexed types");
//not concerned by this constraint
return validWindows;
}
Windows validWindows = new Windows(windows);
ActivityType actToBeSearched = actToBeScheduled.equals(actType) ? otherActType : actType;
final var actSearch = new ActivityExpression.Builder()
.ofType(actToBeSearched).build();
Expand Down

0 comments on commit 3e6a6be

Please sign in to comment.