Skip to content

Commit

Permalink
Modified calculation of disruption injection point minutes to be able…
Browse files Browse the repository at this point in the history
… to handle multi-day disruptions
  • Loading branch information
gwehr1 committed Feb 1, 2024
1 parent 650614c commit e6a7286
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ void loadJson(String file) throws IOException, ParseException, java.text.ParseEx
Date date = format.parse(disruption.getStartHHMM());
Calendar cal = Calendar.getInstance();
cal.setTime(date);
double minutes = 60 * cal.get(Calendar.HOUR_OF_DAY) + cal.get(Calendar.MINUTE);
double minutes = 60 * 24 * (cal.get(Calendar.DAY_OF_YEAR) - 1) + 60 * cal.get(Calendar.HOUR_OF_DAY) + cal.get(Calendar.MINUTE);
if (disruptions.containsKey(minutes)) {
throw new RuntimeException("\n\nCONFIGURATION ERROR:" +
"\nFound multiple disruption blocks in " + file + " for time " + disruption.getStartHHMM() +
Expand Down

0 comments on commit e6a7286

Please sign in to comment.