matsim-org / matsim-code-examples

A repository containing code examples around MATSim
GNU General Public License v3.0
83 stars 180 forks source link

link and lane presentation in MATSim #305

Open elyh1992 opened 4 years ago

elyh1992 commented 4 years ago

Hi,

I have problem with understanding how MATSim represent links. If there is a link with 3 lanes and with permlane value of 3, is MATSim consider three different lanes for that link. If so is it possible to consider different attributes for each lane for instance dedicate one lane to specific type of vehicles and other 2 lanes to all kind of vehicles?

Because when I was reading chapter 12 of MATSim book, from my understanding, it is mentioned that MATSim consider all links as one lane and make a queue of vehicles on that. So I don't understand the point of defining permlane.

Thank you

JWJoubert commented 4 years ago

@elyh1992 the number of lanes influences the storage capacity of the link. Indeed, each link is modelled in MATSim as a single queue, but the capacity of that queue is influenced by the number of lanes.

If you want different lanes to have different attributes (and therefore affect different behaviour), then I see two approaches. The one is to look into some of the contribs. I think there is one that deals with lanes. Alternatively, as we've done in Cape Town, South Africa, where we model a dedicated bus lane (high occupancy vehicle lane), you could duplicate the link in the network and switch/change their attributes during the simulation using NetworkChangeEvents.

elyh1992 commented 4 years ago

Thank you for your answer. Is there more detail available about the Cape Town project in GitHub or any other places?

JWJoubert commented 4 years ago

Thank you for your answer. Is there more detail about the research in Cape Town available in Github or any other places?

I will probably present on it at the next MATSim user meeting (April in Warsaw just before the ABMTRANS conference). It was based on a student's project, but the document is not in the public domain (yet).

aayushtewari01 commented 2 years ago

@JWJoubert I had a similar doubt regarding lanes and capacity. Considering two conditions in network file

  1. Link capacity = 3000 Veh/hr and 'Permlanes' = 1
  2. Link capacity = 3000 Veh/hr and 'Permlanes' = 3

will there be any difference in the way Matsim simulation is performed in both the approaches. And how does the output will vary. The network has only single mode i.e car.

In issue #401 , it is mentioned that the number of lanes is not directly relevant for the throughput of a link. So If I provide true capacity to each link and consider all links having only single lane, then will it be a wrong approach. Thankyou

tthunig commented 2 years ago

As JWJoubert wrote, the number of lanes ('permlanes') in standard MATSim only influences the storage capacity of a link (i.e. how many vehicles fit onto this link). The flow capacity (i.e. how many vehicles can leave the link per hour) is not influenced by the 'permlanes' value. So, your two approaches will only vary in terms of congestion/ spill back in high occupancy situations. You should, therefore, always set the link capacity to the value of the total number of vehicles that should be allowed to leave the link per hour.

We also have a more detailed way of modeling lanes in MATSim (see the lanes package in matsim libs). This is, however, only useful if you want to have separate queues for different turn directions. (Lanes are described together with the traffic signal extension in the MATSim book; the codeexamples in the signals contrib also contain examples of how lane files should look and how to generate/use them in MATSim.) The type of problem discussed above (different types of vehicles on different lanes) is, however, better modeled with different parallel links (as JWJoubert described).

aayushtewari01 commented 2 years ago

@tthunig , Thank you for your timely response. May I add to my issue. I am not able to relate my output of linkstat. I did two simulations . The lane capacity for both the simulations were kept same. In first simulation I kept the number of lanes as 1 for all lanes. In second simulation I increasd the number of lanes as per road data. The volume of vehicle per lane in linkstat decreased in 2nd simulation compared to 1st simulation. I am not able to comprehend what makes this difference. The link volume irrespective of number of lanes should be same, if throughput is not changed?

JWJoubert commented 2 years ago

Hi @aayushtewari01

I am not able to comprehend what makes this difference. The link volume irrespective of number of lanes should be same, if throughput is not changed?

If you reduce the number lanes, then fewer vehicles can fit onto the lane at any particular time. The consequence is spill backs, a feature that is actually quite good. That is why MATSim (agent-based, probably, in general) provide better travel time distributions (see Gao et al. (2009) and Fourie (2010)).

Now, with that argument, I guess your expectation was that the link stats would go up. Mine would too. But these effects are non-linear. For example, fixing the number of lanes on other road segments could very likely result that agents reroute to instead make use of those new routes with higher capacity. Just a thought.