-
Notifications
You must be signed in to change notification settings - Fork 179
faq 108968426
by Gerald Richter on 2017-04-18 15:57:09
Given a network definition file I want to construct / provide additional info,
to allow / forbid certain turns at network nodes.
I am unable to find the information required for implementing this.
§12 in the book grazes the subject, so I understand it is somehow done by replacement of nodes by sub-nets. The referred publications also avoid a more explicit instruction.
- am I missing something here?
- has anybody understood how it is done?
- what (xml-)files / formats do I have to use?
- do I have to create the node-replacement sub-graphs myself and add them to my network definition?
thanks for hints
by Theresa Thunig on 2017-04-19 16:49:58
Dear Gerald,
you'll need the lanes object for your purpose. It does anything for you regarding routing and the sub-graph. So, you do not have to create the sub-graph by yourself.
The lanes object is contained in any scenario (scenario.getLanes()) and can be filled with information. Every lane contains the information about the links and lanes it is leeding to.
To use them just set the parameter useLanes in the qsim module in the config to true.
You can find an example how to fill the lane information in the signal tutorials: Please have a look at the method createLanes in the class CreateSignalInputWithLanesExample.
If you prefer using input files, you can also define the path to your lanes file in the config (module network, parameter laneDefinitionsFile). A lanes files has to look like this.
Hope that helps. Please let me know, if anything is missing!
Cheers, Theresa
by Marcel Rieser on 2017-04-20 06:13:10
Lanes, as mentioned by Theresa, are one possibility to incorporate turn restrictions. Before there were lanes in MATSim, turn restrictions were modelled into the network, and I think this is what the book refers to with "replacement of nodes by sub-nets".
Take the following example network:
(3)
||
(1)============(2)========(4)
Assume, you want traffic from node (3) to node (2) only be able to go to node (4), but not node (1). Then, you would "expand" the intersection/node (2) as follows:
(3)
||
/ \
(2a) (2b)
_______(2c) (2e)_________
(1)/ \ (4)
\-------(2d) (2f)---------/
and then add connecting links between:
- (2d) and (2f) (route from node (1) to node (4)),
- (2d) and (2b) (route from node (1) to node (3)),
- (2e) and (2c) (route from node (4) to node (1)),
- (2e) and (2b) (route from node (4) to node (3)),
- (2a) and (2f) (route from node (3) to node (4)),
but no link between (2a) and (2c).
If U-turns should be allowed, one would need to add more links, e.g. from (2d) to (2c) etc.
This increases the network complexity quite a bit by adding a large number of nodes and links to the network if turn restrictions are added for a large number of intersections. Thus, lanes are probably the better and cleaner way to add turn restrictions for larger scenarios.
You are viewing an archive of the previous MATSim Q&A site. The real site is now at https://matsim.org/faq