SUMO - Simulation of Urban MObility
MSCalibrator::VehicleRemover Class Reference

#include <MSCalibrator.h>

Inheritance diagram for MSCalibrator::VehicleRemover:
MSMoveReminder

Public Types

enum  Notification {
  NOTIFICATION_DEPARTED, NOTIFICATION_JUNCTION, NOTIFICATION_SEGMENT, NOTIFICATION_LANE_CHANGE,
  NOTIFICATION_TELEPORT, NOTIFICATION_PARKING, NOTIFICATION_ARRIVED, NOTIFICATION_VAPORIZED,
  NOTIFICATION_TELEPORT_ARRIVED
}
 Definition of a vehicle state. More...
 

Public Member Functions

void disable ()
 
const std::string & getDescription () const
 
const MSLanegetLane () const
 Returns the lane the reminder works on. More...
 
virtual bool notifyEnter (SUMOVehicle &veh, Notification reason)
 Checks whether the reminder is activated by a vehicle entering the lane. More...
 
virtual void notifyMoveInternal (SUMOVehicle &veh, SUMOReal timeOnLane, SUMOReal speed)
 Internal notification about the vehicle moves. More...
 
void setDescription (const std::string &description)
 
 VehicleRemover (MSLane *lane, int laneIndex, MSCalibrator *parent)
 
Interface methods, to be derived by subclasses
virtual bool notifyMove (SUMOVehicle &veh, SUMOReal oldPos, SUMOReal newPos, SUMOReal newSpeed)
 Checks whether the reminder still has to be notified about the vehicle moves. More...
 
virtual bool notifyLeave (SUMOVehicle &veh, SUMOReal lastPos, Notification reason)
 Called if the vehicle leaves the reminder's lane. More...
 

Protected Attributes

std::string myDescription
 a description of this moveReminder More...
 
MSLane *const myLane
 Lane on which the reminder works. More...
 

Private Attributes

int myLaneIndex
 
MSCalibratormyParent
 

Detailed Description

Definition at line 105 of file MSCalibrator.h.

Member Enumeration Documentation

Definition of a vehicle state.

Enumerator
NOTIFICATION_DEPARTED 

The vehicle has departed (was inserted into the network)

NOTIFICATION_JUNCTION 

The vehicle arrived at a junction.

NOTIFICATION_SEGMENT 

The vehicle changes the segment (meso only)

NOTIFICATION_LANE_CHANGE 

The vehicle changes lanes (micro only)

NOTIFICATION_TELEPORT 

The vehicle is being teleported.

NOTIFICATION_PARKING 

The vehicle starts or ends parking.

NOTIFICATION_ARRIVED 

The vehicle arrived at its destination (is deleted)

NOTIFICATION_VAPORIZED 

The vehicle got vaporized.

NOTIFICATION_TELEPORT_ARRIVED 

The vehicle was teleported out of the net.

Definition at line 95 of file MSMoveReminder.h.

Constructor & Destructor Documentation

MSCalibrator::VehicleRemover::VehicleRemover ( MSLane lane,
int  laneIndex,
MSCalibrator parent 
)
inline

Definition at line 107 of file MSCalibrator.h.

Member Function Documentation

void MSCalibrator::VehicleRemover::disable ( )
inline

Definition at line 125 of file MSCalibrator.h.

References myParent.

const std::string& MSMoveReminder::getDescription ( ) const
inlineinherited

Definition at line 215 of file MSMoveReminder.h.

References MSMoveReminder::myDescription.

bool MSCalibrator::VehicleRemover::notifyEnter ( SUMOVehicle veh,
Notification  reason 
)
virtual

Checks whether the reminder is activated by a vehicle entering the lane.

Lane change means in this case that the vehicle changes to the lane the reminder is placed at.

Parameters
[in]vehThe entering vehicle.
[in]reasonhow the vehicle enters the lane
Returns
True if vehicle enters the reminder.
See also
Notification

Reimplemented from MSMoveReminder.

Definition at line 484 of file MSCalibrator.cpp.

References Named::getID(), MSBaseVehicle::getID(), MSNet::getInstance(), MSCalibrator::invalidJam(), MSCalibrator::isActive(), MSCalibrator::myClearedInJam, MSCalibrator::myCurrentStateInterval, MSCalibrator::myHaveWarnedAboutClearingJam, Named::myID, myLaneIndex, myParent, MSCalibrator::myRemoved, MSCalibrator::passed(), MSCalibrator::scheduleRemoval(), time2string(), MSCalibrator::totalWished(), MSCalibrator::updateMeanData(), and WRITE_WARNING.

