protected double getTransferTime(Coord coord, Coord toCoord) { double distance = CoordUtils.calcEuclideanDistance(coord, toCoord); double initialTime = distance / config.getBeelineWalkSpeed(); return initialTime + this.config.getAdditionalTransferTime(); }
protected final double getTransferTime(Person person, Coord coord, Coord toCoord) { return getTravelDisutility().getWalkTravelTime(person, coord, toCoord) + this.getConfig().getAdditionalTransferTime(); }
double waittime = this.originalTransitRouterConfig.getAdditionalTransferTime();
/** * cost of a single transfer. Fare is included in {@link RaptorDisutility.getInVehicleTravelDisutility} */ protected final double getTransferCost(final Coord fromStop, final Coord toStop) { // this is same as defaultTransferCost in TransitRouterNetworkTravelTimeAndDisutility. Amit Oct'17 double cost; double transfertime = getTransferTime(fromStop, toStop); double waittime = this.config.getAdditionalTransferTime(); // say that the effective walk time is the transfer time minus some "buffer" double walktime = transfertime - waittime; if ( walktime < 0. ) { throw new RuntimeException( "negative walk time; should not happen; needs to be repaired" ) ; } double walkDistance = CoordUtils.calcEuclideanDistance(fromStop, toStop); // weigh this "buffer" not with the walk time disutility, but with the wait time disutility: // (note that this is the same "additional disutl of wait" as in the scoring function. Its default is zero. // only if you are "including the opportunity cost of time into the router", then the disutility of waiting will // be the same as the marginal opprotunity cost of time). kai, nov'11 cost = - walktime * this.config.getMarginalUtilityOfTravelTimeWalk_utl_s() - walkDistance * this.config.getMarginalUtilityOfTravelDistancePt_utl_m() - waittime * this.config.getMarginalUtilityOfWaitingPt_utl_s() - this.config.getUtilityOfLineSwitch_utl(); return cost; }
double cost; double transfertime = getLinkTravelTime(link, time, person, vehicle); double waittime = this.config.getAdditionalTransferTime();
double time2 = distance / this.config.getBeelineWalkSpeed() + this.config.getAdditionalTransferTime(); this.cachedTravelTime = time2; return time2;
f.scenario.getConfig().vspExperimental()); trConfig.setUtilityOfLineSwitch_utl(0); assertEquals(0, trConfig.getAdditionalTransferTime(), 1e-8); TransitRouter router = createTransitRouter(f.schedule, trConfig, routerType); List<Leg> legs = router.calcRoute(new FakeFacility(new Coord((double) 11900, (double) 5100)), new FakeFacility(new Coord((double) 24100, (double) 4950)), 6.0*3600 - 5.0*60, null);
Assert.assertEquals(1.37 / 1.2, config.getBeelineWalkSpeed(), 1e-8); Assert.assertEquals(128.0, config.getAdditionalTransferTime(), 1e-8); Assert.assertEquals(987.6, config.getSearchRadius(), 1e-8); Assert.assertEquals(123.4, config.getExtensionRadius(), 1e-8); Assert.assertEquals(1.37 / 1.2, config.getBeelineWalkSpeed(), 1e-8); Assert.assertEquals(128.0, config.getAdditionalTransferTime(), 1e-8); Assert.assertEquals(987.6, config.getSearchRadius(), 1e-8); Assert.assertEquals(123.4, config.getExtensionRadius(), 1e-8);