Skip to content

Commit

Permalink
include bike roads as well
Browse files Browse the repository at this point in the history
  • Loading branch information
rakow committed Sep 17, 2024
1 parent b0d581d commit 38a0cef
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 8 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ $(berlin)/input/shp/Planungsraum_EPSG_25833.shp:

input/network.osm: input/brandenburg.osm.pbf

# Detailed network includes bikes as well
$(osmosis) --rb file=$<\
--tf accept-ways highway=motorway,motorway_link,trunk,trunk_link,primary,primary_link,secondary_link,secondary,tertiary,motorway_junction,residential,living_street,unclassified\
--tf accept-ways bicycle=yes,designated highway=motorway,motorway_link,trunk,trunk_link,primary,primary_link,secondary_link,secondary,tertiary,motorway_junction,residential,living_street,unclassified,cycleway\
--bounding-polygon file="$p/area/area.poly"\
--used-node --wb input/network-detailed.osm.pbf

Expand All @@ -87,7 +88,7 @@ input/sumo.net.xml: input/network.osm
--no-internal-links --keep-edges.by-vclass passenger,truck,bicycle\
--remove-edges.by-vclass hov,tram,rail,rail_urban,rail_fast,pedestrian\
--output.original-names --output.street-names\
--osm.lane-access true --osm.bike-access true\
--osm.lane-access false --osm.bike-access false\
--osm.all-attributes\
--osm.extra-attributes tunnel,highway,traffic_sign,bus:lanes,bus:lanes:forward,bus:lanes:backward,cycleway,cycleway:right,cycleway:left\
--proj "+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"\
Expand All @@ -97,7 +98,7 @@ input/sumo.net.xml: input/network.osm
$p/berlin-$V-network.xml.gz: input/sumo.net.xml
$(sc) prepare network-from-sumo $< --target-crs $(CRS) --lane-restrictions REDUCE_CAR_LANES --output $@

$(sc) prepare clean-network $@ --output $@ --modes car,ride,truck --remove-turn-restrictions
$(sc) prepare clean-network $@ --output $@ --modes car,bike,ride,truck --remove-turn-restrictions

$(sc) prepare reproject-network\
--input $@ --output $@\
Expand Down
12 changes: 12 additions & 0 deletions input/v6.4/berlin-v6.4-vehicleTypes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@
<passengerCarEquivalents pce="1.0"/>
</vehicleType>

<vehicleType id="bike">
<attributes>
<attribute name="accessTimeInSecondsPerPerson" class="java.lang.Double">1</attribute>
<attribute name="egressTimeInSecondsPerPerson" class="java.lang.Double">1</attribute>
</attributes>
<length meter="2.0"/>
<width meter="1.0"/>
<!-- 15 kmh -->
<maximumVelocity meterPerSecond="4.16"/>
<passengerCarEquivalents pce="0.2"/>
</vehicleType>

<vehicleType id="ride">
<attributes>
<attribute name="accessTimeInSecondsPerPerson" class="java.lang.Double">1</attribute>
Expand Down
5 changes: 0 additions & 5 deletions input/v6.4/berlin-v6.4.config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@
<module name="routing">
<param name="networkModes" value="car,truck,freight,ride"/>
<param name="accessEgressType" value="accessEgressModeToLink"/>
<parameterset type="teleportedModeParameters">
<param name="beelineDistanceFactor" value="1.3"/>
<param name="mode" value="bike"/>
<param name="teleportedModeSpeed" value="3.1388889"/>
</parameterset>
<parameterset type="teleportedModeParameters">
<param name="beelineDistanceFactor" value="1.3"/>
<param name="mode" value="walk"/>
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/org/matsim/run/OpenBerlinScenario.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ public void install() {

addTravelTimeBinding("freight").to(Key.get(TravelTime.class, Names.named(TransportMode.truck)));
addTravelDisutilityFactoryBinding("freight").to(Key.get(TravelDisutilityFactory.class, Names.named(TransportMode.truck)));

// TODO: bike should have freespeed travel time
addTravelTimeBinding(TransportMode.bike).to(networkTravelTime());
addTravelDisutilityFactoryBinding(TransportMode.bike).to(Key.get(TravelDisutilityFactory.class, Names.named(TransportMode.bike)));

}
}

Expand Down

0 comments on commit 38a0cef

Please sign in to comment.