Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoiding rounding error in vehicles' number for small fleets #34

Open
FLomb opened this issue Jun 6, 2023 · 0 comments
Open

Avoiding rounding error in vehicles' number for small fleets #34

FLomb opened this issue Jun 6, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@FLomb
Copy link
Contributor

FLomb commented Jun 6, 2023

A given modelled vehicle fleet is composed of different user and vehicle types. The total number of modelled vehicles (by default, 2500) is hence divided into sub-sets according to user-type and vehicle-type shares for the country of interest. Rounding functions ensure that the shares do not lead to any non-integer amounts of vehicles for any user-vehicle type combination.

This is all fine when modelling large, country-scale vehicle fleets (as in the original application and publication of the model) since the number of 2500 vehicles is only used as a proxy for a large-enough fleet of vehicles, whose behaviour is then normalised and rescaled according to the actual yearly mobility demand for the country.

Instead, when modelling small vehicle fleets and expecting to see the number of vehicles exactly reflected in the output, the rounding functions lead to inconsistencies. This should be fixed.

Some possible solutions:

  • implementing a correction in the code that makes sure that the final number of vehicles (after rounding) always matches the initial number defined. E.g., if some vehicles go lost, the missing vehicles are uniformly re-applied to each user-vehicle type until reaching the right number.
  • defining a new small_fleet=True parameter that allows the code to behave differently, for instance, applying the above correction only if desired (so as to avoid unnecessary corrections when not relevant).
@FLomb FLomb added the enhancement New feature or request label Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants