matsim-org / matsim-code-examples

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

Allow the use of the bike mode to only specific agents from the population #838

Open DACNC opened 1 year ago

DACNC commented 1 year ago

Hello,

I am running a MATSim scenario and I would like to restrict the use of cars and bikes to only those agents that have access to them. I have implemented attributes in the population.xml file for those agents that are not allowed to use cars and/or bikes (carAvail = never; bikeAvail = never), as it is said in the “PermissibleModesCalculatorImpl.java ” file for cars.

I have managed to restrict the use of cars enabling the “considerCarAvailability” parameter in the “SubtourModeChoice” module.

I wonder if there is something similar for the bikes or if it is easy to generate a simple code to achieve similar results with the bikes.

Many thanks for your help.

David

Janekdererste commented 1 year ago

This is currently only implemented for car mode. You would have to extend this behaviour for bikes yourself.

DACNC commented 1 year ago

Thanks for the update, @Janekdererste