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

add crossing penalty

parent 799c45fa
......@@ -8,6 +8,7 @@ import org.matsim.core.scenario.ScenarioUtils;
import ch.ethz.matsim.baseline_scenario.config.CommandLine;
import ch.ethz.matsim.baseline_scenario.config.CommandLine.ConfigurationException;
import ch.ethz.matsim.baseline_scenario.traffic.BaselineTrafficModule;
import ch.ethz.matsim.baseline_scenario.transit.BaselineTransitModule;
import ch.ethz.matsim.baseline_scenario.transit.routing.DefaultEnrichedTransitRoute;
import ch.ethz.matsim.baseline_scenario.transit.routing.DefaultEnrichedTransitRouteFactory;
......@@ -22,7 +23,7 @@ public class RunASTRA2018002 {
static public void main(String[] args) throws ConfigurationException {
CommandLine cmd = new CommandLine.Builder(args) //
.requireOptions("config-path", "model") //
.allowOptions("use-route-choice", "use-only-significant", "utility-parameters") //
.allowOptions("use-route-choice", "use-only-significant", "utility-parameters", "crossing-penalty") //
.allowPrefixes(SwissDiscreteModeChoiceModule.COMMAND_LINE_PREFIX) //
.build();
......@@ -60,6 +61,8 @@ public class RunASTRA2018002 {
controller.addOverridingModule(new SwissRailRaptorModule());
controller.addOverridingModule(new BaselineTransitModule());
controller.addOverridingModule(new ASTRAModule());
controller.addOverridingModule(
new BaselineTrafficModule(cmd.getOption("crossing-penalty").map(Double::parseDouble).orElse(3.0)));
AVConfigurator.configureController(controller);
UtilitySet utilitySet = Enum.valueOf(UtilitySet.class, cmd.getOptionStrict("model"));
......
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