Skip to content

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

@FLomb

Description

@FLomb

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).

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions