SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
MSE3Collector::MSE3EntryReminder Class Reference

A place on the road net (at a certain lane and position on it) where the E3 area begins. More...

#include <MSE3Collector.h>

Inheritance diagram for MSE3Collector::MSE3EntryReminder:
Inheritance graph
Collaboration diagram for MSE3Collector::MSE3EntryReminder:
Collaboration graph

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

const std::string & getDescription () const
 
const MSLanegetLane () const
 Returns the lane the reminder works on. More...
 
 MSE3EntryReminder (const MSCrossSection &crossSection, MSE3Collector &collector)
 Constructor. More...
 
virtual void notifyMoveInternal (const SUMOVehicle &veh, const SUMOReal frontOnLane, const SUMOReal timeOnLane, const SUMOReal meanSpeedFrontOnLane, const SUMOReal meanSpeedVehicleOnLane, const SUMOReal travelledDistanceFrontOnLane, const SUMOReal travelledDistanceVehicleOnLane)
 Internal notification about the vehicle moves. More...
 
void setDescription (const std::string &description)
 
Methods inherited from MSMoveReminder.
bool notifyMove (SUMOVehicle &veh, SUMOReal, SUMOReal newPos, SUMOReal)
 Checks whether the vehicle enters. More...
 
bool notifyLeave (SUMOVehicle &veh, SUMOReal lastPos, MSMoveReminder::Notification reason)
 Processes state changes of a vehicle. More...
 
Interface methods, to be derived by subclasses
virtual bool notifyEnter (SUMOVehicle &veh, Notification reason)
 Checks whether the reminder is activated by a vehicle entering the lane. More...
 
void updateDetector (SUMOVehicle &veh, SUMOReal entryPos, SUMOReal leavePos, SUMOTime entryTime, SUMOTime currentTime, SUMOTime leaveTime, bool cleanUp)
 

Protected Member Functions

void removeFromVehicleUpdateValues (SUMOVehicle &veh)
 

Protected Attributes

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

Private Member Functions

 MSE3EntryReminder (const MSE3EntryReminder &)
 Invalidated copy constructor. More...
 
MSE3EntryReminderoperator= (const MSE3EntryReminder &)
 Invalidated assignment operator. More...
 

Private Attributes

MSE3CollectormyCollector
 The parent collector. More...
 
SUMOReal myPosition
 The position on the lane. More...
 

Detailed Description

A place on the road net (at a certain lane and position on it) where the E3 area begins.

Definition at line 71 of file MSE3Collector.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) XXX: What if a vehicle changes lanes and passes a junction simultaneously?

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

MSE3Collector::MSE3EntryReminder::MSE3EntryReminder ( const MSCrossSection crossSection,
MSE3Collector collector 
)

Constructor.

Parameters
[in]crossSectionThe position at which the entry lies
[in]collectorThe detector the entry belongs to

Definition at line 51 of file MSE3Collector.cpp.

MSE3Collector::MSE3EntryReminder::MSE3EntryReminder ( const MSE3EntryReminder )
private

Invalidated copy constructor.

Member Function Documentation

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

Definition at line 225 of file MSMoveReminder.h.

References MSMoveReminder::myDescription.

virtual bool MSMoveReminder::notifyEnter ( SUMOVehicle veh,
Notification  reason 
)
inlinevirtualinherited

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 in MSMeanData::MeanDataValueTracker, MSE2Collector, MSDevice_Routing, MSTriggeredRerouter, MSMeanData_Net::MSLaneMeanDataValues, MSCalibrator::VehicleRemover, MSInductLoop, MSDevice_Tripinfo, MSMeanData_Amitran::MSLaneMeanDataValues, MSDevice_Example, MSDevice_BTsender, MSMeanData::MeanDataValues, MSDevice_BTreceiver, MSDevice_Vehroutes, MSRouteProbe, MSDevice_Battery, and MSDevice_Transportable.

Definition at line 130 of file MSMoveReminder.h.

