Skip to content

Commit

Permalink
remove non rideHail vehicle ids from rideHailIndividualWaiting file (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
rajnikantsh authored and wrashid committed Sep 13, 2018
1 parent 42fbeed commit 7c0016f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/beam/analysis/plots/RideHailWaitingStats.java
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@ public void processStats(Event event) {
Id<Person> personId = personEntersVehicleEvent.getPersonId();
String _personId = personId.toString();

if (rideHailWaiting.containsKey(personId.toString())) {
// This rideHailVehicle check is put here again to remove the non rideHail vehicleId which were coming due the
// another occurrence of modeChoice event because of replanning event.
if (rideHailWaiting.containsKey(personId.toString()) && eventAttributes.get("vehicle").contains("rideHailVehicle")) {

ModeChoiceEvent modeChoiceEvent = (ModeChoiceEvent) rideHailWaiting.get(_personId);
double difference = personEntersVehicleEvent.getTime() - modeChoiceEvent.getTime();
Expand Down

0 comments on commit 7c0016f

Please sign in to comment.