Commit 6df99ed2 authored by Sebastian Hörl's avatar Sebastian Hörl
Browse files

Add truckAv for travel time estimation

parent 09d16817
......@@ -5,6 +5,7 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
import java.util.stream.Collectors;
import org.matsim.api.core.v01.Scenario;
import org.matsim.api.core.v01.network.Link;
......@@ -22,6 +23,13 @@ public class ASTRAConfigurator {
Set<String> networkModes = new HashSet<>(config.plansCalcRoute().getNetworkModes());
networkModes.addAll(Arrays.asList("truck", "truckAv"));
config.plansCalcRoute().setNetworkModes(networkModes);
Set<String> analyzedModes = new HashSet<>(
Arrays.asList(config.travelTimeCalculator().getAnalyzedModes().split(",")).stream()
.map(String::trim).collect(Collectors.toSet()));
analyzedModes.addAll(Arrays.asList("truck", "truckAv"));
config.travelTimeCalculator().setAnalyzedModes(String.join(",", analyzedModes));
config.travelTimeCalculator().setSeparateModes(false);
}
static public void updateNetwork(Scenario scenario, int year) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment