From a47063e727b6d38e3820a458087d796e437e745e Mon Sep 17 00:00:00 2001 From: Paul Heinrich Date: Thu, 25 Jul 2024 10:33:32 +0200 Subject: [PATCH] fix tests by disabling net consistency check --- .../java/ch/sbb/matsim/routing/pt/raptor/Fixture.java | 2 ++ .../analysis/LinkStatsControlerListenerTest.java | 2 ++ .../controler/TransitControlerIntegrationTest.java | 2 ++ .../java/org/matsim/core/mobsim/hermes/HermesTest.java | 2 ++ .../matsim/core/mobsim/hermes/StorageCapacityTest.java | 2 ++ .../core/mobsim/qsim/FlowStorageSpillbackTest.java | 2 ++ .../core/mobsim/qsim/NetsimRoutingConsistencyTest.java | 3 ++- .../matsim/core/mobsim/qsim/NodeTransitionTest.java | 3 +++ .../java/org/matsim/core/mobsim/qsim/QSimTest.java | 3 +++ .../qsim/TeleportationEngineWDistanceCheckTest.java | 2 ++ .../org/matsim/core/mobsim/qsim/VehicleSourceTest.java | 2 ++ .../core/mobsim/qsim/pt/QSimIntegrationTest.java | 4 +++- .../matsim/core/mobsim/qsim/pt/TransitAgentTest.java | 10 ++++++++-- .../mobsim/qsim/pt/TransitQueueSimulationTest.java | 2 ++ .../DeparturesOnSameLinkSameTimeTest.java | 2 ++ .../qnetsimengine/FlowEfficiencyCalculatorTest.java | 2 ++ .../qnetsimengine/JavaRoundingErrorInQsimTest.java | 2 ++ .../LinkSpeedCalculatorIntegrationTest.java | 5 ++++- .../core/mobsim/qsim/qnetsimengine/PassingTest.java | 2 ++ .../core/mobsim/qsim/qnetsimengine/QLinkLanesTest.java | 5 +++++ .../core/mobsim/qsim/qnetsimengine/QLinkTest.java | 4 ++++ .../core/mobsim/qsim/qnetsimengine/SeepageTest.java | 2 ++ .../qnetsimengine/SimulatedLaneFlowCapacityTest.java | 5 +++++ .../mobsim/qsim/qnetsimengine/VehVsLinkSpeedTest.java | 2 ++ .../mobsim/qsim/qnetsimengine/VehicleHandlerTest.java | 2 ++ .../core/network/io/NetworkReprojectionIOTest.java | 3 +++ .../matsim/core/router/FallbackRoutingModuleTest.java | 2 ++ .../NetworkRoutingInclAccessEgressModuleTest.java | 10 +++++++++- .../core/router/PseudoTransitRoutingModuleTest.java | 2 ++ .../matsim/core/router/TripRouterFactoryImplTest.java | 2 ++ .../core/utils/timing/TimeInterpretationTest.java | 3 +++ .../org/matsim/integration/SimulateAndScoreTest.java | 6 +++++- .../replanning/ChangeTripModeIntegrationTest.java | 2 ++ .../timevariantnetworks/QSimIntegrationTest.java | 3 +++ .../controller/ExperiencedPlansWriterTest.java | 2 ++ ...WithinDayTravelTimeWithNetworkChangeEventsTest.java | 2 ++ 36 files changed, 104 insertions(+), 7 deletions(-) diff --git a/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/Fixture.java b/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/Fixture.java index 97bdc02747a..f842302b4d6 100644 --- a/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/Fixture.java +++ b/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/Fixture.java @@ -30,6 +30,7 @@ import org.matsim.api.core.v01.network.Node; import org.matsim.core.config.Config; import org.matsim.core.config.ConfigUtils; +import org.matsim.core.config.groups.RoutingConfigGroup; import org.matsim.core.population.routes.NetworkRoute; import org.matsim.core.population.routes.RouteUtils; import org.matsim.core.scenario.MutableScenario; @@ -100,6 +101,7 @@ public Fixture() { this.config = ConfigUtils.createConfig(); this.config.transit().setUseTransit(true); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); ScenarioBuilder scBuilder = new ScenarioBuilder(config) ; this.scenario = (MutableScenario) scBuilder.build() ; diff --git a/matsim/src/test/java/org/matsim/analysis/LinkStatsControlerListenerTest.java b/matsim/src/test/java/org/matsim/analysis/LinkStatsControlerListenerTest.java index 8ec2fb9f37d..0a47e4b929f 100644 --- a/matsim/src/test/java/org/matsim/analysis/LinkStatsControlerListenerTest.java +++ b/matsim/src/test/java/org/matsim/analysis/LinkStatsControlerListenerTest.java @@ -33,6 +33,7 @@ import org.matsim.core.config.Config; import org.matsim.core.config.ConfigUtils; import org.matsim.core.config.groups.LinkStatsConfigGroup; +import org.matsim.core.config.groups.RoutingConfigGroup; import org.matsim.core.controler.*; import org.matsim.core.controler.AbstractModule; import org.matsim.core.controler.Injector; @@ -352,6 +353,7 @@ void testReset_CorrectlyExecuted() throws IOException { config.controller().setFirstIteration(0); config.controller().setLastIteration(7); config.controller().setWritePlansInterval(0); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); LinkStatsConfigGroup lsConfig = config.linkStats(); lsConfig.setWriteLinkStatsInterval(3); diff --git a/matsim/src/test/java/org/matsim/core/controler/TransitControlerIntegrationTest.java b/matsim/src/test/java/org/matsim/core/controler/TransitControlerIntegrationTest.java index 10d912cfe9d..20699888afa 100644 --- a/matsim/src/test/java/org/matsim/core/controler/TransitControlerIntegrationTest.java +++ b/matsim/src/test/java/org/matsim/core/controler/TransitControlerIntegrationTest.java @@ -41,6 +41,7 @@ import org.matsim.api.core.v01.population.Population; import org.matsim.api.core.v01.population.PopulationFactory; import org.matsim.core.config.Config; +import org.matsim.core.config.groups.RoutingConfigGroup; import org.matsim.core.config.groups.ScoringConfigGroup.ActivityParams; import org.matsim.core.config.groups.ReplanningConfigGroup.StrategySettings; import org.matsim.core.population.routes.NetworkRoute; @@ -68,6 +69,7 @@ public class TransitControlerIntegrationTest { @Test void testTransitRouteCopy() { Config config = utils.loadConfig((String)null); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); config.transit().setUseTransit(true); MutableScenario scenario = (MutableScenario) ScenarioUtils.createScenario(config); diff --git a/matsim/src/test/java/org/matsim/core/mobsim/hermes/HermesTest.java b/matsim/src/test/java/org/matsim/core/mobsim/hermes/HermesTest.java index 09cb1763746..82b2139f2dd 100644 --- a/matsim/src/test/java/org/matsim/core/mobsim/hermes/HermesTest.java +++ b/matsim/src/test/java/org/matsim/core/mobsim/hermes/HermesTest.java @@ -59,6 +59,7 @@ import org.matsim.core.api.experimental.events.TeleportationArrivalEvent; import org.matsim.core.config.Config; import org.matsim.core.config.ConfigUtils; +import org.matsim.core.config.groups.RoutingConfigGroup; import org.matsim.core.controler.PrepareForSimUtils; import org.matsim.core.events.EventsUtils; import org.matsim.core.events.handler.BasicEventHandler; @@ -990,6 +991,7 @@ public static final class Fixture { public Fixture() { this.scenario = ScenarioUtils.createScenario(ConfigUtils.createConfig()); this.config = scenario.getConfig(); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); /* build network */ diff --git a/matsim/src/test/java/org/matsim/core/mobsim/hermes/StorageCapacityTest.java b/matsim/src/test/java/org/matsim/core/mobsim/hermes/StorageCapacityTest.java index fd7958999fb..a3fb4f63436 100644 --- a/matsim/src/test/java/org/matsim/core/mobsim/hermes/StorageCapacityTest.java +++ b/matsim/src/test/java/org/matsim/core/mobsim/hermes/StorageCapacityTest.java @@ -44,6 +44,7 @@ import org.matsim.core.api.experimental.events.EventsManager; import org.matsim.core.config.Config; import org.matsim.core.config.ConfigUtils; +import org.matsim.core.config.groups.RoutingConfigGroup; import org.matsim.core.events.EventsUtils; import org.matsim.core.network.NetworkUtils; import org.matsim.core.population.PersonUtils; @@ -169,6 +170,7 @@ void testStorageCapacityDownscaling() { void testStorageCapacityWithDifferentPCUs() { ScenarioImporter.flush(); Config config = ConfigUtils.createConfig(); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); config.hermes().setStuckTime(Integer.MAX_VALUE); Scenario scenario = ScenarioUtils.createScenario(config); var links = generateNetwork(scenario.getNetwork()); diff --git a/matsim/src/test/java/org/matsim/core/mobsim/qsim/FlowStorageSpillbackTest.java b/matsim/src/test/java/org/matsim/core/mobsim/qsim/FlowStorageSpillbackTest.java index dbf47866033..311831b6bad 100644 --- a/matsim/src/test/java/org/matsim/core/mobsim/qsim/FlowStorageSpillbackTest.java +++ b/matsim/src/test/java/org/matsim/core/mobsim/qsim/FlowStorageSpillbackTest.java @@ -38,6 +38,7 @@ import org.matsim.api.core.v01.population.*; import org.matsim.core.api.experimental.events.EventsManager; import org.matsim.core.config.Config; +import org.matsim.core.config.groups.RoutingConfigGroup; import org.matsim.core.controler.PrepareForSimUtils; import org.matsim.core.events.EventsUtils; import org.matsim.core.population.PopulationUtils; @@ -230,6 +231,7 @@ private Scenario loadScenario() { // (0)-----link1-----(1)-----link2-----(2)-----link3-----(3)-----link4-----(4) Config config = testUtils.loadConfig((String) null); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); Scenario scenario = (ScenarioUtils.createScenario(config)); Network network = (Network) scenario.getNetwork(); diff --git a/matsim/src/test/java/org/matsim/core/mobsim/qsim/NetsimRoutingConsistencyTest.java b/matsim/src/test/java/org/matsim/core/mobsim/qsim/NetsimRoutingConsistencyTest.java index 6899e6c95f1..e8693333c25 100644 --- a/matsim/src/test/java/org/matsim/core/mobsim/qsim/NetsimRoutingConsistencyTest.java +++ b/matsim/src/test/java/org/matsim/core/mobsim/qsim/NetsimRoutingConsistencyTest.java @@ -46,6 +46,7 @@ import org.matsim.core.api.experimental.events.EventsManager; import org.matsim.core.config.Config; import org.matsim.core.config.ConfigUtils; +import org.matsim.core.config.groups.RoutingConfigGroup; import org.matsim.core.config.groups.ScoringConfigGroup.ActivityParams; import org.matsim.core.controler.AbstractModule; import org.matsim.core.controler.Controler; @@ -213,7 +214,7 @@ void testRoutingVsSimulation() { @Test void testRoutingVsSimulationFullStack() { Config config = ConfigUtils.createConfig(); - + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); config.controller().setOverwriteFileSetting(OverwriteFileSetting.deleteDirectoryIfExists); config.controller().setLastIteration(0); diff --git a/matsim/src/test/java/org/matsim/core/mobsim/qsim/NodeTransitionTest.java b/matsim/src/test/java/org/matsim/core/mobsim/qsim/NodeTransitionTest.java index b37c5f2a32d..2b7fa92549f 100644 --- a/matsim/src/test/java/org/matsim/core/mobsim/qsim/NodeTransitionTest.java +++ b/matsim/src/test/java/org/matsim/core/mobsim/qsim/NodeTransitionTest.java @@ -43,6 +43,7 @@ import org.matsim.core.api.experimental.events.EventsManager; import org.matsim.core.config.Config; import org.matsim.core.config.ConfigUtils; +import org.matsim.core.config.groups.RoutingConfigGroup; import org.matsim.core.config.groups.ScoringConfigGroup; import org.matsim.core.config.groups.QSimConfigGroup.NodeTransition; import org.matsim.core.controler.OutputDirectoryHierarchy.OverwriteFileSetting; @@ -633,9 +634,11 @@ static Scenario createMergeScenario() { config.controller().setLastIteration(0); config.qsim().setStuckTime(24*3600); config.qsim().setRemoveStuckVehicles(false); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); ScoringConfigGroup.ActivityParams dummyAct = new ScoringConfigGroup.ActivityParams("dummy"); dummyAct.setTypicalDuration(12 * 3600); config.scoring().addActivityParams(dummyAct); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); Scenario scenario = ScenarioUtils.createScenario(config); diff --git a/matsim/src/test/java/org/matsim/core/mobsim/qsim/QSimTest.java b/matsim/src/test/java/org/matsim/core/mobsim/qsim/QSimTest.java index e33947ee22f..f1ddc6aeb87 100644 --- a/matsim/src/test/java/org/matsim/core/mobsim/qsim/QSimTest.java +++ b/matsim/src/test/java/org/matsim/core/mobsim/qsim/QSimTest.java @@ -66,6 +66,7 @@ import org.matsim.core.config.ConfigUtils; import org.matsim.core.config.groups.QSimConfigGroup; import org.matsim.core.config.groups.QSimConfigGroup.TrafficDynamics; +import org.matsim.core.config.groups.RoutingConfigGroup; import org.matsim.core.controler.PrepareForSimUtils; import org.matsim.core.events.EventsUtils; import org.matsim.core.events.ParallelEventsManager; @@ -1806,6 +1807,8 @@ public Fixture(boolean isUsingFastCapacityUpdate, int numberOfThreads) { this.config.qsim().setUsingFastCapacityUpdate(isUsingFastCapacityUpdate); this.config.qsim().setNumberOfThreads(numberOfThreads); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); + /* build network */ this.network = this.scenario.getNetwork(); this.network.setCapacityPeriod(Time.parseTime("1:00:00")); diff --git a/matsim/src/test/java/org/matsim/core/mobsim/qsim/TeleportationEngineWDistanceCheckTest.java b/matsim/src/test/java/org/matsim/core/mobsim/qsim/TeleportationEngineWDistanceCheckTest.java index 8f0286cf9cd..5fa782435f3 100644 --- a/matsim/src/test/java/org/matsim/core/mobsim/qsim/TeleportationEngineWDistanceCheckTest.java +++ b/matsim/src/test/java/org/matsim/core/mobsim/qsim/TeleportationEngineWDistanceCheckTest.java @@ -39,6 +39,7 @@ import org.matsim.api.core.v01.population.PopulationFactory; import org.matsim.core.config.Config; import org.matsim.core.config.ConfigUtils; +import org.matsim.core.config.groups.RoutingConfigGroup; import org.matsim.core.config.groups.ScoringConfigGroup.ActivityParams; import org.matsim.core.config.groups.ReplanningConfigGroup.StrategySettings; import org.matsim.core.controler.AbstractModule; @@ -64,6 +65,7 @@ final void test() { config.controller().setOutputDirectory( utils.getOutputDirectory() ); config.controller().setOverwriteFileSetting( OverwriteFileSetting.deleteDirectoryIfExists ); config.controller().setLastIteration(0); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); ActivityParams params = new ActivityParams("dummy" ) ; config.scoring().addActivityParams(params); diff --git a/matsim/src/test/java/org/matsim/core/mobsim/qsim/VehicleSourceTest.java b/matsim/src/test/java/org/matsim/core/mobsim/qsim/VehicleSourceTest.java index 9460bd95d03..367eb5d10db 100644 --- a/matsim/src/test/java/org/matsim/core/mobsim/qsim/VehicleSourceTest.java +++ b/matsim/src/test/java/org/matsim/core/mobsim/qsim/VehicleSourceTest.java @@ -36,6 +36,7 @@ import org.matsim.api.core.v01.population.*; import org.matsim.core.config.Config; import org.matsim.core.config.ConfigUtils; +import org.matsim.core.config.groups.RoutingConfigGroup; import org.matsim.core.config.groups.ScoringConfigGroup.ActivityParams; import org.matsim.core.config.groups.QSimConfigGroup; import org.matsim.core.config.groups.QSimConfigGroup.VehiclesSource; @@ -94,6 +95,7 @@ void main(VehiclesSource vehiclesSource, boolean usingPersonIdForMissingVehicleI createPlans(vehiclesSource, providingVehiclesInPerson); Config config = scenario.getConfig(); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); config.qsim().setFlowCapFactor(1.0); config.qsim().setStorageCapFactor(1.0); config.qsim().setMainModes(Arrays.asList(transportModes)); diff --git a/matsim/src/test/java/org/matsim/core/mobsim/qsim/pt/QSimIntegrationTest.java b/matsim/src/test/java/org/matsim/core/mobsim/qsim/pt/QSimIntegrationTest.java index 25234b89cd0..078d2355b42 100644 --- a/matsim/src/test/java/org/matsim/core/mobsim/qsim/pt/QSimIntegrationTest.java +++ b/matsim/src/test/java/org/matsim/core/mobsim/qsim/pt/QSimIntegrationTest.java @@ -44,6 +44,7 @@ import org.matsim.core.api.experimental.events.VehicleDepartsAtFacilityEvent; import org.matsim.core.config.Config; import org.matsim.core.config.ConfigUtils; +import org.matsim.core.config.groups.RoutingConfigGroup; import org.matsim.core.controler.PrepareForSimUtils; import org.matsim.core.events.EventsUtils; import org.matsim.core.mobsim.qsim.QSimBuilder; @@ -425,7 +426,8 @@ private static class Fixture { public Fixture() throws SAXException, ParserConfigurationException, IOException { // setup: config final Config config = ConfigUtils.createConfig(); - config.transit().setUseTransit(true); + config.transit().setUseTransit(true); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); config.qsim().setEndTime(8.0*3600); this.scenario = (MutableScenario) ScenarioUtils.createScenario(config); diff --git a/matsim/src/test/java/org/matsim/core/mobsim/qsim/pt/TransitAgentTest.java b/matsim/src/test/java/org/matsim/core/mobsim/qsim/pt/TransitAgentTest.java index 59c7341e27e..7b73108a13f 100644 --- a/matsim/src/test/java/org/matsim/core/mobsim/qsim/pt/TransitAgentTest.java +++ b/matsim/src/test/java/org/matsim/core/mobsim/qsim/pt/TransitAgentTest.java @@ -39,7 +39,9 @@ import org.matsim.api.core.v01.population.Plan; import org.matsim.api.core.v01.population.PopulationFactory; import org.matsim.core.api.experimental.events.EventsManager; +import org.matsim.core.config.Config; import org.matsim.core.config.ConfigUtils; +import org.matsim.core.config.groups.RoutingConfigGroup; import org.matsim.core.controler.PrepareForSimUtils; import org.matsim.core.events.EventsUtils; import org.matsim.core.mobsim.qsim.QSim; @@ -65,7 +67,9 @@ public class TransitAgentTest { @Test void testAcceptLineRoute() { - MutableScenario scenario = (MutableScenario) ScenarioUtils.createScenario(ConfigUtils.createConfig()); + Config config = ConfigUtils.createConfig(); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); + MutableScenario scenario = (MutableScenario) ScenarioUtils.createScenario(config); Network network = (Network) scenario.getNetwork(); Node node1 = NetworkUtils.createAndAddNode(network, Id.create("1", Node.class), new Coord((double) 0, (double) 0)); @@ -117,7 +121,9 @@ void testAcceptLineRoute() { @Test void testArriveAtStop() { - MutableScenario scenario = (MutableScenario) ScenarioUtils.createScenario(ConfigUtils.createConfig()); + Config config = ConfigUtils.createConfig(); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); + MutableScenario scenario = (MutableScenario) ScenarioUtils.createScenario(config); Network network = (Network) scenario.getNetwork(); Node node1 = NetworkUtils.createAndAddNode(network, Id.create("1", Node.class), new Coord((double) 0, (double) 0)); diff --git a/matsim/src/test/java/org/matsim/core/mobsim/qsim/pt/TransitQueueSimulationTest.java b/matsim/src/test/java/org/matsim/core/mobsim/qsim/pt/TransitQueueSimulationTest.java index 914190b0228..49b9395d2be 100644 --- a/matsim/src/test/java/org/matsim/core/mobsim/qsim/pt/TransitQueueSimulationTest.java +++ b/matsim/src/test/java/org/matsim/core/mobsim/qsim/pt/TransitQueueSimulationTest.java @@ -63,6 +63,7 @@ import org.matsim.core.config.Config; import org.matsim.core.config.ConfigUtils; import org.matsim.core.config.groups.ExternalMobimConfigGroup; +import org.matsim.core.config.groups.RoutingConfigGroup; import org.matsim.core.controler.PrepareForSimUtils; import org.matsim.core.events.EventsUtils; import org.matsim.core.events.handler.BasicEventHandler; @@ -631,6 +632,7 @@ protected SpyHandleStopData(final TransitStopFacility stopFacility, final double @Test void testStartAndEndTime() { final Config config = ConfigUtils.createConfig(); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); config.transit().setUseTransit(true); MutableScenario scenario = (MutableScenario) ScenarioUtils.createScenario(config); diff --git a/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/DeparturesOnSameLinkSameTimeTest.java b/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/DeparturesOnSameLinkSameTimeTest.java index bc69576a7f2..f603260e3ce 100644 --- a/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/DeparturesOnSameLinkSameTimeTest.java +++ b/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/DeparturesOnSameLinkSameTimeTest.java @@ -34,6 +34,7 @@ import org.matsim.core.config.Config; import org.matsim.core.config.ConfigUtils; import org.matsim.core.config.groups.QSimConfigGroup.VehiclesSource; +import org.matsim.core.config.groups.RoutingConfigGroup; import org.matsim.core.controler.PrepareForSimUtils; import org.matsim.core.events.EventsUtils; import org.matsim.core.mobsim.qsim.QSimBuilder; @@ -147,6 +148,7 @@ public PseudoInputs(String travelMode) { config=ConfigUtils.createConfig(); this.scenario = ScenarioUtils.loadScenario(config); config.qsim().setMainModes(Arrays.asList(travelMode)); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); //following is necessary for mixed traffic, providing a route was obstructing // the requirement of these which might be all right in some cases. Amit Jan'18 diff --git a/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/FlowEfficiencyCalculatorTest.java b/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/FlowEfficiencyCalculatorTest.java index 2d373a8e2b1..89594e75077 100644 --- a/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/FlowEfficiencyCalculatorTest.java +++ b/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/FlowEfficiencyCalculatorTest.java @@ -37,6 +37,7 @@ import org.matsim.core.api.experimental.events.EventsManager; import org.matsim.core.config.Config; import org.matsim.core.config.ConfigUtils; +import org.matsim.core.config.groups.RoutingConfigGroup; import org.matsim.core.config.groups.ScoringConfigGroup.ActivityParams; import org.matsim.core.controler.AbstractModule; import org.matsim.core.controler.Controler; @@ -132,6 +133,7 @@ private Scenario createScenario() { Config config = ConfigUtils.createConfig(); config.controller().setOverwriteFileSetting(OverwriteFileSetting.deleteDirectoryIfExists); config.controller().setLastIteration(0); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); ActivityParams genericParams = new ActivityParams("generic"); genericParams.setTypicalDuration(1.0); diff --git a/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/JavaRoundingErrorInQsimTest.java b/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/JavaRoundingErrorInQsimTest.java index ca771b4156c..bf41bf3241c 100644 --- a/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/JavaRoundingErrorInQsimTest.java +++ b/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/JavaRoundingErrorInQsimTest.java @@ -39,6 +39,7 @@ import org.matsim.api.core.v01.population.*; import org.matsim.core.api.experimental.events.EventsManager; import org.matsim.core.config.ConfigUtils; +import org.matsim.core.config.groups.RoutingConfigGroup; import org.matsim.core.controler.PrepareForSimUtils; import org.matsim.core.events.EventsUtils; import org.matsim.core.mobsim.qsim.QSimBuilder; @@ -142,6 +143,7 @@ private static final class PseudoInputs{ public PseudoInputs(){ scenario = ScenarioUtils.createScenario(ConfigUtils.createConfig()); scenario.getConfig().qsim().setUsingFastCapacityUpdate(true); + scenario.getConfig().routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); population = scenario.getPopulation(); } diff --git a/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/LinkSpeedCalculatorIntegrationTest.java b/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/LinkSpeedCalculatorIntegrationTest.java index 2a6554df93d..c84fa35e061 100644 --- a/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/LinkSpeedCalculatorIntegrationTest.java +++ b/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/LinkSpeedCalculatorIntegrationTest.java @@ -39,6 +39,7 @@ import org.matsim.core.api.experimental.events.EventsManager; import org.matsim.core.config.Config; import org.matsim.core.config.ConfigUtils; +import org.matsim.core.config.groups.RoutingConfigGroup; import org.matsim.core.controler.Injector; import org.matsim.core.controler.OutputDirectoryHierarchy.OverwriteFileSetting; import org.matsim.core.controler.PrepareForSimUtils; @@ -222,7 +223,9 @@ static class Fixture { Scenario scenario; public Fixture() { - this.scenario = ScenarioUtils.createScenario(ConfigUtils.createConfig()); + Config config = ConfigUtils.createConfig(); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); + this.scenario = ScenarioUtils.createScenario(config); Id[] nodeIds = new Id[5]; for (int i = 0; i < nodeIds.length; i++) { diff --git a/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/PassingTest.java b/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/PassingTest.java index a145ecf6c39..2db8d64118c 100644 --- a/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/PassingTest.java +++ b/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/PassingTest.java @@ -38,6 +38,7 @@ import org.matsim.core.config.Config; import org.matsim.core.config.ConfigUtils; import org.matsim.core.config.groups.QSimConfigGroup; +import org.matsim.core.config.groups.RoutingConfigGroup; import org.matsim.core.controler.PrepareForSimUtils; import org.matsim.core.controler.events.IterationEndsEvent; import org.matsim.core.controler.events.StartupEvent; @@ -182,6 +183,7 @@ public SimpleNetwork(){ config.qsim().setStorageCapFactor(1.0); config.qsim().setMainModes(Arrays.asList("car","bike")); config.qsim().setLinkDynamics(QSimConfigGroup.LinkDynamics.PassingQ); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); network = (Network) scenario.getNetwork(); this.network.setCapacityPeriod(Time.parseTime("1:00:00")); diff --git a/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/QLinkLanesTest.java b/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/QLinkLanesTest.java index 53794c1f44a..ba289374fe9 100644 --- a/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/QLinkLanesTest.java +++ b/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/QLinkLanesTest.java @@ -33,6 +33,7 @@ import org.matsim.core.api.experimental.events.EventsManager; import org.matsim.core.config.Config; import org.matsim.core.config.ConfigUtils; +import org.matsim.core.config.groups.RoutingConfigGroup; import org.matsim.core.controler.PrepareForSimUtils; import org.matsim.core.events.EventsUtils; import org.matsim.core.mobsim.qsim.QSim; @@ -137,6 +138,7 @@ private static void createThreeLanes(Scenario scenario) { @Test void testCapacityWoLanes() { Config config = ConfigUtils.createConfig(); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); MutableScenario scenario = (MutableScenario) ScenarioUtils.createScenario(config); initNetwork(scenario.getNetwork()); @@ -155,6 +157,7 @@ void testCapacityWoLanes() { @Test void testCapacityWithOneLaneOneLane() { Config config = ConfigUtils.createConfig(); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); MutableScenario scenario = (MutableScenario) ScenarioUtils.createScenario(config); initNetwork(scenario.getNetwork()); createOneLane(scenario, 1); @@ -191,6 +194,7 @@ void testCapacityWithOneLaneOneLane() { @Test void testCapacityWithOneLaneTwoLanes() { Config config = ConfigUtils.createConfig(); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); MutableScenario scenario = (MutableScenario) ScenarioUtils.createScenario(config); initNetwork(scenario.getNetwork()); createOneLane(scenario, 2); @@ -228,6 +232,7 @@ void testCapacityWithOneLaneTwoLanes() { @Test void testCapacityWithLanes() { Config config = ConfigUtils.createConfig(); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); MutableScenario scenario = (MutableScenario) ScenarioUtils.createScenario(config); initNetwork(scenario.getNetwork()); createThreeLanes(scenario); diff --git a/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/QLinkTest.java b/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/QLinkTest.java index 394ef272b28..93e9ed84e07 100644 --- a/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/QLinkTest.java +++ b/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/QLinkTest.java @@ -46,6 +46,7 @@ import org.matsim.core.api.experimental.events.EventsManager; import org.matsim.core.config.Config; import org.matsim.core.config.ConfigUtils; +import org.matsim.core.config.groups.RoutingConfigGroup; import org.matsim.core.controler.PrepareForSimUtils; import org.matsim.core.events.EventsUtils; import org.matsim.core.gbl.MatsimRandom; @@ -313,6 +314,7 @@ void testGetVehicle_Departing(boolean isUsingFastCapacityUpdate) { @ValueSource(booleans = {true, false}) void testBuffer(boolean isUsingFastCapacityUpdate) { Config conf = utils.loadConfig((String)null); + conf.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); conf.qsim().setUsingFastCapacityUpdate(isUsingFastCapacityUpdate); @@ -543,6 +545,7 @@ void testStuckEvents(boolean isUsingFastCapacityUpdate) { Scenario scenario = ScenarioUtils.createScenario(ConfigUtils.createConfig()); scenario.getConfig().qsim().setStuckTime(100); scenario.getConfig().qsim().setRemoveStuckVehicles(true); + scenario.getConfig().routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); MatsimRandom.reset(4711); // yyyyyy !!!!!! Network network = (Network) scenario.getNetwork(); network.setCapacityPeriod(3600.0); @@ -622,6 +625,7 @@ private static final class Fixture { this.scenario.getConfig().qsim().setStuckTime(100); this.scenario.getConfig().qsim().setRemoveStuckVehicles(true); this.scenario.getConfig().qsim().setUsingFastCapacityUpdate(usingFastCapacityUpdate); + this.scenario.getConfig().routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); Network network = (Network) this.scenario.getNetwork(); network.setCapacityPeriod(3600.0); diff --git a/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/SeepageTest.java b/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/SeepageTest.java index c562b59987b..081028398b1 100644 --- a/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/SeepageTest.java +++ b/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/SeepageTest.java @@ -40,6 +40,7 @@ import org.matsim.core.config.ConfigUtils; import org.matsim.core.config.groups.QSimConfigGroup.LinkDynamics; import org.matsim.core.config.groups.QSimConfigGroup.VehiclesSource; +import org.matsim.core.config.groups.RoutingConfigGroup; import org.matsim.core.controler.PrepareForSimUtils; import org.matsim.core.events.EventsUtils; import org.matsim.core.mobsim.qsim.QSimBuilder; @@ -170,6 +171,7 @@ public SimpleNetwork(){ config.qsim().setStorageCapFactor(1.0); config.qsim().setMainModes(Arrays.asList(TransportMode.car,TransportMode.walk)); config.qsim().setLinkDynamics(LinkDynamics.SeepageQ); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); config.qsim().setSeepModes(Arrays.asList(TransportMode.walk) ); config.qsim().setSeepModeStorageFree(false); diff --git a/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/SimulatedLaneFlowCapacityTest.java b/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/SimulatedLaneFlowCapacityTest.java index 018ef7c995f..36d56ad9d2c 100644 --- a/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/SimulatedLaneFlowCapacityTest.java +++ b/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/SimulatedLaneFlowCapacityTest.java @@ -48,6 +48,7 @@ import org.matsim.core.api.experimental.events.handler.LaneLeaveEventHandler; import org.matsim.core.config.Config; import org.matsim.core.config.ConfigUtils; +import org.matsim.core.config.groups.RoutingConfigGroup; import org.matsim.core.config.groups.ScoringConfigGroup.ActivityParams; import org.matsim.core.controler.PrepareForSimUtils; import org.matsim.core.events.EventsUtils; @@ -210,6 +211,7 @@ private static void initPopulation(Population population) { @Test void testCapacityWoLanes() { Config config = ConfigUtils.createConfig(); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); ActivityParams dummyAct = new ActivityParams("dummy"); dummyAct.setTypicalDuration(12 * 3600); config.scoring().addActivityParams(dummyAct); @@ -238,6 +240,7 @@ void testCapacityWoLanes() { @Test void testCapacityWithOneLaneOneLane() { Config config = ConfigUtils.createConfig(); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); ActivityParams dummyAct = new ActivityParams("dummy"); dummyAct.setTypicalDuration(12 * 3600); config.scoring().addActivityParams(dummyAct); @@ -270,6 +273,7 @@ void testCapacityWithOneLaneOneLane() { @Test void testCapacityWithOneLaneTwoLanes() { Config config = ConfigUtils.createConfig(); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); ActivityParams dummyAct = new ActivityParams("dummy"); dummyAct.setTypicalDuration(12 * 3600); config.scoring().addActivityParams(dummyAct); @@ -303,6 +307,7 @@ void testCapacityWithOneLaneTwoLanes() { @Test void testCapacityWithThreeLanes() { Config config = ConfigUtils.createConfig(); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); ActivityParams dummyAct = new ActivityParams("dummy"); dummyAct.setTypicalDuration(12 * 3600); config.scoring().addActivityParams(dummyAct); diff --git a/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/VehVsLinkSpeedTest.java b/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/VehVsLinkSpeedTest.java index 820914fc323..51d9f80872f 100644 --- a/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/VehVsLinkSpeedTest.java +++ b/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/VehVsLinkSpeedTest.java @@ -39,6 +39,7 @@ import org.matsim.core.config.Config; import org.matsim.core.config.ConfigUtils; import org.matsim.core.config.groups.QSimConfigGroup; +import org.matsim.core.config.groups.RoutingConfigGroup; import org.matsim.core.controler.PrepareForSimUtils; import org.matsim.core.events.EventsUtils; import org.matsim.core.mobsim.qsim.QSimBuilder; @@ -128,6 +129,7 @@ public SimpleNetwork(){ config.qsim().setMainModes(Arrays.asList("car")); config.qsim().setLinkDynamics(QSimConfigGroup.LinkDynamics.PassingQ); config.qsim().setVehiclesSource(QSimConfigGroup.VehiclesSource.modeVehicleTypesFromVehiclesData); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); network = (Network) scenario.getNetwork(); this.network.setCapacityPeriod(Time.parseTime("1:00:00")); diff --git a/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/VehicleHandlerTest.java b/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/VehicleHandlerTest.java index 292ae461e58..bfaac4a4eaa 100644 --- a/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/VehicleHandlerTest.java +++ b/matsim/src/test/java/org/matsim/core/mobsim/qsim/qnetsimengine/VehicleHandlerTest.java @@ -43,6 +43,7 @@ import org.matsim.core.api.experimental.events.EventsManager; import org.matsim.core.config.Config; import org.matsim.core.config.ConfigUtils; +import org.matsim.core.config.groups.RoutingConfigGroup; import org.matsim.core.config.groups.ScoringConfigGroup.ActivityParams; import org.matsim.core.controler.AbstractModule; import org.matsim.core.controler.Controler; @@ -184,6 +185,7 @@ public void handleEvent(PersonArrivalEvent event) { private Scenario createScenario() { Config config = ConfigUtils.createConfig(); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); config.controller().setOverwriteFileSetting(OverwriteFileSetting.deleteDirectoryIfExists); config.controller().setLastIteration(0); config.controller().setOutputDirectory(utils.getOutputDirectory()); diff --git a/matsim/src/test/java/org/matsim/core/network/io/NetworkReprojectionIOTest.java b/matsim/src/test/java/org/matsim/core/network/io/NetworkReprojectionIOTest.java index 8398f1a7db1..3e0170943e9 100644 --- a/matsim/src/test/java/org/matsim/core/network/io/NetworkReprojectionIOTest.java +++ b/matsim/src/test/java/org/matsim/core/network/io/NetworkReprojectionIOTest.java @@ -32,6 +32,7 @@ import org.matsim.api.core.v01.network.Node; import org.matsim.core.config.Config; import org.matsim.core.config.ConfigUtils; +import org.matsim.core.config.groups.RoutingConfigGroup; import org.matsim.core.controler.Controler; import org.matsim.core.network.NetworkUtils; import org.matsim.core.scenario.ProjectionUtils; @@ -119,6 +120,7 @@ void testWithControlerAndAttributes() { new NetworkWriter( initialNetwork ).write( networkFile ); final Config config = ConfigUtils.createConfig(); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); config.network().setInputFile( networkFile ); // web mercator. This would be a pretty silly choice for simulation, @@ -171,6 +173,7 @@ void testWithControlerAndConfigParameters() { new NetworkWriter( initialNetwork ).write( networkFile ); final Config config = ConfigUtils.createConfig(); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); config.network().setInputFile( networkFile ); config.network().setInputCRS( INITIAL_CRS ); diff --git a/matsim/src/test/java/org/matsim/core/router/FallbackRoutingModuleTest.java b/matsim/src/test/java/org/matsim/core/router/FallbackRoutingModuleTest.java index b2654bc7734..ecfb14eefe0 100644 --- a/matsim/src/test/java/org/matsim/core/router/FallbackRoutingModuleTest.java +++ b/matsim/src/test/java/org/matsim/core/router/FallbackRoutingModuleTest.java @@ -20,6 +20,7 @@ import org.matsim.core.config.Config; import org.matsim.core.config.ConfigUtils; import org.matsim.core.config.groups.ReplanningConfigGroup; +import org.matsim.core.config.groups.RoutingConfigGroup; import org.matsim.core.controler.AbstractModule; import org.matsim.core.controler.Controler; import org.matsim.core.replanning.strategies.DefaultPlanStrategiesModule; @@ -33,6 +34,7 @@ public class FallbackRoutingModuleTest{ void calcRoute(){ Config config = ConfigUtils.createConfig(); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); config.controller().setOutputDirectory( utils.getOutputDirectory() ); config.controller().setLastIteration( 1 ); diff --git a/matsim/src/test/java/org/matsim/core/router/NetworkRoutingInclAccessEgressModuleTest.java b/matsim/src/test/java/org/matsim/core/router/NetworkRoutingInclAccessEgressModuleTest.java index 392a301d1c4..6781d0872d2 100644 --- a/matsim/src/test/java/org/matsim/core/router/NetworkRoutingInclAccessEgressModuleTest.java +++ b/matsim/src/test/java/org/matsim/core/router/NetworkRoutingInclAccessEgressModuleTest.java @@ -181,6 +181,7 @@ private static List> getNetworkRoute(List elements) { void calcRoute_modeVehiclesFromVehiclesData_differentTypesTakeDifferentRoutes() { Config config = createConfig(); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); // set test specific things Collection modes = Arrays.asList(SLOW_MODE, FAST_MODE); @@ -234,6 +235,7 @@ void calcRoute_modeVehiclesFromVehiclesData_differentTypesTakeDifferentRoutes() void calcRoute_defaultVehicle_defaultVehicleIsAssigned() { Config config = createConfig(); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); config.qsim().setVehiclesSource(QSimConfigGroup.VehiclesSource.defaultVehicle); Scenario scenario = createScenario(config); @@ -266,7 +268,8 @@ void useAccessEgressTimeFromLinkAttributes() { Config config = createConfig(); config.qsim().setVehiclesSource(QSimConfigGroup.VehiclesSource.defaultVehicle); config.routing().setAccessEgressType(RoutingConfigGroup.AccessEgressType.walkConstantTimeToLink); - Scenario scenario = createScenario(config); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); + Scenario scenario = createScenario(config); NetworkUtils.setLinkAccessTime(scenario.getNetwork().getLinks().get(Id.createLinkId(START_LINK)),TransportMode.car,75); NetworkUtils.setLinkEgressTime(scenario.getNetwork().getLinks().get(Id.createLinkId(END_LINK)),TransportMode.car,180); // add persons @@ -285,6 +288,7 @@ void useAccessEgressTimeFromLinkAttributes() { void useAccessEgressTimeFromConstantAndWalkTime() { Config config = createConfig(); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); config.qsim().setVehiclesSource(QSimConfigGroup.VehiclesSource.defaultVehicle); config.routing().setAccessEgressType(RoutingConfigGroup.AccessEgressType.accessEgressModeToLinkPlusTimeConstant); Scenario scenario = createScenario(config); @@ -308,6 +312,7 @@ void useAccessEgressTimeFromConstantAndWalkTime() { void routingModeInEvents() { Config config = createConfig(); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); config.qsim().setVehiclesSource(QSimConfigGroup.VehiclesSource.defaultVehicle); config.routing().setAccessEgressType(RoutingConfigGroup.AccessEgressType.accessEgressModeToLinkPlusTimeConstant); Scenario scenario = createScenario(config); @@ -352,6 +357,7 @@ void failifNoAccessTimeSet() { Config config = createConfig(); config.qsim().setVehiclesSource(QSimConfigGroup.VehiclesSource.defaultVehicle); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); config.routing().setAccessEgressType(RoutingConfigGroup.AccessEgressType.walkConstantTimeToLink); Scenario scenario = createScenario(config); NetworkUtils.setLinkAccessTime(scenario.getNetwork().getLinks().get(Id.createLinkId(START_LINK)), TransportMode.car, 75); @@ -385,6 +391,7 @@ void calcAccessTimeFromDistanceToLink() { Config config = createConfig(); config.qsim().setVehiclesSource(QSimConfigGroup.VehiclesSource.defaultVehicle); config.routing().setAccessEgressType(RoutingConfigGroup.AccessEgressType.accessEgressModeToLink); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); Scenario scenario = createScenario(config); NetworkUtils.setLinkAccessTime(scenario.getNetwork().getLinks().get(Id.createLinkId(START_LINK)),TransportMode.car,75); NetworkUtils.setLinkAccessTime(scenario.getNetwork().getLinks().get(Id.createLinkId(END_LINK)),TransportMode.car,180); @@ -410,6 +417,7 @@ void noBushwackingLegs() { Config config = createConfig(); config.qsim().setVehiclesSource(QSimConfigGroup.VehiclesSource.defaultVehicle); config.routing().setAccessEgressType(AccessEgressType.none); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); Scenario scenario = createScenario(config); NetworkUtils.setLinkAccessTime(scenario.getNetwork().getLinks().get(Id.createLinkId(START_LINK)),TransportMode.car,75); NetworkUtils.setLinkAccessTime(scenario.getNetwork().getLinks().get(Id.createLinkId(END_LINK)),TransportMode.car,180); diff --git a/matsim/src/test/java/org/matsim/core/router/PseudoTransitRoutingModuleTest.java b/matsim/src/test/java/org/matsim/core/router/PseudoTransitRoutingModuleTest.java index 74f366f4864..60a48326aeb 100644 --- a/matsim/src/test/java/org/matsim/core/router/PseudoTransitRoutingModuleTest.java +++ b/matsim/src/test/java/org/matsim/core/router/PseudoTransitRoutingModuleTest.java @@ -37,6 +37,7 @@ import org.matsim.api.core.v01.population.Person; import org.matsim.api.core.v01.population.PlanElement; import org.matsim.core.config.ConfigUtils; +import org.matsim.core.config.groups.RoutingConfigGroup; import org.matsim.core.config.groups.RoutingConfigGroup.TeleportedModeParams; import org.matsim.core.controler.AbstractModule; import org.matsim.core.controler.ControlerDefaultsModule; @@ -135,6 +136,7 @@ private static class Fixture { public Fixture() { s.getConfig().controller().setOverwriteFileSetting(OverwriteFileSetting.deleteDirectoryIfExists); + s.getConfig().routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); TeleportedModeParams walk = new TeleportedModeParams(TransportMode.walk); walk.setBeelineDistanceFactor(1.3); walk.setTeleportedModeSpeed(3.0 / 3.6); diff --git a/matsim/src/test/java/org/matsim/core/router/TripRouterFactoryImplTest.java b/matsim/src/test/java/org/matsim/core/router/TripRouterFactoryImplTest.java index d2a23b546a1..bd671737a31 100644 --- a/matsim/src/test/java/org/matsim/core/router/TripRouterFactoryImplTest.java +++ b/matsim/src/test/java/org/matsim/core/router/TripRouterFactoryImplTest.java @@ -66,6 +66,7 @@ public class TripRouterFactoryImplTest { void testRestrictedNetworkNoPt() throws Exception { Config config = ConfigUtils.createConfig(); config.transit().setUseTransit( false ); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); testRestrictedNetwork( config ); } @@ -153,6 +154,7 @@ public void install() { @Test void testMonomodalNetwork() throws Exception { final Config config = ConfigUtils.createConfig(); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); final Scenario scenario = ScenarioUtils.createScenario( config ); Network net = scenario.getNetwork(); diff --git a/matsim/src/test/java/org/matsim/core/utils/timing/TimeInterpretationTest.java b/matsim/src/test/java/org/matsim/core/utils/timing/TimeInterpretationTest.java index d771d585de9..497f1233891 100644 --- a/matsim/src/test/java/org/matsim/core/utils/timing/TimeInterpretationTest.java +++ b/matsim/src/test/java/org/matsim/core/utils/timing/TimeInterpretationTest.java @@ -39,6 +39,7 @@ import org.matsim.api.core.v01.population.PopulationFactory; import org.matsim.core.config.Config; import org.matsim.core.config.ConfigUtils; +import org.matsim.core.config.groups.RoutingConfigGroup; import org.matsim.core.config.groups.ScoringConfigGroup.ActivityParams; import org.matsim.core.config.groups.PlansConfigGroup.TripDurationHandling; import org.matsim.core.controler.Controler; @@ -55,6 +56,7 @@ public class TimeInterpretationTest { @Test void testIgnoreDelays() { Config config = ConfigUtils.createConfig(); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); config.plans().setTripDurationHandling(TripDurationHandling.ignoreDelays); Controler controller = prepareController(config); @@ -76,6 +78,7 @@ void testIgnoreDelays() { @Test void testShiftActivityEndTime() { Config config = ConfigUtils.createConfig(); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); config.plans().setTripDurationHandling(TripDurationHandling.shiftActivityEndTimes); Controler controller = prepareController(config); diff --git a/matsim/src/test/java/org/matsim/integration/SimulateAndScoreTest.java b/matsim/src/test/java/org/matsim/integration/SimulateAndScoreTest.java index 9bd875631c0..6c57b14d3ca 100644 --- a/matsim/src/test/java/org/matsim/integration/SimulateAndScoreTest.java +++ b/matsim/src/test/java/org/matsim/integration/SimulateAndScoreTest.java @@ -43,6 +43,7 @@ import org.matsim.core.api.experimental.events.EventsManager; import org.matsim.core.config.Config; import org.matsim.core.config.ConfigUtils; +import org.matsim.core.config.groups.RoutingConfigGroup; import org.matsim.core.config.groups.ScoringConfigGroup; import org.matsim.core.controler.AbstractModule; import org.matsim.core.controler.Injector; @@ -89,6 +90,7 @@ public class SimulateAndScoreTest { @Test void testRealPtScore() { final Config config = ConfigUtils.createConfig(); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); config.transit().setUseTransit(true); ScoringConfigGroup.ActivityParams h = new ScoringConfigGroup.ActivityParams("h"); @@ -240,7 +242,9 @@ public void install() { @Test void testTeleportationScore() { - Scenario scenario = ScenarioUtils.createScenario(ConfigUtils.createConfig()); + Config config = ConfigUtils.createConfig(); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); + Scenario scenario = ScenarioUtils.createScenario(config); Network network = scenario.getNetwork(); Node node1 = network.getFactory().createNode(Id.create("1", Node.class), new Coord(0, 0)); Node node2 = network.getFactory().createNode(Id.create("2", Node.class), new Coord(100, 0)); diff --git a/matsim/src/test/java/org/matsim/integration/replanning/ChangeTripModeIntegrationTest.java b/matsim/src/test/java/org/matsim/integration/replanning/ChangeTripModeIntegrationTest.java index e3d4651b7e0..950434f316d 100644 --- a/matsim/src/test/java/org/matsim/integration/replanning/ChangeTripModeIntegrationTest.java +++ b/matsim/src/test/java/org/matsim/integration/replanning/ChangeTripModeIntegrationTest.java @@ -38,6 +38,7 @@ import org.matsim.api.core.v01.population.Population; import org.matsim.core.config.Config; import org.matsim.core.config.groups.ReplanningConfigGroup.StrategySettings; +import org.matsim.core.config.groups.RoutingConfigGroup; import org.matsim.core.controler.AbstractModule; import org.matsim.core.controler.Injector; import org.matsim.core.controler.NewControlerModule; @@ -78,6 +79,7 @@ public class ChangeTripModeIntegrationTest { void testStrategyManagerConfigLoaderIntegration() { // setup config final Config config = utils.loadConfig((String)null); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); final MutableScenario scenario = (MutableScenario) ScenarioUtils.createScenario(config); final StrategySettings strategySettings = new StrategySettings(Id.create("1", StrategySettings.class)); strategySettings.setStrategyName("ChangeTripMode"); diff --git a/matsim/src/test/java/org/matsim/integration/timevariantnetworks/QSimIntegrationTest.java b/matsim/src/test/java/org/matsim/integration/timevariantnetworks/QSimIntegrationTest.java index 609737eb135..0ff9f20a69a 100644 --- a/matsim/src/test/java/org/matsim/integration/timevariantnetworks/QSimIntegrationTest.java +++ b/matsim/src/test/java/org/matsim/integration/timevariantnetworks/QSimIntegrationTest.java @@ -50,6 +50,7 @@ import org.matsim.api.core.v01.population.Population; import org.matsim.core.api.experimental.events.EventsManager; import org.matsim.core.config.Config; +import org.matsim.core.config.groups.RoutingConfigGroup; import org.matsim.core.controler.PrepareForSimUtils; import org.matsim.core.events.EventsUtils; import org.matsim.core.mobsim.qsim.QSimBuilder; @@ -82,6 +83,7 @@ public class QSimIntegrationTest { @Test void testFreespeed() { Config config = utils.loadConfig((String)null); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); config.network().setTimeVariantNetwork(true); Scenario scenario = ScenarioUtils.createScenario(config); @@ -203,6 +205,7 @@ void testZeroCapacity() { final double capacityFactor = 0.0; Config config = utils.loadConfig((String)null); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); config.network().setTimeVariantNetwork(true); config.qsim().setStartTime(0.0); final double simEndTime = 7200.0; diff --git a/matsim/src/test/java/org/matsim/withinday/controller/ExperiencedPlansWriterTest.java b/matsim/src/test/java/org/matsim/withinday/controller/ExperiencedPlansWriterTest.java index bad57d42cc7..e6cc6ff0c15 100644 --- a/matsim/src/test/java/org/matsim/withinday/controller/ExperiencedPlansWriterTest.java +++ b/matsim/src/test/java/org/matsim/withinday/controller/ExperiencedPlansWriterTest.java @@ -38,6 +38,7 @@ import org.matsim.core.config.Config; import org.matsim.core.config.ConfigUtils; import org.matsim.core.config.groups.ControllerConfigGroup; +import org.matsim.core.config.groups.RoutingConfigGroup; import org.matsim.core.config.groups.ScoringConfigGroup.ActivityParams; import org.matsim.core.controler.AbstractModule; import org.matsim.core.controler.Controler; @@ -82,6 +83,7 @@ void testWriteFile() { Config config = ConfigUtils.createConfig(); config.controller().setOutputDirectory(this.utils.getOutputDirectory()); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); config.qsim().setEndTime(24 * 3600); diff --git a/matsim/src/test/java/org/matsim/withinday/trafficmonitoring/WithinDayTravelTimeWithNetworkChangeEventsTest.java b/matsim/src/test/java/org/matsim/withinday/trafficmonitoring/WithinDayTravelTimeWithNetworkChangeEventsTest.java index 2b63bbb9f0d..1de5fb1096d 100644 --- a/matsim/src/test/java/org/matsim/withinday/trafficmonitoring/WithinDayTravelTimeWithNetworkChangeEventsTest.java +++ b/matsim/src/test/java/org/matsim/withinday/trafficmonitoring/WithinDayTravelTimeWithNetworkChangeEventsTest.java @@ -43,6 +43,7 @@ import org.matsim.core.config.Config; import org.matsim.core.config.ConfigUtils; import org.matsim.core.config.groups.ControllerConfigGroup; +import org.matsim.core.config.groups.RoutingConfigGroup; import org.matsim.core.config.groups.ScoringConfigGroup.ActivityParams; import org.matsim.core.controler.AbstractModule; import org.matsim.core.controler.Controler; @@ -77,6 +78,7 @@ final void testTTviaMobSimAfterSimStepListener() { String outputDirectory = testUtils.getOutputDirectory() + "output_TTviaMobsimAfterSimStepListener/"; final Config config = ConfigUtils.createConfig(); + config.routing().setNetworkRouteConsistencyCheck(RoutingConfigGroup.NetworkRouteConsistencyCheck.disable); config.controller().setFirstIteration(0); config.controller().setLastIteration(0);