diff --git a/src/main/java/de/tum/mw/ftm/matsim/contrib/urban_ev/utils/PlanUtils.java b/src/main/java/de/tum/mw/ftm/matsim/contrib/urban_ev/utils/PlanUtils.java index 702e2c3..cf35e09 100644 --- a/src/main/java/de/tum/mw/ftm/matsim/contrib/urban_ev/utils/PlanUtils.java +++ b/src/main/java/de/tum/mw/ftm/matsim/contrib/urban_ev/utils/PlanUtils.java @@ -222,15 +222,13 @@ public static Activity getActivity_with_link(Plan plan, double time, Id li Activity current = all_acts.get(i); Activity next = all_acts.get(i + 1); Activity previous = all_acts.get(i - 1); - if (//current.getLinkId().equals(linkId) && - #next.getEndTime().isDefined() && + if (next.getEndTime().isDefined() && next.getEndTime().seconds() > time&& previous.getEndTime().isDefined() && previous.getEndTime().seconds() < time) { return current; } - if (//current.getLinkId().equals(linkId) && - next.getType().contains("end") && + if (next.getType().contains("end") && previous.getEndTime().isDefined() && previous.getEndTime().seconds() < time) { return current;