-
Notifications
You must be signed in to change notification settings - Fork 378
Closed
Description
Problem
The speed_factor
in the vehicle does not scale vehicle travel times properly for higher values.
Specifically, the output produced is same for the same values of std::round(100/speed_factor)
. So,
- with
speed_factor > 200
, all durations are0
and random routes are computed - the scaling logic is flawed if
100 <= speed_factor <= 200
, i.e., the result is same for any speed factor in this range. - the results are "almost" fine if
0 < speed_factor <= 100
, but the time values in the output may not be exact. e.g.speed_factor = 70
andspeed_factor = 100
produce the same result, because100/70 ~ 100/100 ~ 1
.
For small values of speed_factor
, everything is fine.
Also,
speed_factor = 0
sounds like an undefined behaviour.speed_factor < 0
is also possible, leading to random outputs.
To Reproduce
Change the speed_factor
values in the input json and compare the result.
Expectation
Only positive values of speed_factor
must be allowed, and the vehicle travel times shall scale properly for any values of the speed_factor
.