virtual bool MSMoveReminder::notifyLeave ( SUMOVehicle veh,
SUMOReal  lastPos,
Notification  reason 
)
inlinevirtualinherited

Called if the vehicle leaves the reminder's lane.

Informs if vehicle leaves reminder lane (due to lane change, removal from the network, or leaving to the next lane). The default is to do nothing.

Parameters
[in]vehThe leaving vehicle.
[in]lastPosPosition on the lane when leaving.
[in]reasonhow the vehicle leaves the lane
See also
Notification
Returns
True if the reminder wants to receive further info.

Reimplemented in MSMeanData::MeanDataValueTracker, MSE3Collector::MSE3LeaveReminder, MSE2Collector, MSInductLoop, MSDevice_BTreceiver, MSMeanData::MeanDataValues, MSDevice_BTsender, MSDevice_Example, MSInstantInductLoop, MSDevice_Vehroutes, MSE3Collector::MSE3EntryReminder, MSDevice_Person, MSDevice_Tripinfo, MSDevice_Container, and MSMeanData_Net::MSLaneMeanDataValues.

Definition at line 175 of file MSMoveReminder.h.

References UNUSED_PARAMETER.

virtual bool MSMoveReminder::notifyMove ( SUMOVehicle veh,
SUMOReal  oldPos,
SUMOReal  newPos,
SUMOReal  newSpeed 
)
inlinevirtualinherited

Checks whether the reminder still has to be notified about the vehicle moves.

Indicator if the reminders is still active for the passed vehicle/parameters. If false, the vehicle will erase this reminder from it's reminder-container.

Parameters
[in]vehVehicle that asks this reminder.
[in]oldPosPosition before move.
[in]newPosPosition after move with newSpeed.
[in]newSpeedMoving speed.
Returns
True if vehicle hasn't passed the reminder completely.

Reimplemented in MSE3Collector::MSE3LeaveReminder, MSE2Collector, MSInductLoop, MSDevice_BTreceiver, MSMeanData::MeanDataValues, MSDevice_BTsender, MSDevice_Emissions, MSE3Collector::MSE3EntryReminder, MSInstantInductLoop, MSDevice_Example, MSDevice_Tripinfo, MSDevice_Person, and MSDevice_Container.

Definition at line 150 of file MSMoveReminder.h.

References UNUSED_PARAMETER.

virtual void MSMoveReminder::notifyMoveInternal ( SUMOVehicle veh,
SUMOReal  timeOnLane,
SUMOReal  speed 
)
inlinevirtualinherited

Internal notification about the vehicle moves.

Indicator if the reminders is still active for the passed vehicle/parameters. If false, the vehicle will erase this reminder from it's reminder-container.

Parameters
[in]vehVehicle that asks this reminder.
[in]timeOnLanetime the vehicle spent on the lane.
[in]speedMoving speed.

Reimplemented in MSMeanData::MeanDataValueTracker, MSMeanData_Net::MSLaneMeanDataValues, MSMeanData_Harmonoise::MSLaneMeanDataValues, MSMeanData_Amitran::MSLaneMeanDataValues, and MSMeanData_Emissions::MSLaneMeanDataValues.

Definition at line 203 of file MSMoveReminder.h.

References UNUSED_PARAMETER.

void MSMoveReminder::setDescription ( const std::string &  description)
inlineinherited

Definition at line 211 of file MSMoveReminder.h.

References MSMoveReminder::myDescription.

Referenced by MSMeanData::init(), and MSCalibrator::MSCalibrator().

Field Documentation

std::string MSMoveReminder::myDescription
protectedinherited

a description of this moveReminder

Definition at line 229 of file MSMoveReminder.h.

Referenced by MSMoveReminder::getDescription(), and MSMoveReminder::setDescription().

MSLane* const MSMoveReminder::myLane
protectedinherited
int MSCalibrator::VehicleRemover::myLaneIndex
private

Definition at line 130 of file MSCalibrator.h.

Referenced by notifyEnter().

MSCalibrator* MSCalibrator::VehicleRemover::myParent
private

Definition at line 131 of file MSCalibrator.h.

Referenced by disable(), and notifyEnter().


The documentation for this class was generated from the following files: