diff --git a/README.md b/README.md index ae16645..1e782ae 100644 --- a/README.md +++ b/README.md @@ -116,6 +116,10 @@ The DRS module's major version (e.g. 14) corresponds to the MATSim version it is ### Config Parameters +> [!note] +> `network.xml` is assumed to use a meter-based coordinate reference system. +> If this is not the case take *meter* and *kilometre* in the parameter names (and output such as pkm) with a grain of salt. + [config_drs.xml](data/floridsdorf/config_drs.xml) serves as a complete example on how to configure a DRS scenario. Note, that other modules must be configured in a specific way as well, e.g. `qsim`. @@ -180,7 +184,7 @@ and can also be configured via the relevant parameters in the `drs` config group The following output files are additionally created in the MATSim output directory: - `drs_rider_request_stats.csv/png`: evolution of number of matched and unmatched rider requests -- `drs_vkt_stats.csv/png`: evolution of distribution of vehicle kilometers traveled by motorized individual transport between +- `drs_vkt_stats.csv/png`: evolution of distribution of vehicle kilometres traveled by motorized individual transport between - DRS travel, i.e. parts of a DRS driver's trip with an actual rider - before and after DRS, i.e. parts of a DRS driver's trip to the pickup point / after dropping off the rider - individual travel, i.e. regular non-DRS car trips or unmatched DRS driver trips diff --git a/src/main/java/at/ac/ait/matsim/drs/analysis/VktStatsControlerListener.java b/src/main/java/at/ac/ait/matsim/drs/analysis/VktStatsControlerListener.java index bf10c8f..9154340 100644 --- a/src/main/java/at/ac/ait/matsim/drs/analysis/VktStatsControlerListener.java +++ b/src/main/java/at/ac/ait/matsim/drs/analysis/VktStatsControlerListener.java @@ -107,9 +107,9 @@ private void collectVktStatsInfo(AfterMobsimEvent event) { String[] categories = iterationHistories.keySet().stream() .map(Object::toString) .toArray(String[]::new); - StackedBarChart chart = new StackedBarChart("Motorized Private Vehicles Kilometers Traveled Statistics", + StackedBarChart chart = new StackedBarChart("Motorized Private Vehicles Kilometres Traveled Statistics", "iteration", - "Kilometer", categories); + "Kilometre", categories); double[] drsValues = iterationHistories.values().stream() .mapToDouble(map -> map.getOrDefault(DRS_TRAVEL, 0.0)) diff --git a/src/test/java/at/ac/ait/matsim/drs/optimizer/RequestZoneRegistryTest.java b/src/test/java/at/ac/ait/matsim/drs/optimizer/RequestZoneRegistryTest.java index 5f1d964..a75e5dc 100644 --- a/src/test/java/at/ac/ait/matsim/drs/optimizer/RequestZoneRegistryTest.java +++ b/src/test/java/at/ac/ait/matsim/drs/optimizer/RequestZoneRegistryTest.java @@ -43,6 +43,11 @@ public void beforeEach() { request3 = req(3, 1674); } + @Test + public void testAllRequestsWithinDistance() { + + } + @Test void testGetZoneIdForNeighboringRequests() { assertSame(RequestZoneRegistry.getZoneId(request1, true, zoneSystem), @@ -108,6 +113,10 @@ void testFindNearestRequests() { zoneRegistry.findNearestRequests(link(1541).getFromNode()).count()); } + public DrsRiderRequest req(int linkId) { + return DrsTestUtil.mockRiderRequest(linkId, 8 * 60 * 60, link(linkId), null); + } + public DrsRiderRequest req(int id, int linkId) { return DrsTestUtil.mockRiderRequest(id, 8 * 60 * 60, link(linkId), null); }