diff --git a/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/EstimatedDrtAccessibilityContributionCalculator.java b/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/EstimatedDrtAccessibilityContributionCalculator.java index 400e0f91f57..139bcf60253 100644 --- a/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/EstimatedDrtAccessibilityContributionCalculator.java +++ b/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/EstimatedDrtAccessibilityContributionCalculator.java @@ -1,6 +1,5 @@ package org.matsim.contrib.accessibility; -import com.google.inject.Inject; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.locationtech.jts.util.Assert; @@ -18,7 +17,6 @@ import org.matsim.contrib.dvrp.router.DvrpRoutingModule; import org.matsim.core.config.Config; import org.matsim.core.config.ConfigUtils; -import org.matsim.core.config.groups.NetworkConfigGroup; import org.matsim.core.config.groups.ScoringConfigGroup; import org.matsim.core.gbl.Gbl; import org.matsim.core.router.*; @@ -31,19 +29,14 @@ import java.util.concurrent.ConcurrentHashMap; /** - * @author thibautd, dziemke + * @author jakobrehmann */ final class EstimatedDrtAccessibilityContributionCalculator implements AccessibilityContributionCalculator { - private static final Logger LOG = LogManager.getLogger( NetworkModeAccessibilityExpContributionCalculator.class ); - + private static final Logger LOG = LogManager.getLogger(EstimatedDrtAccessibilityContributionCalculator.class); private final String mode; private final Scenario scenario; - - private final ScoringConfigGroup scoringConfigGroup; - private Network subNetwork; - private final double betaDrtTT_h; private final double betaDrtDist_m; private final double walkSpeed_m_h; @@ -54,10 +47,8 @@ final class EstimatedDrtAccessibilityContributionCalculator implements Accessibi private Map, ArrayList> aggregatedMeasurePoints; private Map, AggregationObject> aggregatedOpportunities; -// private final LeastCostPathCalculator router; TripRouter tripRouter ; - private DvrpRoutingModule.AccessEgressFacilityFinder stopFinder; private final DrtEstimator drtEstimator; @@ -97,6 +88,7 @@ public void initialize(ActivityFacilities measuringPoints, ActivityFacilities op 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? + // right now, this doesn't aggregate the measuring points at all. for (ActivityFacility measuringPoint : measuringPoints.getFacilities().values()) { Id facilityId = measuringPoint.getId(); if(!aggregatedMeasurePoints.containsKey(facilityId)) { @@ -120,6 +112,7 @@ public void initialize(ActivityFacilities measuringPoints, ActivityFacilities op // todo: same question as above... + // while this aggregates to the nearest drt stop this.aggregatedOpportunities = aggregateOpportunitiesWithSameNearestDrtStop(opportunities, scenario.getConfig()); @@ -166,7 +159,7 @@ public double computeContributionOfOpportunity(ActivityFacility origin, // attempt to replace hard coded calculation w/ DRT Estimator DrtRoute drtRoute = new DrtRoute(Id.createLinkId("dummyFrom"), Id.createLinkId("dummyTo")); - drtRoute.setDistance(directRideDistance_m); + drtRoute.setDistance(directRideDistance_m); // todo: since this is based on the distance and not the time of the direct car trips, congestion effects are not yet included. drtRoute.setDirectRideTime(mainLeg.getRoute().getTravelTime().seconds()); DrtEstimator.Estimate estimate = drtEstimator.estimate(drtRoute, OptionalTime.defined(departureTime)); @@ -179,7 +172,7 @@ public double computeContributionOfOpportunity(ActivityFacility origin, // } double totalTime_h = (waitTime_s + rideTime_s) / 3600; double utilityDrtTime = betaDrtTT_h * totalTime_h; - double utilityDrtDistance = betaDrtDist_m * directRideDistance_m; // Todo: this doesn't include the detours + double utilityDrtDistance = betaDrtDist_m * directRideDistance_m; // Todo: this doesn't include the detours. Only time does. // Pre-computed effect of all opportunities reachable from destination network node diff --git a/contribs/application/src/main/java/org/matsim/application/analysis/accessibility/AccessibilityAnalysis.java b/contribs/application/src/main/java/org/matsim/application/analysis/accessibility/AccessibilityAnalysis.java index a98a9682de7..526740b014f 100644 --- a/contribs/application/src/main/java/org/matsim/application/analysis/accessibility/AccessibilityAnalysis.java +++ b/contribs/application/src/main/java/org/matsim/application/analysis/accessibility/AccessibilityAnalysis.java @@ -79,7 +79,7 @@ public Integer call() throws Exception { config.global().setNumberOfThreads(1); for (DrtConfigGroup drtConfig : ConfigUtils.addOrGetModule(config, MultiModeDrtConfigGroup.class).getModalElements()) { - drtConfig.transitStopFile = "/Users/jakob/git/matsim-libs/examples/scenarios/kelheim/drt-stops.xml"; + drtConfig.transitStopFile = "/Users/jakob/git/matsim-libs/examples/scenarios/kelheim/drt-stops.xml"; // todo!!! drtConfig.removeParameterSet(drtConfig.getZonalSystemParams().get()); drtConfig.plotDetailedCustomerStats = false; } diff --git a/contribs/simwrapper/src/test/java/org/matsim/simwrapper/dashboard/AccessibilityDashboardTest.java b/contribs/simwrapper/src/test/java/org/matsim/simwrapper/dashboard/AccessibilityDashboardTest.java index 7e9bdac2aa3..ae174258478 100644 --- a/contribs/simwrapper/src/test/java/org/matsim/simwrapper/dashboard/AccessibilityDashboardTest.java +++ b/contribs/simwrapper/src/test/java/org/matsim/simwrapper/dashboard/AccessibilityDashboardTest.java @@ -82,7 +82,6 @@ void kelheimDrt() { double mapCenterX = 712144.17; double mapCenterY = 5422153.87; - //accessibility double tileSize = 100; double num_rows = 45;