bool MSMeanData_Net::MSLaneMeanDataValues::notifyLeave(SUMOVehicle& veh, SUMOReal /*lastPos*/, MSMoveReminder::Notification reason) { if (vehicleApplies(veh) && (getLane() == 0 || getLane() == static_cast<MSVehicle&>(veh).getLane())) { #ifdef HAVE_INTERNAL if (MSGlobals::gUseMesoSim) { removeFromVehicleUpdateValues(veh); } #endif if (reason == MSMoveReminder::NOTIFICATION_ARRIVED) { ++nVehArrived; } else if (reason == MSMoveReminder::NOTIFICATION_LANE_CHANGE) { ++nVehLaneChangeFrom; } else if (myParent == 0 || reason != MSMoveReminder::NOTIFICATION_SEGMENT) { ++nVehLeft; if (reason == MSMoveReminder::NOTIFICATION_VAPORIZED) { ++nVehVaporized; } } } #ifdef HAVE_INTERNAL if (MSGlobals::gUseMesoSim) { return false; } #endif return reason == MSMoveReminder::NOTIFICATION_JUNCTION; }
bool MSMeanData_Net::MSLaneMeanDataValues::notifyLeave(SUMOTrafficObject& veh, double /*lastPos*/, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) { if ((myParent == nullptr || myParent->vehicleApplies(veh)) && ( getLane() == nullptr || !veh.isVehicle() || getLane() == static_cast<MSVehicle&>(veh).getLane())) { if (MSGlobals::gUseMesoSim) { removeFromVehicleUpdateValues(veh); } if (reason == MSMoveReminder::NOTIFICATION_ARRIVED) { ++nVehArrived; } else if (reason == MSMoveReminder::NOTIFICATION_LANE_CHANGE) { ++nVehLaneChangeFrom; } else if (myParent == nullptr || reason != MSMoveReminder::NOTIFICATION_SEGMENT) { ++nVehLeft; if (reason == MSMoveReminder::NOTIFICATION_VAPORIZED) { ++nVehVaporized; } } } if (MSGlobals::gUseMesoSim) { return false; } return reason == MSMoveReminder::NOTIFICATION_JUNCTION; }