From 483a04f1ef1fd31c0d0f50500ee362ce858199c7 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Thu, 10 Oct 2024 16:05:42 +0200 Subject: [PATCH] Add comment Add comment Add comment --- .../filterchain/filters/system/FlexSearchWindowFilter.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/org/opentripplanner/routing/algorithm/filterchain/filters/system/FlexSearchWindowFilter.java b/src/main/java/org/opentripplanner/routing/algorithm/filterchain/filters/system/FlexSearchWindowFilter.java index 9684a5d64d7..336bf97b1a0 100644 --- a/src/main/java/org/opentripplanner/routing/algorithm/filterchain/filters/system/FlexSearchWindowFilter.java +++ b/src/main/java/org/opentripplanner/routing/algorithm/filterchain/filters/system/FlexSearchWindowFilter.java @@ -42,9 +42,11 @@ public String name() { public Predicate shouldBeFlaggedForRemoval() { return it -> { if (it.isDirectFlex() && sortOrder.isSortedByDescendingDepartureTime()) { + // arive by var time = it.startTime().toInstant(); return time.isBefore(earliestDepartureTime); } else if (it.isDirectFlex() && sortOrder.isSortedByAscendingArrivalTime()) { + // depart at var time = it.startTime().toInstant(); return time.isAfter(latestArrivalTime); } else {