Skip to content

Commit

Permalink
distance unit clarification
Browse files Browse the repository at this point in the history
  • Loading branch information
markusstraub committed Nov 27, 2024
1 parent 52747b7 commit fffbb01
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ public void beforeEach() {
request3 = req(3, 1674);
}

@Test
public void testAllRequestsWithinDistance() {

}

@Test
void testGetZoneIdForNeighboringRequests() {
assertSame(RequestZoneRegistry.getZoneId(request1, true, zoneSystem),
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit fffbb01

Please sign in to comment.