this.setSearchRadius(trConfig.getSearchRadius()); this.setExtensionRadius(trConfig.getExtensionRadius()); this.setBeelineWalkConnectionDistance(trConfig.getMaxBeelineWalkConnectionDistance());
/** * Tests that if only a single transfer-/walk-link is found, the router correctly only returns * on walk leg from start to end. */ @Test public void testSingleWalkOnly() { WalkFixture f = new WalkFixture(); f.routerConfig.setSearchRadius(0.8 * CoordUtils.calcEuclideanDistance(f.coord2, f.coord4)); f.routerConfig.setExtensionRadius(0.0); TransitRouter router = createTransitRouter(f.schedule, f.routerConfig, routerType); List<Leg> legs = router.calcRoute(new FakeFacility(f.coord2), new FakeFacility(f.coord4), 990, null); assertEquals(1, legs.size()); assertEquals(TransportMode.transit_walk, legs.get(0).getMode()); }
/** * Tests that if only exactly two transfer-/walk-link are found, the router correctly only returns * on walk leg from start to end. Differs from {@link #testSingleWalkOnly()} in that it tests for * the correct internal working when more than one walk links are returned. */ @Test public void testDoubleWalkOnly() { WalkFixture f = new WalkFixture(); f.routerConfig.setSearchRadius(0.8 * CoordUtils.calcEuclideanDistance(f.coord2, f.coord4)); f.routerConfig.setExtensionRadius(0.0); TransitRouter router = createTransitRouter(f.schedule, f.routerConfig, routerType); List<Leg> legs = router.calcRoute(new FakeFacility(f.coord2), new FakeFacility(f.coord6), 990, null); assertEquals(1, legs.size()); assertEquals(TransportMode.transit_walk, legs.get(0).getMode()); }
scenario.getConfig().vspExperimental()); trConfig.setBeelineWalkSpeed(0.1); // something very slow, so the agent does not walk over night trConfig.setSearchRadius(200);
this.scenario.getConfig().plansCalcRoute(), this.scenario.getConfig().transitRouter(), this.scenario.getConfig().vspExperimental()); this.routerConfig.setSearchRadius(500.0); this.routerConfig.setBeelineWalkConnectionDistance(100.0); this.routerConfig.setBeelineWalkSpeed(10.0); // so the agents can walk the distance in 10 seconds
this.scenario.getConfig().transit().setUseTransit(true); this.routerConfig = new TransitRouterConfig(this.scenario.getConfig().planCalcScore(), this.scenario.getConfig().plansCalcRoute(), this.scenario.getConfig().transitRouter(), this.scenario.getConfig().vspExperimental()); this.routerConfig.setSearchRadius(500.0); this.routerConfig.setBeelineWalkConnectionDistance(100.0); this.routerConfig.setBeelineWalkSpeed(1.0); // so the agents can walk the distance in 100 seconds