PhysicsOfMobility/ridepy

Critical bug: CPE location not properly updated

fxjung opened this issue · 0 comments

When fast_forward_time is invoked, there are four possible cases:

  1. Stops need to be serviced, there are remaining stops
  2. Stops need to be serviced, there are no remaining stops
  3. No stops need to be serviced, there are remaining stops
  4. No stops need to be serviced, there are no remaining stops
  • In cases 1) and 3), we have upcoming stops after CPE. In this case, CPE's location is updated properly, using interpolation
  • In case 4) nothing changes. We were idling, and we are still idling. In this case CPE's location is unchanged.
  • The bug occurs with case 2). Here, all upcoming stops are serviced (transition to idling). In the current behavior, CPE's location is not updated, which results in the vehicle incorrectly being located at the last interpolated position. The desired behavior is updating the CPE's location to the last serviced stop, where the vehicle stays until a new stop is inserted into its stoplist.