From e29fa13f2b3bba6b3dd18cb699324865e24314f3 Mon Sep 17 00:00:00 2001 From: sime94 Date: Thu, 12 Sep 2024 10:04:21 +0200 Subject: [PATCH] remove nonsense code segment --- .../java/org/matsim/run/LausitzScenario.java | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/src/main/java/org/matsim/run/LausitzScenario.java b/src/main/java/org/matsim/run/LausitzScenario.java index 4a16f7c..1ecabe4 100644 --- a/src/main/java/org/matsim/run/LausitzScenario.java +++ b/src/main/java/org/matsim/run/LausitzScenario.java @@ -2,10 +2,8 @@ import com.google.common.collect.Sets; import org.matsim.analysis.personMoney.PersonMoneyEventsAnalysisModule; -import org.matsim.api.core.v01.Id; import org.matsim.api.core.v01.Scenario; import org.matsim.api.core.v01.TransportMode; -import org.matsim.api.core.v01.population.Person; import org.matsim.application.MATSimApplication; import org.matsim.application.analysis.CheckPopulation; import org.matsim.application.analysis.traffic.LinkStats; @@ -31,7 +29,6 @@ import org.matsim.core.config.groups.ScoringConfigGroup; import org.matsim.core.controler.AbstractModule; import org.matsim.core.controler.Controler; -import org.matsim.core.population.PopulationUtils; import org.matsim.core.replanning.strategies.DefaultPlanStrategiesModule; import org.matsim.core.scoring.functions.ScoringParametersForPerson; import org.matsim.run.analysis.CommunityFilter; @@ -50,7 +47,6 @@ import javax.annotation.Nullable; import java.util.HashSet; import java.util.List; -import java.util.Map; import java.util.Set; @CommandLine.Command(header = ":: Open Lausitz Scenario ::", version = LausitzScenario.VERSION, mixinStandardHelpOptions = true) @@ -180,26 +176,6 @@ protected Config prepareConfig(Config config) { @Override protected void prepareScenario(Scenario scenario) { - - - for (Person person : scenario.getPopulation().getPersons().values()) { - - if (PopulationUtils.getSubpopulation(person).contains("commercialPersonTraffic") || - PopulationUtils.getSubpopulation(person).contains("goodsTraffic")) { - - Map> types = VehicleUtils.getVehicleTypes(person); - - for (Map.Entry> entry : types.entrySet()) { - if (Set.of(HEAVY_MODE, MEDIUM_MODE, LIGHT_MODE).contains(entry.getKey())) { - types.put(entry.getKey(), Id.create(entry.getKey(), VehicleType.class)); - } - } - } - - } - - - // add freight and truck as allowed modes together with car PrepareNetwork.prepareFreightNetwork(scenario.getNetwork());