-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding bicycles to multimodal network #137
Comments
Could you provide a reproducible example (code you used to convert the file and an example extent of the osm network)? It's hard to tell what's going on because on your screenshot the selected link is purple so I'm a bit confused.
Why do you use car and bicycle as a subnetwork for cars? |
I used the PT2MATSimExample example to convert the network and previously I made changes regarding the required input files. What I want to do is to have a network where cars, bicycles and pt are allowed. I am pretty new to this and I am little bit confused regarding the subnetworks.
Only with this combination of parameters all the relevant paths are extracted from the network.zip file, otherwise the foot way, pedestrian, track, steps, service ways are missed out and not included in the final network.xml
paths, the cyclist need to use the car network otherwise the router cannot find path for them to reach the destination, that's why I created new subnetwork where cars and bicycles are included. I don't know if this makes sense. Any help is welcomed. |
It's indeed a bit hard to wrap your head around those subnetworks and modes, I'll try to explain. There's two steps in converting a network: First, create MATSim links from OSM ways with The RoutableSubnetwork step now cleans those networks and creates a separate routable network for each The parameter defaultConfig.addParameterSet(new RoutableSubnetworkParams("bus", new HashSet<>(Arrays.asList("car", "bus")))); which means that busses can use links with car and bus transportModes.
This means your code should look something like this defaultConfig.addParameterSet(new RoutableSubnetworkParams("bicycle", new HashSet<>(Arrays.asList("bicycle", "car")))); However, that way biciycles can use all car links, including motorways. If that's an issue for you you could add more osm ways to your |
Thank you Flavio for your detailed answer! I have one more doubt to make it clear. To sum up:
As you said:
Does this mean that the bikes are not interacting with cars, even though they use the car subnetowrk which is separate from the subnetowrk the cars are using? And if this is correct, is there a possibility of their interraciton? |
No, I worded this a bit confusing. If you use RoutableSubnetworks (where bikes can use car links as well) there is interaction between cars and bikes on links that they both use. So your approach gives you the intended result (just consider that bikes can also use motorways). I was just pointing out at the end that it's also possible to create a bike network completely separate from cars by adding more OsmWayParams. |
Hi, I am trying to add bicycle specific paths to the multimodal network along with cars and pt. For that purpose, I added the following in OsmConverterConfig class and I've defined the bicycleSingleton before:
Here is the network:
purple- cycleway
blue-footway
yellow-pedestrian
At the end the allowed mode on these links is car, and not bicycle as I have defined before. Any help on this?
The text was updated successfully, but these errors were encountered: