Skip to content

Commit

Permalink
remove nonsense code segment
Browse files Browse the repository at this point in the history
  • Loading branch information
simei94 committed Sep 12, 2024
1 parent c61a54e commit e29fa13
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions src/main/java/org/matsim/run/LausitzScenario.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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)
Expand Down Expand Up @@ -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<String, Id<VehicleType>> types = VehicleUtils.getVehicleTypes(person);

for (Map.Entry<String, Id<VehicleType>> 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());

Expand Down

0 comments on commit e29fa13

Please sign in to comment.