Skip to content

Commit

Permalink
Merge pull request #22 from matsim-scenarios/updateBikeAndGTFS
Browse files Browse the repository at this point in the history
Update bike and gtfs
  • Loading branch information
rakow authored May 16, 2024
2 parents 778be9f + 2d4deaf commit 5e66532
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@
<vehicleType id="bike">
<length meter="2.0"/>
<width meter="1.0"/>
<maximumVelocity meterPerSecond="6.82"/> <!-- from MiD average bike speed in berlin * 2, so on most links they go 12km/h and on bike highways close to 24km/h -->
<!--
<maximumVelocity meterPerSecond="6.82"/> from MiD average bike speed in berlin * 2, so on most links they go 12km/h and on bike highways close to 24km/h -->
<maximumVelocity meterPerSecond="5"/> <!-- based on the rvr -->
<passengerCarEquivalents pce="0.1"/>
</vehicleType>

Expand Down Expand Up @@ -299,4 +301,4 @@
</costInformation>
<networkMode networkMode="truck26t"/>
</vehicleType>
</vehicleDefinitions>
</vehicleDefinitions>
28 changes: 15 additions & 13 deletions src/main/java/org/matsim/prepare/CreateSupply.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,19 @@ public enum NetworkResolution {Low, Medium, High}

private static final Path nrwShape = Paths.get("public-svn/matsim/scenarios/countries/de/metropole-ruhr/metropole-ruhr-v1.0/original-data/shp-files/nrw/dvg2bld_nw.shp");

private static final Path gtfsData1 = Paths.get("public-svn/matsim/scenarios/countries/de/metropole-ruhr/metropole-ruhr-v1.0/original-data/gtfs/vrr_20211118_gtfs_vrr_shapes.zip");
private static final Path gtfsData2 = Paths.get("public-svn/matsim/scenarios/countries/de/metropole-ruhr/metropole-ruhr-v1.0/original-data/gtfs/gtfs-nwl-20210215.zip");
private static final Path gtfsData3 = Paths.get("public-svn/matsim/scenarios/countries/de/metropole-ruhr/metropole-ruhr-v1.0/original-data/gtfs/gtfs-schienenfernverkehr-de_2021-08-19.zip");
//new gtfs file provided by the rvr
private static final Path gtfsData1 = Paths.get("public-svn/matsim/scenarios/countries/de/metropole-ruhr/metropole-ruhr-v1.0/original-data/gtfs/20230106_gtfs_nrw_neue_service_ids.zip");
//private static final Path gtfsData1 = Paths.get("public-svn/matsim/scenarios/countries/de/metropole-ruhr/metropole-ruhr-v1.0/original-data/gtfs/vrr_20211118_gtfs_vrr_shapes.zip");
//private static final Path gtfsData2 = Paths.get("public-svn/matsim/scenarios/countries/de/metropole-ruhr/metropole-ruhr-v1.0/original-data/gtfs/gtfs-nwl-20210215.zip");
private static final Path gtfsData2 = Paths.get("public-svn/matsim/scenarios/countries/de/metropole-ruhr/metropole-ruhr-v1.0/original-data/gtfs/gtfs-schienenfernverkehr-de_2021-08-19.zip");

private static final String gtfsDataDate1 = "2021-11-17";
private static final String gtfsDataDate2 = "2021-02-04";
private static final String gtfsDataDate3 = "2021-08-19";
private static final String gtfsDataDate1 = "2023-01-17";
//private static final String gtfsDataDate2 = "2021-02-04";
private static final String gtfsDataDate2 = "2021-08-19";

private static final String gtfsData1Prefix = "vrr";
private static final String gtfsData2Prefix = "nwl";
private static final String gtfsData3Prefix = "fern";
//private static final String gtfsData2Prefix = "nwl";
private static final String gtfsData2Prefix = "fern";

private static final Path inputShapeNetwork1 = Paths.get("shared-svn/projects/matsim-metropole-ruhr/metropole-ruhr-v1.0/original-data/2021-03-05_radwegeverbindungen_VM_Freizeitnetz/2021-03-05_radwegeverbindungen_VM_Freizeitnetz.shp");
private static final Path inputShapeNetwork2 = Paths.get("shared-svn/projects/matsim-metropole-ruhr/metropole-ruhr-v1.0/original-data/2021-03-05_radwegeverbindungen_VM_Knotenpunktnetz/2021-03-05_radwegeverbindungen_VM_Knotenpunktnetz.shp");
Expand Down Expand Up @@ -282,9 +284,9 @@ private void run(Path rootDirectory) {
// --------------------------------------- Create Pt -----------------------------------------------------------

new CreateTransitScheduleFromGtfs().execute(
rootDirectory.resolve(gtfsData1).toString(), rootDirectory.resolve(gtfsData2).toString(), rootDirectory.resolve(gtfsData3).toString(),
"--date", gtfsDataDate1, gtfsDataDate2, gtfsDataDate3,
"--prefix", gtfsData1Prefix + "," + gtfsData2Prefix + "," + gtfsData3Prefix,
rootDirectory.resolve(gtfsData1).toString(), rootDirectory.resolve(gtfsData2).toString(),
"--date", gtfsDataDate1, gtfsDataDate2,
"--prefix", gtfsData1Prefix + "," + gtfsData2Prefix + "," + gtfsData2Prefix,
"--target-crs", "EPSG:25832",
"--network", networkOut,
"--output", outputDir.toString(),
Expand Down Expand Up @@ -363,9 +365,9 @@ private void onLinkCreated(Link link) {
link.setAllowedModes(modes);
}

// all regular bike links should have an infrastructure speed factor of 0.5
// all regular bike links should have an infrastructure speed factor of 0.64 according to the rvr
if (link.getAllowedModes().contains(TransportMode.bike)) {
link.getAttributes().putAttribute(BicycleUtils.BICYCLE_INFRASTRUCTURE_SPEED_FACTOR, 0.5);
link.getAttributes().putAttribute(BicycleUtils.BICYCLE_INFRASTRUCTURE_SPEED_FACTOR, 0.64);
}
}

Expand Down

0 comments on commit 5e66532

Please sign in to comment.