Skip to content

Commit

Permalink
Update UAMClosestRangedPreferPooledDispatcher.java
Browse files Browse the repository at this point in the history
added bug description of simulation failing due to the code not correctly utilizing vehicle's start and end times
  • Loading branch information
RRothfeld committed Dec 21, 2023
1 parent f8a5626 commit d93df17
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ private void reoptimize(double now) {
if (availableVehiclesTree.get(type).size() == 0)
continue;

// TODO - Ignore vehicles if they are not currently in service
//Simulation will fail if the closest vehicle's schedule (see start time of that vehicle) has
// not yet started, i.e. the current time (double now) is before that vehicle's start time (same
// applies if current time is past that vehicle's end time).
UAMVehicle closestVehiclesOfType = availableVehiclesTree.get(type).getClosest(requestCoord.getX(),
requestCoord.getY());
double currentDistance = NetworkUtils.getEuclideanDistance(requestCoord,
Expand Down

0 comments on commit d93df17

Please sign in to comment.