arup-group / elara

Command line utility for processing MATSim events output files.
MIT License
14 stars 4 forks source link

first draft for implementing link vehicle capacity counts handler #189

Closed elizabethc-arup closed 2 years ago

elizabethc-arup commented 2 years ago

This is linked to the link vehicle capacity feature request described in the issue #187, it adapts the link volume counts handler and adds vehicle capacities instead of counts so that an event like <event time="25201.0" type="entered link" vehicle="bus1" link="2-3" /> will result in the bus vehicle capacity for bus1 added to link 2-3.

For pt vehicles, the vehicle capacity is determined by mapping the vehicle ids to capacities using the functions in the TransitVehicles class in inputs.py and for cars, a default capacity value of 5 is used. https://github.com/arup-group/elara/blob/9a68ece85a5631eadab04bc495d53f16aae4bc03/elara/inputs.py#L406-L468

Currently, an if statement is used to deal with the transit_vehicle.xml version/legacy issue described in #188 as a temporary solution, it would be great if I could get some advice also on how best to resolve this. Thank you :)