matsim-org / matsim-libs

Multi-Agent Transport Simulation
www.matsim.org
477 stars 445 forks source link

Support TransitRouteStops where boarding or alighting is not allowed #3330

Closed mrieser closed 3 months ago

mrieser commented 3 months ago

In reality, there are trains that call at stops but where it might not be allowed to enter or exit such trains. Examples are night trains, where on the first few stops, only boarding is allowed, while at the last few stops only alighting is allowed. This means that it is not allowed to use such night trains to just travel between the first few stops.

This commit adds two optional attributes allowBoarding and allowAlighting to TransitRouteStops, with the default value being true for backwards compatibility and when the attribute is not specified. SwissRailRaptor respects these attributes and will not return routes where agents would enter a vehicle at a route stop where boarding is not allowed, or where agents would exit a vehicle at a route stop where alighting is not allowed.