Skip to content

Commit

Permalink
merge integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rakow committed Dec 11, 2023
1 parent 175eff8 commit 8affbfa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 57 deletions.
42 changes: 0 additions & 42 deletions src/test/java/org/matsim/run/ParkingLeipzigTest.java

This file was deleted.

21 changes: 6 additions & 15 deletions src/test/java/org/matsim/run/RunLeipzigIntegrationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,35 +53,26 @@ public final void runPoint1pctIntegrationTest() {

@Test
public final void runPoint1pctParkingIntegrationTest() {
Path output = Path.of("output/it-1pct");

Path output = Path.of("output-parking-test/it-1pct");
Config config = ConfigUtils.loadConfig("input/v1.3/leipzig-v1.3-10pct.config.xml");

config.global().setNumberOfThreads(1);
config.qsim().setNumberOfThreads(1);
config.controler().setLastIteration(1);
config.controler().setLastIteration(0);
config.controler().setOverwriteFileSetting(OutputDirectoryHierarchy.OverwriteFileSetting.deleteDirectoryIfExists);
config.controler().setOutputDirectory(output.toString());
config.plans().setInputFile(URL + "leipzig-v1.2-0.1pct.plans-initial.xml.gz");

ConfigUtils.addOrGetModule(config, SimWrapperConfigGroup.class).defaultDashboards = SimWrapperConfigGroup.Mode.disabled;
config.plans().setInputFile(URL + "leipzig-v1.2-0.1pct.plans-initial.xml.gz");

MATSimApplication.execute(RunLeipzigScenario.class, config, "run", "--1pct", "--slow-speed-area", exampleShp,
"--slow-speed-relative-change", "0.5","--drt-area", exampleShp, "--post-processing", "disabled",
"--parking", "--parking-cost-area", exampleShp, "--intermodality", "drtAsAccessEgressForPt");
MATSimApplication.execute(RunLeipzigScenario.class, config, "run", "--1pct", "--drt-area", exampleShp, "--post-processing", "disabled",
"--parking-cost-area", "input/v" + RunLeipzigScenario.VERSION + "/parkingCostArea/Bewohnerparken_2020.shp",
"--parking", "--intermodality", "drtAsAccessEgressForPt");

assertThat(output)
.exists()
.isNotEmptyDirectory();

new ParkingLocation().execute("--directory", output.toString());

Network network = NetworkUtils.readNetwork(output + "/" + config.controler().getRunId() + ".output_network.xml.gz");
assertTrue(network.getLinks().get(Id.createLinkId("24232899")).getFreespeed() < 12.501000000000001);
assertTrue(network.getLinks().get(Id.createLinkId("24675139")).getFreespeed() < 7.497);
}


@Test
@Ignore("Opt Drt is not used right now.")
public final void runOptDrtExamplePopulationTest() {
Expand Down

0 comments on commit 8affbfa

Please sign in to comment.