Skip to content

Commit

Permalink
added todo
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobrehmann committed Sep 25, 2024
1 parent b67058a commit a15e215
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,9 @@ public ControlerListener get() {
} else if ( TransportMode.pt.equals( mode ) ){
calculator = new SwissRailRaptorAccessibilityContributionCalculator( mode, config.scoring(), scenario );
} else if ( Modes4Accessibility.estimatedDrt.name().equals( mode )) {
// final TravelTime travelTime = travelTimes.get("dvrp_estimated"); //TODO
// final TravelTime travelTime = travelTimes.get(TransportMode.car); //TODO
// final TravelDisutilityFactory travelDisutilityFactory = travelDisutilityFactories.get(TransportMode.car); //TODO
// final TravelTime travelTime = travelTimes.get("dvrp_estimated");
// final TravelTime travelTime = travelTimes.get(TransportMode.car);
// final TravelDisutilityFactory travelDisutilityFactory = travelDisutilityFactories.get(TransportMode.car);
calculator = new EstimatedDrtAccessibilityContributionCalculator(mode, scenario, tripRouter);
} else if ( Modes4Accessibility.matrixBasedPt.name().equals( mode ) ) {
throw new RuntimeException("currently not supported because implementation not consistent with guice grapher. kai, sep'19") ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ public EstimatedDrtAccessibilityContributionCalculator(String mode, Scenario sce
this.betaWalkTT_h = scoringConfigGroup.getModes().get(TransportMode.walk).getMarginalUtilityOfTraveling() - scoringConfigGroup.getPerforming_utils_hr();
this.betaWalkDist_m = scoringConfigGroup.getModes().get(TransportMode.walk).getMarginalUtilityOfDistance();

stopFinder = ((DvrpRoutingModule) tripRouter.getRoutingModule(TransportMode.drt)).getStopFinder();// todo
// todo: I added a getter to access the stop finder. Is this ok?
stopFinder = ((DvrpRoutingModule) tripRouter.getRoutingModule(TransportMode.drt)).getStopFinder();
// this.drtEstimator = new EuclideanDistanceBasedDrtEstimator(scenario.getNetwork(), 1.2, 0.0842928, 337.1288522, 5 * 60, 0, 0, 0);
// this.drtEstimator = DetourBasedDrtEstimator.normalDistributed(337.1288522, 0.0842928, 0., 0. * 60, 0);

Expand All @@ -105,6 +106,7 @@ public void initialize(ActivityFacilities measuringPoints, ActivityFacilities op
Gbl.assertNotNull(measuringPoints);
Gbl.assertNotNull(measuringPoints.getFacilities());

// todo: should I aggregate the measuring points to the nearest drt stop. Or do we in the near future want to compare the drt routes between multiple access/egress drt stops?
for (ActivityFacility measuringPoint : measuringPoints.getFacilities().values()) {
Id<ActivityFacility> facilityId = measuringPoint.getId();
if(!aggregatedMeasurePoints.containsKey(facilityId)) {
Expand All @@ -127,6 +129,7 @@ public void initialize(ActivityFacilities measuringPoints, ActivityFacilities op
// this.aggregatedMeasurePoints = AccessibilityUtils.aggregateMeasurePointsWithSameNearestNode(measuringPoints, subNetwork);


// todo: same question as above...
this.aggregatedOpportunities = aggregateOpportunitiesWithSameNearestDrtStop(opportunities, scenario.getConfig());


Expand Down Expand Up @@ -273,6 +276,7 @@ private Map<Id<? extends BasicLocation>, AggregationObject> aggregateOpportuniti
Assert.isTrue(stopFinder instanceof ClosestAccessEgressFacilityFinder, "So far, findClosestStop() is only implemented in ClosestAccessEgressFacilityFinder");
DrtStopFacility nearestStop = (DrtStopFacility) ((ClosestAccessEgressFacilityFinder) stopFinder).findClosestStop(opportunity);

// todo: should I use the euclidean distance or the distance w/ beeline factor?
List<? extends PlanElement> planElements = tripRouter.calcRoute(TransportMode.walk, nearestStop, opportunity, 10 * 3600., null, null);// departure time shouldn't matter for walk
Leg leg = extractLeg(planElements, TransportMode.walk);
double egressTime_s = leg.getTravelTime().seconds();
Expand Down

0 comments on commit a15e215

Please sign in to comment.