@Override public void handleEvent(LinkEnterEvent event) { try { if (ptVehicles.keySet().contains(event.getVehicleId())) { PTVehicle ptVehicle = ptVehicles.get(event.getVehicleId()); ptVehicle.in = true; ptVehicle.setLinkEnterTime(event.getTime()); } else { chains .get(driverIdFromVehicleId.get(event.getVehicleId())) .setLinkEnterTime(event.getTime()); } } catch (Exception e) { System.err.println(e.getStackTrace()); System.err.println(event.toString()); } }
@Override public void handleEvent(LinkEnterEvent event) { if (event.getDriverId().equals(filterEventsForAgentId)) { System.out.println(event.toString()); } }