References UNUSED_PARAMETER.

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

Processes state changes of a vehicle.

If the reported vehicle is known, and the reason indicates a removal from the network (permanent or temporary), the vehicle is removed from the list of vehicles to regard.

Parameters
[in]vehThe leaving vehicle.
[in]lastPosPosition on the lane when leaving.
[in]reasonThe reason for the state change
See also
MSMoveReminder::notifyLeave

Reimplemented from MSMoveReminder.

Definition at line 79 of file MSE3Collector.cpp.

References SUMOVehicle::getID(), MSMoveReminder::NOTIFICATION_ARRIVED, SUMO_TAG_E3DETECTOR, toString(), and WRITE_WARNING.

bool MSE3Collector::MSE3EntryReminder::notifyMove ( SUMOVehicle veh,
SUMOReal  oldPos,
SUMOReal  newPos,
SUMOReal  newSpeed 
)
virtual

Checks whether the vehicle enters.

As soon as the reported vehicle enters the detector area (position>myPosition) the entering time is computed and both are added to the parent detector using "enter".

Parameters
[in]vehThe vehicle in question.
[in]oldPosPosition before the move-micro-timestep.
[in]newPosPosition after the move-micro-timestep.
[in]newSpeedUnused here.
Returns
False, if vehicle passed the detector entierly, else true.
See also
MSMoveReminder
MSMoveReminder::notifyMove
MSE3Collector::enter

Reimplemented from MSMoveReminder.

Definition at line 58 of file MSE3Collector.cpp.

References MSNet::getInstance(), SUMOVehicle::getPreviousSpeed(), MSGlobals::gSemiImplicitEulerUpdate, MSCFModel::passingTime(), STEPS2TIME, SUMOReal, and TS.

virtual void MSMoveReminder::notifyMoveInternal ( const SUMOVehicle veh,
const SUMOReal  frontOnLane,
const SUMOReal  timeOnLane,
const SUMOReal  meanSpeedFrontOnLane,
const SUMOReal  meanSpeedVehicleOnLane,
const SUMOReal  travelledDistanceFrontOnLane,
const SUMOReal  travelledDistanceVehicleOnLane 
)
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]frontOnLanetime the front of the vehicle spent on the lane.
[in]timeOnLanetime some part of the vehicle spent on the lane.
[in]meanSpeedFrontOnLaneAverage speed for the time that the front is on the lane.
[in]meanSpeedVehicleOnLaneAverage speed for the time that the vehicle is on the lane (with front or back).
[in]travelledDistanceFrontOnLanedistance travelled while overlapping with the lane.
[in]travelledDistanceVehicleOnLanedistance travelled while front was on the lane.

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

Definition at line 205 of file MSMoveReminder.h.

References UNUSED_PARAMETER.

Referenced by MSMoveReminder::updateDetector().

MSE3EntryReminder& MSE3Collector::MSE3EntryReminder::operator= ( const MSE3EntryReminder )
private

Invalidated assignment operator.

void MSMoveReminder::removeFromVehicleUpdateValues ( SUMOVehicle veh)
protectedinherited
void MSMoveReminder::setDescription ( const std::string &  description)
inlineinherited
void MSMoveReminder::updateDetector ( SUMOVehicle veh,
SUMOReal  entryPos,
SUMOReal  leavePos,
SUMOTime  entryTime,
SUMOTime  currentTime,
SUMOTime  leaveTime,
bool  cleanUp 
)
inherited

Field Documentation

MSE3Collector& MSE3Collector::MSE3EntryReminder::myCollector
private

The parent collector.

Definition at line 118 of file MSE3Collector.h.

std::string MSMoveReminder::myDescription
protectedinherited

a description of this moveReminder

Definition at line 237 of file MSMoveReminder.h.

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

SUMOReal MSE3Collector::MSE3EntryReminder::myPosition
private

The position on the lane.

Definition at line 121 of file MSE3Collector.h.


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