Closed marecabo closed 2 years ago
Hi,
reverse links are only created if the original osm-way has a bike lane reverse tag (and some others). In OSM a street regardless whether it is one or two-way is represented by a single way. Streets in MATSim are represented as a directed graph, which means we have to have a link for each direction of a street. If we have a street which is a one way street for car traffic but has a tag, which indicates that bicycles can go the other way, we add a link like the one you have described.
As for the hard coded values: I think it doesn't necessarily makes sense to take the values from the car lane. Looking at the hard coded values I think having a single lane is fine, since I wouldn't know what other value to choose. Also, having a freespeed of 30km/h as a default makes sense to me, since this allows bike riders go as fast as the max. velocitly of their vehicle allows. The capacity value assumes that 1500 riders can pass through that reverse bike lane per hour. I think this value came from a literature review, but I don't know who brought it up anymore and what the sources were.
If you have a good idea for changed values, I would be happy to approve your PR with them.
Hi, thanks for your explanation.
It took me a while, but I was looking at the code with a single-mode network in mind, in that case, I expected bikes to have the same freespeed in both directions.
With a multimodal network with car and bike, it makes sense to me, to leave the freespeed for the shared forward links as is, to not increase the frespeed for cars as well.
May we close this issue?
The OsmBicycleReader reads an OSM file and creates a bicycle network. It creates a reverse link for every link. However, the properties (
freespeed
,capacity
,numberOfLanes
) of this reverse link are hard-coded (see below) and not taken from the the original forward link.https://github.com/matsim-org/matsim-libs/blob/12c72bde619b57a4a38eb39620515d4df062cfde/contribs/osm/src/main/java/org/matsim/contrib/osm/networkReader/OsmBicycleReader.java#L111-L114
Example
Expected Behavior
I would expect, that all properties should have been used from the forward link, if a reverse link is added at all, as the length is already taken from the forward length.
Could you shed some light on the reasoning for using hard-coded properties for bike reverse links? On first glance I would expect at least freespeed to be the same, and capacity maybe less if the reverse link enables driving in the wrong/not permitted direction, but that might be hard to detect in the general case.
Thanks for your response and all your work on MATSim!