Beispiel #1
0
 public void handleEvent(final VehicleArrivesAtFacilityEvent event) {
   List<Tuple<Id, Double>> list = this.positions.get(event.getVehicleId());
   if (list == null) {
     list = new ArrayList<Tuple<Id, Double>>();
     this.positions.put(event.getVehicleId(), list);
   }
   list.add(new Tuple<Id, Double>(event.getFacilityId(), Double.valueOf(event.getTime())));
 }
  @Override
  public void handleEvent(final VehicleArrivesAtFacilityEvent event) {
    Id stopId = event.getFacilityId();

    this.vehStops.put(event.getVehicleId(), stopId);
    // (constructing a table with vehId as key, and stopId as value; constructed when veh arrives at
    // stop; necessary
    // since personEnters/LeavesVehicle does not carry stop id)
  }
 @Override
 public void handleEvent(VehicleArrivesAtFacilityEvent event) {
   try {
     ptVehicles.get(event.getVehicleId()).lastStop = event.getFacilityId();
   } catch (Exception e) {
     System.err.println(e.getStackTrace());
     System.err.println(event.toString());
   }
 }
    @Override
    public void handleEvent(VehicleArrivesAtFacilityEvent event) {

      if (event.getTime() >= this.startTime && event.getTime() < this.endTime) {
        // It is for em
        this.negArrivalDelay.addEntry(event.getDelay());
        this.negativeArrivalCounter++;
      } else {
        // Not for me
      }
    }
 @Override
 public void handleEvent(final VehicleArrivesAtFacilityEvent event) {
   handleEvent(eventsPerVehicle, event.getVehicleId(), event);
 }
 @Override
 public void handleEvent(VehicleArrivesAtFacilityEvent event) {
   if (linesRoutesOfVehicle.get(event.getVehicleId().toString()) != null)
     stopOfVehicle.put(event.getVehicleId().toString(), event.getFacilityId().toString());
 }