} else {
lastArrivalTimeAtDepot.remove(me.roadUser);
}
} else if (e.getEventType() == PDPModelEventType.START_PICKUP) {
final PDPModelEvent pme = (PDPModelEvent) e;
final long latestBeginTime = pme.parcel.getPickupTimeWindow().end
- pme.parcel.getPickupDuration();
if (pme.time > latestBeginTime) {
final long tardiness = pme.time - latestBeginTime;
pickupTardiness += tardiness;
eventDispatcher.dispatchEvent(new StatisticsEvent(
StatisticsEventType.PICKUP_TARDINESS, this, pme.parcel,
pme.vehicle, tardiness, pme.time));
}
} else if (e.getEventType() == PDPModelEventType.END_PICKUP) {
totalPickups++;
} else if (e.getEventType() == PDPModelEventType.START_DELIVERY) {
final PDPModelEvent pme = (PDPModelEvent) e;
final long latestBeginTime = pme.parcel.getDeliveryTimeWindow().end
- pme.parcel.getDeliveryDuration();
if (pme.time > latestBeginTime) {
final long tardiness = pme.time - latestBeginTime;
deliveryTardiness += tardiness;
eventDispatcher.dispatchEvent(new StatisticsEvent(
StatisticsEventType.DELIVERY_TARDINESS, this, pme.parcel,
pme.vehicle, tardiness, pme.time));
}
} else if (e.getEventType() == PDPModelEventType.END_DELIVERY) {
totalDeliveries++;
} else if (e.getEventType() == ADD_PARCEL) {
// scenario event
totalParcels++;
} else if (e.getEventType() == NEW_PARCEL) {
// pdp model event
acceptedParcels++;
} else if (e.getEventType() == ADD_VEHICLE) {
totalVehicles++;
} else if (e.getEventType() == NEW_VEHICLE) {
final PDPModelEvent ev = (PDPModelEvent) e;
lastArrivalTimeAtDepot.put(ev.vehicle, simulator.getCurrentTime());
} else if (e.getEventType() == TIME_OUT) {
simFinish = true;
scenarioEndTime = ((TimedEvent) e).time;
} else {