diff --git a/src/test/java/org/matsim/run/TestBicycleRouting.java b/src/test/java/org/matsim/run/TestBicycleRouting.java index 043b0de..e144247 100644 --- a/src/test/java/org/matsim/run/TestBicycleRouting.java +++ b/src/test/java/org/matsim/run/TestBicycleRouting.java @@ -35,8 +35,8 @@ public void testElevationRouting() { var outputDir = testUtils.getOutputDirectory(); - MATSimApplication.execute(TestApplication.class, "run", "--output=" + outputDir + "withElevation", "--useElevation=true", "--download-input"); - MATSimApplication.execute(TestApplication.class, "run", "--output=" + outputDir + "withoutElevation", "--useElevation=false", "--download-input"); + MATSimApplication.execute(TestApplication.class, "--output=" + outputDir + "withElevation", "--useElevation=true", "--download-input", "--1pct"); + MATSimApplication.execute(TestApplication.class, "--output=" + outputDir + "withoutElevation", "--useElevation=false", "--download-input", "--1pct"); // load output of both runs var scenarioWithElevation = ScenarioUtils.createScenario(ConfigUtils.createConfig()); @@ -77,10 +77,17 @@ public static class TestApplication extends RunMetropoleRuhrScenario { @Override public Config prepareConfig(Config config) { var preparedConfig = super.prepareConfig(config); + + preparedConfig.global().setNumberOfThreads(1); + preparedConfig.qsim().setNumberOfThreads(1); preparedConfig.plans().setInputFile(null); preparedConfig.controler().setLastIteration(0); preparedConfig.controler().setRunId(RUN_ID); + // Disable PT + preparedConfig.transit().setVehiclesFile(null); + preparedConfig.transit().setTransitScheduleFile(null); + var bikeConfig = ((BicycleConfigGroup) config.getModules().get("bicycle")); // set an insanely high disutility for gradients bikeConfig.setMarginalUtilityOfGradient_m_100m(-1000); @@ -91,6 +98,9 @@ public Config prepareConfig(Config config) { public void prepareScenario(Scenario scenario) { super.prepareScenario(scenario); + // Other agents are not needed for the test + scenario.getPopulation().getPersons().clear(); + // add single person with two activities var factory = scenario.getPopulation().getFactory(); var plan = factory.createPlan();