From f6f9af859f84a3f2f6098d3c73044d6295ec11eb Mon Sep 17 00:00:00 2001 From: rakow Date: Mon, 30 Dec 2024 10:52:28 +0100 Subject: [PATCH] filter modes without real usage in single trip generator --- .../matsim/modechoice/search/SingleTripChoicesGenerator.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contribs/informed-mode-choice/src/main/java/org/matsim/modechoice/search/SingleTripChoicesGenerator.java b/contribs/informed-mode-choice/src/main/java/org/matsim/modechoice/search/SingleTripChoicesGenerator.java index 5ba80a11740..7f5afad42f4 100644 --- a/contribs/informed-mode-choice/src/main/java/org/matsim/modechoice/search/SingleTripChoicesGenerator.java +++ b/contribs/informed-mode-choice/src/main/java/org/matsim/modechoice/search/SingleTripChoicesGenerator.java @@ -61,6 +61,10 @@ public List generate(PlanModel planModel, @Nullable Set c ModeEstimate est = opt.get(); + // Not actual used modes are not generated here + if (est.getNoRealUsage()[idx]) + continue; + String[] modes = planModel.getCurrentModes(); modes[idx] = est.getMode();