![]() |
Eclipse SUMO - Simulation of Urban MObility
|
The ToC Device controls transition of control between automated and manual driving. More...
#include <MSDevice_ToC.h>
Data Structures | |
struct | OpenGapParams |
Public Types | |
enum | Notification { NOTIFICATION_DEPARTED, NOTIFICATION_JUNCTION, NOTIFICATION_SEGMENT, NOTIFICATION_LANE_CHANGE, NOTIFICATION_TELEPORT, NOTIFICATION_PARKING, NOTIFICATION_ARRIVED, NOTIFICATION_VAPORIZED, NOTIFICATION_TELEPORT_ARRIVED, NOTIFICATION_PARKING_REROUTE } |
Definition of a vehicle state. More... | |
Public Member Functions | |
void | addTo (const StoringVisitor &cont) const |
Adds this object to the given container. More... | |
SUMOTime | awarenessRecoveryStep (SUMOTime t) |
Continue the awareness recovery for one time step. More... | |
const std::string | deviceName () const override |
return the name for this type of device More... | |
virtual void | generateOutput () const |
Called on writing tripinfo output. More... | |
bool | generatesOutput () |
Whether this device requested to write output. More... | |
const std::string & | getDescription () const |
SUMOVehicle & | getHolder () const |
Returns the vehicle that holds this device. More... | |
const std::string & | getID () const |
Returns the id. More... | |
const MSLane * | getLane () const |
Returns the lane the reminder works on. More... | |
SUMOVehicle::NumericalID | getNumericalID () const |
std::string | getParameter (const std::string &key) const override |
try to retrieve the given parameter from this device. Throw exception for unsupported key More... | |
virtual void | loadState (const SUMOSAXAttributes &attrs) |
Loads the state of the device from the given description. More... | |
SUMOTime | MRMExecutionStep (SUMOTime t) |
Continue the MRM for one time step. More... | |
bool | notifyMove (SUMOTrafficObject &veh, double oldPos, double newPos, double newSpeed) override |
Return value indicates whether the device still wants to be notified about the vehicle movement. More... | |
virtual void | notifyMoveInternal (const SUMOTrafficObject &veh, const double frontOnLane, const double timeOnLane, const double meanSpeedFrontOnLane, const double meanSpeedVehicleOnLane, const double travelledDistanceFrontOnLane, const double travelledDistanceVehicleOnLane, const double meanLengthOnLane) |
Internal notification about the vehicle moves. More... | |
virtual void | saveState (OutputDevice &out) const |
Saves the state of the device. More... | |
void | setDescription (const std::string &description) |
void | setID (const std::string &newID) |
resets the id More... | |
void | setParameter (const std::string &key, const std::string &value) override |
try to set the given parameter for this device. Throw exception for unsupported key More... | |
SUMOTime | ToCPreparationStep (SUMOTime t) |
Continue the ToC preparation for one time step. More... | |
SUMOTime | triggerDownwardToC (SUMOTime t) |
Trigger execution of a ToC X–>MANUAL ("downwards") More... | |
SUMOTime | triggerMRM (SUMOTime t) |
Trigger execution of an MRM. More... | |
SUMOTime | triggerUpwardToC (SUMOTime t) |
Trigger execution of a ToC X–>AUTOMATED ("upwards") More... | |
void | writeOutput () |
Write output to file given by option device.toc.file. More... | |
~MSDevice_ToC () | |
Destructor. More... | |
Interface methods, to be derived by subclasses | |
virtual bool | notifyEnter (SUMOTrafficObject &veh, Notification reason, const MSLane *enteredLane) |
Checks whether the reminder is activated by a vehicle entering the lane. More... | |
virtual bool | notifyLeave (SUMOTrafficObject &veh, double lastPos, Notification reason, const MSLane *enteredLane=0) |
Called if the vehicle leaves the reminder's lane. More... | |
void | updateDetector (SUMOTrafficObject &veh, double entryPos, double leavePos, SUMOTime entryTime, SUMOTime currentTime, SUMOTime leaveTime, bool cleanUp) |
Static Public Member Functions | |
static void | buildTransportableDevices (MSTransportable &p, std::vector< MSTransportableDevice *> &into) |
Build devices for the given person, if needed. More... | |
static void | buildVehicleDevices (SUMOVehicle &v, std::vector< MSVehicleDevice *> &into) |
Build devices for the given vehicle, if needed. More... | |
static bool | checkOptions (OptionsCont &oc) |
check device-specific options More... | |
static void | cleanup () |
Closes root tags of output files. More... | |
static void | cleanupAll () |
perform cleanup for all devices More... | |
static std::mt19937 * | getEquipmentRNG () |
template<class T > | |
static std::string | getIDSecure (const T *obj, const std::string &fallBack="NULL") |
get an identifier for Named-like object which may be Null More... | |
static const std::set< MSDevice_ToC *, ComparatorNumericalIdLess > & | getInstances () |
returns all currently existing ToC devices More... | |
static std::mt19937 * | getResponseTimeRNG () |
static void | insertOptions (OptionsCont &oc) |
Inserts MSDevice_ToC-options. More... | |
Protected Member Functions | |
void | removeFromVehicleUpdateValues (SUMOTrafficObject &veh) |
Static Protected Member Functions | |
Helper methods for device assignment | |
static void | insertDefaultAssignmentOptions (const std::string &deviceName, const std::string &optionsTopic, OptionsCont &oc, const bool isPerson=false) |
Adds common command options that allow to assign devices to vehicles. More... | |
template<class DEVICEHOLDER > | |
static bool | equippedByDefaultAssignmentOptions (const OptionsCont &oc, const std::string &deviceName, DEVICEHOLDER &v, bool outputOptionSet, const bool isPerson=false) |
Determines whether a vehicle should get a certain device. More... | |
Helper methods for parsing parameters | |
static std::string | getStringParam (const SUMOVehicle &v, const OptionsCont &oc, std::string paramName, std::string deflt, bool required) |
static double | getFloatParam (const SUMOVehicle &v, const OptionsCont &oc, std::string paramName, double deflt, bool required) |
static bool | getBoolParam (const SUMOVehicle &v, const OptionsCont &oc, std::string paramName, bool deflt, bool required) |
Protected Attributes | |
std::string | myDescription |
a description of this moveReminder More... | |
SUMOVehicle & | myHolder |
The vehicle that stores the device. More... | |
std::string | myID |
The name of the object. More... | |
MSLane *const | myLane |
Lane on which the reminder works. More... | |
Private Types | |
enum | ToCState { UNDEFINED = 0, MANUAL = 1, AUTOMATED = 2, PREPARING_TOC = 3, MRM = 4, RECOVERING = 5 } |
Enum describing the different regimes for the device,. More... | |
Private Member Functions | |
bool | checkDynamicToC () |
Check if the vehicle should induce a ToC due to internal reasons. That is, if the route cannot be followed for more time than a given threshold,. More... | |
void | deactivateDeliberateLCs () |
Resets the holder's LC mode to the operational LC-mode of the ToC Device (. More... | |
void | descheduleMRM () |
Break MRM Process or remove MRM-Trigger command from the event-queue. More... | |
void | descheduleRecovery () |
Remove ongoing awareness recovery process from the event-queue. More... | |
void | descheduleToC () |
Remove scheduled ToC-Trigger command from the event-queue. More... | |
void | descheduleToCPreparation () |
Remove ongoing ToC-Preparation process from the event-queue. More... | |
void | initColorScheme () |
Initialize vehicle colors for different states. More... | |
bool | isAutomated () |
Whether the current operation mode is automated. More... | |
bool | isManuallyDriven () |
Whether the current operation mode is manual. More... | |
MSDevice_ToC (SUMOVehicle &holder, const std::string &id, const std::string &outputFilename, std::string manualType, std::string automatedType, SUMOTime responseTime, double recoveryRate, double lcAbstinence, double initialAwareness, double mrmDecel, double dynamicToCThreshold, double dynamicMRMProbability, double maxPreparationAccel, bool mrmKeepRight, bool useColorScheme, OpenGapParams ogp) | |
Constructor. More... | |
MSDevice_ToC (const MSDevice_ToC &) | |
Invalidated copy constructor. More... | |
MSDevice_ToC & | operator= (const MSDevice_ToC &) |
Invalidated assignment operator. More... | |
void | requestMRM () |
Request an MRM to be initiated immediately. No downward ToC will be scheduled. More... | |
void | requestToC (SUMOTime timeTillMRM, SUMOTime responseTime=-1000) |
Request a ToC. If the device is in AUTOMATED or MRM state, a driver response time is sampled and the ToC is scheduled. If the response is larger than timeTillMRM, an MRM is scheduled as well. If the device is in MANUAL or UNDEFINED state, it switches to AUTOMATED. The request is ignored if the state is already PREPARING_TOC. More... | |
void | resetDeliberateLCs () |
Resets the holder's LC mode to the last differing to LCModeMRM. More... | |
double | sampleResponseTime (double leadTime) const |
Samples a random driver response time from a truncated Gaussian with parameters according to the lookup tables. More... | |
void | setAwareness (double value) |
Set the awareness to the given value. More... | |
void | setState (ToCState state) |
Set the ToC device's state. More... | |
void | setVehicleColor () |
void | switchHolderType (const std::string &targetTypeID) |
Switch the device holder's vehicle type. More... | |
Static Private Member Functions | |
static double | interpolateVariance (double leadTime, double pMRM) |
Two-dimensional interpolation of variance from lookup table assumes pMRM >= 0, leadTime >= 0. More... | |
static double | responseTimeMean (double leadTime) |
Mean of the response time distribution. (Only depends on given lead time) More... | |
Helpers for parameter parsing | |
static std::string | getManualType (const SUMOVehicle &v, const OptionsCont &oc) |
static std::string | getAutomatedType (const SUMOVehicle &v, const OptionsCont &oc) |
static double | getResponseTime (const SUMOVehicle &v, const OptionsCont &oc) |
static double | getRecoveryRate (const SUMOVehicle &v, const OptionsCont &oc) |
static double | getLCAbstinence (const SUMOVehicle &v, const OptionsCont &oc) |
static double | getInitialAwareness (const SUMOVehicle &v, const OptionsCont &oc) |
static double | getMRMDecel (const SUMOVehicle &v, const OptionsCont &oc) |
static double | getDynamicToCThreshold (const SUMOVehicle &v, const OptionsCont &oc) |
static double | getDynamicMRMProbability (const SUMOVehicle &v, const OptionsCont &oc) |
static double | getMaxPreparationAccel (const SUMOVehicle &v, const OptionsCont &oc) |
static bool | getMRMKeepRight (const SUMOVehicle &v, const OptionsCont &oc) |
static bool | useColorScheme (const SUMOVehicle &v, const OptionsCont &oc) |
static std::string | getOutputFilename (const SUMOVehicle &v, const OptionsCont &oc) |
static OpenGapParams | getOpenGapParams (const SUMOVehicle &v, const OptionsCont &oc) |
static ToCState | _2ToCState (const std::string &) |
static std::string | _2string (ToCState state) |
Private Attributes | |
bool | myDynamicToCActive |
Switch for considering dynamic ToCs,. More... | |
int | myDynamicToCLane |
Lane, on which the ongoing dynamic ToC was issued. It can only be aborted if the lane was changed. More... | |
double | myDynamicToCThreshold |
Duration in s. for which the vehicle needs to be able to follow its route without a lane change to continue in automated mode (only has effect if dynamic ToCs are activated,. More... | |
std::queue< std::pair< SUMOTime, std::string > > | myEvents |
Storage for events to be written to the output. More... | |
MSVehicle * | myHolderMS |
The holder vehicle casted to MSVehicle*. More... | |
bool | myIssuedDynamicToC |
Flag to indicate that a dynamically triggered ToC is in preparation. More... | |
double | myMaxPreparationAccel |
Maximal acceleration that may be applied during the ToC preparation phase TODO: Make effective. More... | |
bool | myMRMKeepRight |
Whether vehicle tries to change to the right during an MRM. More... | |
double | myMRMProbability |
Probability of an MRM to occur after a dynamically triggered ToC. More... | |
OpenGapParams | myOpenGapParams |
Parameters for the openGap mechanism applied during ToC preparation phase. More... | |
double | myOriginalMaxAccel |
Storage for original maximal acceleration of vehicle. More... | |
OutputDevice * | myOutputFile |
The file the devices output goes to. More... | |
int | myPreviousLCMode |
LC mode overridden during MRM, stored for restoration. More... | |
private state members of the ToC device | |
std::string | myManualTypeID |
vehicle type ID for manual driving More... | |
std::string | myAutomatedTypeID |
vehicle type ID for automated driving More... | |
SUMOTime | myResponseTime |
Average response time needed by the driver to take back control. More... | |
double | myRecoveryRate |
Recovery rate for the driver's awareness after a ToC. More... | |
double | myLCAbstinence |
Level of the awareness below which no lane-changes are performed. More... | |
double | myInitialAwareness |
Average awareness the driver has initially after a ToC. More... | |
double | myMRMDecel |
Deceleration rate applied during MRM. More... | |
double | myCurrentAwareness |
Current awareness-level of the driver in [0,1]. More... | |
std::map< ToCState, RGBColor > | myColorScheme |
Coloring scheme,. More... | |
bool | myUseColorScheme |
Whether a coloring scheme shall by applied to indicate the different toc stages,. More... | |
ToCState | myState |
Current state of the device. More... | |
Commands sent to the EventControl (used for cleanup) | |
| |
WrappingCommand< MSDevice_ToC > * | myTriggerMRMCommand |
WrappingCommand< MSDevice_ToC > * | myTriggerToCCommand |
WrappingCommand< MSDevice_ToC > * | myRecoverAwarenessCommand |
WrappingCommand< MSDevice_ToC > * | myExecuteMRMCommand |
WrappingCommand< MSDevice_ToC > * | myPrepareToCCommand |
Static Private Attributes | |
static std::set< std::string > | createdOutputFiles |
static int | LCModeMRM = 768 |
LC mode operational during an MRM. More... | |
static std::vector< double > | lookupResponseTimeLeadTimes = {0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.7999999999999999, 0.8999999999999999, 0.9999999999999999, 1.0999999999999999, 1.2, 1.3, 1.4, 1.5, 1.5999999999999999, 1.7, 1.8, 1.9, 2.0, 2.25, 2.5, 2.75, 3.0, 3.25, 3.5, 3.75, 4.0, 4.25, 4.5, 4.75, 5.0, 5.5, 6.0, 6.5, 7.0, 7.5, 8.0, 8.5, 9.0, 9.5, 10.0, 10.5, 11.0, 11.5, 12.0, 12.5, 13.0, 13.5, 14.0, 14.5, 15.0, 15.5, 16.0, 16.5, 17.0, 17.5, 18.0, 18.5, 19.0, 19.5, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0, 47.0, 48.0, 49.0, 50.0} |
static std::vector< double > | lookupResponseTimeMRMProbs = {0.0, 0.05, 0.1, 0.15000000000000002, 0.2, 0.25, 0.30000000000000004, 0.35000000000000003, 0.4, 0.45, 0.5} |
Grid of the response time distribution. More... | |
static std::vector< std::vector< double > > | lookupResponseTimeVariances |
Variances of the response time distribution. Given the lead time and the MRM probability the variances in this table ensure that for the mean returned by responseTimeMean(leadTime) an MRM will occur with probability pMRM. More... | |
static std::set< MSDevice_ToC *, ComparatorNumericalIdLess > | myInstances = std::set<MSDevice_ToC*, ComparatorNumericalIdLess>() |
static std::mt19937 | myResponseTimeRNG |
Random generator for ToC devices. More... | |
The ToC Device controls transition of control between automated and manual driving.
Definition at line 55 of file MSDevice_ToC.h.
|
inherited |
Definition of a vehicle state.
Definition at line 89 of file MSMoveReminder.h.
|
private |
Enum describing the different regimes for the device,.
Enumerator | |
---|---|
UNDEFINED | |
MANUAL | |
AUTOMATED | |
PREPARING_TOC | |
MRM | |
RECOVERING |
Definition at line 111 of file MSDevice_ToC.h.
MSDevice_ToC::~MSDevice_ToC | ( | ) |
Destructor.
Definition at line 440 of file MSDevice_ToC.cpp.
References WrappingCommand< T >::deschedule(), myExecuteMRMCommand, myInstances, myPrepareToCCommand, myRecoverAwarenessCommand, myTriggerMRMCommand, myTriggerToCCommand, and resetDeliberateLCs().
|
private |
Constructor.
[in] | holder | The vehicle that holds this device |
[in] | id | The ID of the device |
[in] | file | The file to write the device's output to |
[in] | manualType | vType that models manual driving |
[in] | automatedType | vType that models automated driving |
[in] | responseTime | time lapse until vType switch after request was received |
[in] | recoveryRate | rate at which the awareness increases after the takeover |
[in] | lcAbstinence | awareness level below which no lane changes are taken out |
[in] | initialAwareness | value to which the awareness is set after takeover |
[in] | mrmDecel | constant deceleration rate assumed to be applied during an MRM |
[in] | useColorScheme | whether the color of the vehicle should be changed according to its current ToC-state |
[in] | ogp | parameters for the openGap mechanism applied during ToC preparation phase |
Definition at line 315 of file MSDevice_ToC.cpp.
References _2string(), MSDevice_ToC::OpenGapParams::active, MSDevice_ToC::OpenGapParams::changeRate, createdOutputFiles, OutputDevice::getDevice(), SUMOTrafficObject::getID(), MSVehicleType::getID(), MSNet::getInstance(), MSRouteHandler::getParsingRNG(), MSNet::getVehicleControl(), SUMOTrafficObject::getVehicleType(), MSVehicleControl::getVType(), MSVehicleControl::getVTypeDistributionMembership(), MSVehicleControl::hasVType(), MSVehicleControl::hasVTypeDistribution(), initColorScheme(), MSDevice_ToC::OpenGapParams::maxDecel, myAutomatedTypeID, myCurrentAwareness, myHolderMS, myInitialAwareness, myInstances, myManualTypeID, myMRMDecel, myOpenGapParams, myOutputFile, myRecoveryRate, myResponseTime, myState, MSDevice_ToC::OpenGapParams::newSpaceHeadway, MSDevice_ToC::OpenGapParams::newTimeHeadway, and OutputDevice::openTag().
Referenced by buildVehicleDevices(), and getResponseTimeRNG().
|
private |
Invalidated copy constructor.
|
staticprivate |
Definition at line 996 of file MSDevice_ToC.cpp.
References AUTOMATED, MANUAL, MRM, PREPARING_TOC, RECOVERING, toString(), UNDEFINED, and WRITE_WARNING.
Referenced by getParameter(), and MSDevice_ToC().
|
staticprivate |
Definition at line 975 of file MSDevice_ToC.cpp.
References AUTOMATED, MANUAL, MRM, PREPARING_TOC, RECOVERING, UNDEFINED, and WRITE_WARNING.
|
inlineinherited |
Adds this object to the given container.
Definition at line 127 of file Named.h.
References Named::StoringVisitor::add().
Continue the awareness recovery for one time step.
Definition at line 801 of file MSDevice_ToC.cpp.
References DELTA_T, WrappingCommand< T >::deschedule(), SUMOTrafficObject::getID(), MANUAL, MIN2(), myCurrentAwareness, MSVehicleDevice::myHolder, myRecoverAwarenessCommand, myRecoveryRate, setAwareness(), setState(), SIMTIME, and TS.
Referenced by deviceName(), and triggerDownwardToC().
|
staticinherited |
Build devices for the given person, if needed.
[in] | p | The person for which a device may be built |
Definition at line 112 of file MSDevice.cpp.
References MSTransportableDevice_FCD::buildDevices(), and MSTransportableDevice_Routing::buildDevices().
Referenced by MSTransportable::MSTransportable().
|
static |
Build devices for the given vehicle, if needed.
The options are read and evaluated whether a ToC-device shall be built for the given vehicle.
The built device is stored in the given vector.
[in] | v | The vehicle for which a device may be built |
Definition at line 151 of file MSDevice_ToC.cpp.
References MSDevice::equippedByDefaultAssignmentOptions(), getAutomatedType(), getDynamicMRMProbability(), getDynamicToCThreshold(), SUMOTrafficObject::getID(), getInitialAwareness(), getLCAbstinence(), getManualType(), getMaxPreparationAccel(), getMRMDecel(), getMRMKeepRight(), getOpenGapParams(), OptionsCont::getOptions(), getOutputFilename(), getRecoveryRate(), getResponseTime(), MSDevice_ToC(), TIME2STEPS, and useColorScheme().
Referenced by MSDevice::buildVehicleDevices(), and MSDevice_ToC::OpenGapParams::OpenGapParams().
|
private |
Check if the vehicle should induce a ToC due to internal reasons. That is, if the route cannot be followed for more time than a given threshold,.
Definition at line 1079 of file MSDevice_ToC.cpp.
References DYNAMIC_TOC_ABORT_RESISTANCE_FACTOR, MSVehicle::getBestLanes(), SUMOTrafficObject::getID(), MSVehicle::getLane(), MSVehicle::getNextStop(), MSLane::getNumericalID(), MSVehicle::getPositionOnLane(), MSVehicle::getSpeed(), MSVehicle::hasStops(), MSLane::isInternal(), MSVehicle::Stop::lane, MAX2(), myDynamicToCActive, myDynamicToCLane, myDynamicToCThreshold, MSVehicleDevice::myHolder, myHolderMS, myIssuedDynamicToC, myMRMDecel, and SIMTIME.
Referenced by getResponseTimeRNG(), and notifyMove().
|
staticinherited |
check device-specific options
Definition at line 86 of file MSDevice.cpp.
References MSDevice_Routing::checkOptions().
Referenced by MSFrame::checkOptions().
|
static |
Closes root tags of output files.
Definition at line 1033 of file MSDevice_ToC.cpp.
References OutputDevice::closeTag(), createdOutputFiles, fn, and OutputDevice::getDevice().
Referenced by MSNet::clearAll(), and getInstances().
|
staticinherited |
perform cleanup for all devices
Definition at line 119 of file MSDevice.cpp.
References MSDevice_FCD::cleanup(), MSRoutingEngine::cleanup(), and MSDevice_Tripinfo::cleanup().
Referenced by MSNet::clearAll(), and MSDevice::getEquipmentRNG().
|
private |
Resets the holder's LC mode to the operational LC-mode of the ToC Device (.
Definition at line 1056 of file MSDevice_ToC.cpp.
References SUMOTrafficObject::getID(), MSVehicle::getInfluencer(), MSVehicle::Influencer::getLaneChangeMode(), LCModeMRM, MSVehicleDevice::myHolder, myHolderMS, myPreviousLCMode, MSVehicle::Influencer::setLaneChangeMode(), and SIMTIME.
Referenced by getResponseTimeRNG(), MRMExecutionStep(), setAwareness(), and setState().
|
private |
Break MRM Process or remove MRM-Trigger command from the event-queue.
Definition at line 688 of file MSDevice_ToC.cpp.
References WrappingCommand< T >::deschedule(), myExecuteMRMCommand, myTriggerMRMCommand, and resetDeliberateLCs().
Referenced by getResponseTimeRNG(), triggerDownwardToC(), triggerMRM(), and triggerUpwardToC().
|
private |
Remove ongoing awareness recovery process from the event-queue.
Definition at line 724 of file MSDevice_ToC.cpp.
References WrappingCommand< T >::deschedule(), and myRecoverAwarenessCommand.
Referenced by getResponseTimeRNG(), requestMRM(), and triggerUpwardToC().
|
private |
Remove scheduled ToC-Trigger command from the event-queue.
Definition at line 704 of file MSDevice_ToC.cpp.
References WrappingCommand< T >::deschedule(), and myTriggerToCCommand.
Referenced by getResponseTimeRNG(), requestMRM(), triggerDownwardToC(), and triggerUpwardToC().
|
private |
Remove ongoing ToC-Preparation process from the event-queue.
Definition at line 712 of file MSDevice_ToC.cpp.
References WrappingCommand< T >::deschedule(), MRM, myPrepareToCCommand, myState, and resetDeliberateLCs().
Referenced by getResponseTimeRNG(), requestMRM(), ToCPreparationStep(), triggerDownwardToC(), and triggerUpwardToC().
|
inlineoverridevirtual |
return the name for this type of device
Implements MSDevice.
Definition at line 147 of file MSDevice_ToC.h.
References awarenessRecoveryStep(), getParameter(), MRMExecutionStep(), notifyMove(), setParameter(), ToCPreparationStep(), triggerDownwardToC(), triggerMRM(), triggerUpwardToC(), and writeOutput().
Referenced by getParameter(), and setParameter().
|
staticprotectedinherited |
Determines whether a vehicle should get a certain device.
[in] | oc | The options container to get the information about assignment from |
[in] | deviceName | The name of the device type |
[in] | v | The vehicle to determine whether it shall be equipped or not |
Definition at line 204 of file MSDevice.h.
References MSDevice::deviceName(), OptionsCont::exists(), OptionsCont::getBool(), OptionsCont::getFloat(), MSNet::getInstance(), OptionsCont::getOptions(), MSVehicleControl::getQuota(), OptionsCont::getStringVector(), MSNet::getVehicleControl(), OptionsCont::isSet(), MSDevice::myEquipmentRNG, MSDevice::myExplicitIDs, RandHelper::rand(), and StringUtils::toBool().
Referenced by MSTransportableDevice_FCD::buildDevices(), MSTransportableDevice_Routing::buildDevices(), MSDevice_Battery::buildVehicleDevices(), MSDevice_Example::buildVehicleDevices(), MSDevice_Bluelight::buildVehicleDevices(), MSDevice_FCD::buildVehicleDevices(), MSDevice_BTsender::buildVehicleDevices(), MSDevice_BTreceiver::buildVehicleDevices(), MSDevice_DriverState::buildVehicleDevices(), MSDevice_Emissions::buildVehicleDevices(), MSDevice_Routing::buildVehicleDevices(), buildVehicleDevices(), MSDevice_SSM::buildVehicleDevices(), and MSDevice::setParameter().
|
inlinevirtualinherited |
Called on writing tripinfo output.
The device may write some statistics into the tripinfo output. It is assumed that the written information is a valid xml-snipplet, which will be embedded within the vehicle's information.
The device should use the openTag / closeTag methods of the OutputDevice for correct indentation.
IOError | not yet implemented |
Reimplemented in MSDevice_SSM, MSDevice_Tripinfo, MSDevice_Bluelight, MSDevice_Example, MSDevice_Vehroutes, and MSDevice_Emissions.
Definition at line 125 of file MSDevice.h.
References MSDevice::loadState(), and MSDevice::saveState().
|
inline |
Whether this device requested to write output.
Definition at line 186 of file MSDevice_ToC.h.
References myOutputFile.
Referenced by notifyMove(), requestToC(), triggerDownwardToC(), triggerMRM(), triggerUpwardToC(), writeOutput(), and MSNet::writeOutput().
|
staticprivate |
Definition at line 207 of file MSDevice_ToC.cpp.
References DEFAULT_AUTOMATED_TYPE, and MSDevice::getStringParam().
Referenced by buildVehicleDevices().
|
staticprotectedinherited |
Definition at line 219 of file MSDevice.cpp.
References OptionsCont::getBool(), SUMOTrafficObject::getID(), Parameterised::getParameter(), SUMOVehicle::getParameter(), MSVehicleType::getParameter(), SUMOTrafficObject::getVehicleType(), OptionsCont::isSet(), Parameterised::knowsParameter(), StringUtils::toBool(), and WRITE_WARNING.
Referenced by getMRMKeepRight(), MSDevice::setParameter(), and useColorScheme().
|
inlineinherited |
Definition at line 228 of file MSMoveReminder.h.
References MSMoveReminder::myDescription, and MSMoveReminder::removeFromVehicleUpdateValues().
Referenced by MSBaseVehicle::getRNG(), MSE3Collector::MSE3EntryReminder::notifyEnter(), MSE3Collector::MSE3LeaveReminder::notifyEnter(), MSE3Collector::MSE3EntryReminder::notifyLeave(), MSE3Collector::MSE3LeaveReminder::notifyLeave(), MSE3Collector::MSE3EntryReminder::notifyMove(), MSE3Collector::MSE3LeaveReminder::notifyMove(), MSMeanData_Net::MSLaneMeanDataValues::notifyMoveInternal(), and MSMeanData_Net::MSLaneMeanDataValues::write().
|
staticprivate |
Definition at line 242 of file MSDevice_ToC.cpp.
References DEFAULT_MRM_PROBABILITY, MSDevice::getFloatParam(), MAX2(), MIN2(), toString(), and WRITE_WARNING.
Referenced by buildVehicleDevices().
|
staticprivate |
Definition at line 237 of file MSDevice_ToC.cpp.
References DEFAULT_DYNAMIC_TOC_THRESHOLD, and MSDevice::getFloatParam().
Referenced by buildVehicleDevices().
|
inlinestaticinherited |
Definition at line 91 of file MSDevice.h.
References MSDevice::cleanupAll(), MSDevice::deviceName(), and MSDevice::myEquipmentRNG.
Referenced by NLBuilder::initRandomness(), MSStateHandler::myStartElement(), and MSStateHandler::saveRNGs().
|
staticprotectedinherited |
Definition at line 186 of file MSDevice.cpp.
References OptionsCont::getFloat(), SUMOTrafficObject::getID(), Parameterised::getParameter(), SUMOVehicle::getParameter(), MSVehicleType::getParameter(), SUMOTrafficObject::getVehicleType(), OptionsCont::isSet(), Parameterised::knowsParameter(), StringUtils::toDouble(), and WRITE_WARNING.
Referenced by getDynamicMRMProbability(), getDynamicToCThreshold(), MSDevice_DriverState::getErrorNoiseIntensityCoefficient(), MSDevice_DriverState::getErrorTimeScaleCoefficient(), MSDevice_DriverState::getHeadwayChangePerceptionThreshold(), MSDevice_DriverState::getHeadwayErrorCoefficient(), MSDevice_DriverState::getInitialAwareness(), getInitialAwareness(), getLCAbstinence(), MSDevice_DriverState::getMaximalReactionTime(), getMaxPreparationAccel(), MSDevice_DriverState::getMinAwareness(), getMRMDecel(), getOpenGapParams(), getRecoveryRate(), getResponseTime(), MSDevice_DriverState::getSpeedDifferenceChangePerceptionThreshold(), MSDevice_DriverState::getSpeedDifferenceErrorCoefficient(), and MSDevice::setParameter().
|
inlineinherited |
Returns the vehicle that holds this device.
Definition at line 75 of file MSVehicleDevice.h.
References MSVehicleDevice::myHolder.
Referenced by MSChargingStation::addChargeValueForOutput().
|
inlineinherited |
Returns the id.
Definition at line 77 of file Named.h.
Referenced by MSLCM_LC2013::adaptSpeedToPedestrians(), MSVehicle::adaptToLeader(), MSVehicle::adaptToLeaders(), MSPModel_Remote::add(), MSPModel_Striping::add(), LaneStoringVisitor::add(), MSVehicleTransfer::add(), PCPolyContainer::add(), MSDetectorControl::add(), Named::StoringVisitor::add(), ShapeContainer::add(), NLTriggerBuilder::addAccess(), RORouteDef::addAlternative(), MSLane::addApproachingLane(), NBLoadedSUMOTLDef::addConnection(), NLHandler::addConnection(), MSPModel_Striping::addCrossingVehs(), RODFDetectorCon::addDetector(), RONet::addEdge(), NBParkingCont::addEdges2Keep(), ROJTREdge::addFollowerProbability(), MSTLLogicControl::TLSLogicVariants::addLogic(), MSLane::addNeigh(), RONet::addNode(), NIImporter_SUMO::addPhase(), GUIEdge::addRerouter(), RONet::addRouteDef(), NIXMLEdgesHandler::addSplit(), NBTrafficLightLogic::addStep(), ROVehicle::addStop(), MSRouteHandler::addStop(), MSVehicle::addStop(), MSNet::addStoppingPlace(), MSVehicle::addTraciStop(), MSVehicle::addTraciStopAtStoppingPlace(), AGActivityTripWriter::addTrip(), NIXMLConnectionsHandler::addWalkingArea(), libsumo::Helper::applySubscriptionFilters(), GUITrafficLightLogicWrapper::begin2TrackPhases(), MSTransportable::Stage_Waiting::beginEventOutput(), MSTransportable::Stage_Driving::beginEventOutput(), MSPModel_Striping::blockedAtDist(), MSLink::blockedAtTime(), MSLink::blockedByFoe(), NLEdgeControlBuilder::build(), NIVisumTL::build(), RODFNet::buildApproachList(), MSSOTLE2Sensors::buildContinueSensior(), MSSOTLE2Sensors::buildCountSensorForLane(), MSSOTLE2Sensors::buildCountSensorForOutLane(), NBNode::buildCrossings(), NBNode::buildCrossingsAndWalkingAreas(), NIImporter_VISUM::buildDistrictNode(), NLDetectorBuilder::buildE2Detector(), RODFNet::buildEdgeFlowMap(), GNETLSEditorFrame::buildIinternalLanes(), NBEdge::buildInnerEdges(), NGEdge::buildNBEdge(), NIVissimEdge::buildNBEdge(), NBRampsComputer::buildOffRamp(), NBRampsComputer::buildOnRamp(), MSRailSignal::DriveWay::buildRoute(), MELoop::buildSegmentsFor(), MSSOTLE2Sensors::buildSensorForLane(), MSSOTLE2Sensors::buildSensorForOutLane(), NBNode::buildWalkingAreas(), MSBaseVehicle::calculateArrivalParams(), MSSwarmTrafficLightLogic::calculateEtaDiff(), MSSwarmTrafficLightLogic::calculateEtaRatio(), MSSOTLPolicyBasedTrafficLightLogic::canRelease(), MSVehicle::canReverse(), MSLaneChanger::changeOpposite(), MELoop::changeSegment(), MSSimpleTrafficLightLogic::changeStepAndDuration(), MSEdge::checkAndRegisterBiDirEdge(), MSRailSignal::DriveWay::checkCrossingFlanks(), MSLane::checkForPedestrians(), MSVehicleTransfer::checkInsertions(), MSVehicle::checkLinkLeader(), MSDevice_Battery::checkParam(), MSE2Collector::checkPositioning(), MSVehicle::checkRewindLinkLanes(), MSLCM_SL2015::checkStrategicChange(), MSSwarmTrafficLightLogic::choosePolicy(), MSDevice_SSM::classifyEncounter(), ShapeContainer::clearHighlights(), NBTrafficLightLogic::closeBuilding(), ODDistrictHandler::closeDistrict(), NLHandler::closeEdge(), RORouteHandler::closeRouteDistribution(), RORouteHandler::closeVehicle(), NBTrafficLightDefinition::collectAllLinks(), NBTrafficLightDefinition::collectEdges(), NBLoadedSUMOTLDef::collectEdgeVectors(), NBLoadedTLDef::collectLinks(), ROJTRRouter::compute(), NBTrafficLightDefinition::compute(), NBNode::computeInternalLaneShape(), NBNode::computeLanes2Lanes(), NBNode::computeLogic(), NBOwnTLDef::computeLogicAndConts(), NBNode::computeNodeShape(), NBNodeShapeComputer::computeNodeShapeDefault(), NBNodeShapeComputer::computeNodeShapeSmall(), RODFNet::computeRoutesFor(), NBTrafficLightLogicCont::computeSingleLogic(), NBNode::computeSmoothShape(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NGNet::connect(), NBOwnTLDef::corridorLike(), MSSOTLWaveTrafficLightLogic::countVehicles(), MSSOTLE2Sensors::countVehicles(), MSDevice_SSM::createEncounters(), GUINet::createTLWrapper(), MSDeterministicHiLevelTrafficLightLogic::decideNextPhase(), MSSOTLPolicyBasedTrafficLightLogic::decideNextPhase(), MSSwarmTrafficLightLogic::decideNextPhase(), MSDeterministicHiLevelTrafficLightLogic::decidePolicy(), MSSwarmTrafficLightLogic::decidePolicy(), MSLane::detectCollisionBetween(), MSLane::detectCollisions(), MSLane::detectPedestrianJunctionCollision(), NIVissimDistrictConnection::dict_BuildDistricts(), MSTransportable::Stage_Waiting::endEventOutput(), MSTransportable::Stage_Driving::endEventOutput(), MSE3Collector::enter(), MSVehicle::enterLaneAtMove(), METriggeredCalibrator::execute(), Command_SaveTLSState::execute(), Command_SaveTLSSwitchStates::execute(), Command_SaveTLSSwitches::execute(), MSVTypeProbe::execute(), MSCalibrator::execute(), MSTrafficLightLogic::SwitchCommand::execute(), MSPModel_Striping::MovePedestrians::execute(), MSVehicle::executeMove(), MSLane::executeMovements(), NBNodeCont::extract(), NBTrafficLightLogicCont::extract(), libsumo::Helper::findCloserLane(), MSRailSignal::DriveWay::findFlankProtection(), MSDevice_SSM::findFoeConflictLane(), libsumo::Simulation::findIntermodalRoute(), MSDevice_SSM::findSurroundingVehicles(), MSDevice_SSM::flushConflicts(), NBTrafficLightDefinition::forbids(), NBNodeCont::generateNodeClusters(), RODFDetectorCon::getAggFlowFor(), RODFDetectorCon::getAnyDetectorForEdge(), MSPModel_Striping::getArbitraryPath(), MSVehicle::getBackPosition(), MSVehicle::getBackPositionOnLane(), libsumo::Vehicle::getBestLanes(), NBOwnTLDef::getBestPair(), NBRailwayTopologyAnalyzer::getBrokenRailNodes(), MSVehicle::getCenterOnEdge(), MSDevice_Battery::getChargingStationID(), MSRailSignal::getClickableTLLinkID(), GUILane::getColorValue(), libsumo::TrafficLight::getControlledLinks(), MSLane::getCriticalLeader(), NBNodeShapeComputer::getDefaultRadius(), NBTrafficLightDefinition::getDescription(), MSLink::getDescription(), GUIPerson::getDestinationEdgeID(), RODFNet::getDetectorEdge(), libsumo::Lane::getEdgeID(), GUIMEVehicle::getEdgeID(), GUIPerson::getEdgeID(), MSMeanData::getEdgeID(), MSPModel_Remote::getFirstPedestrianLane(), MSLane::getFollower(), MSLane::getFollowersOnConsecutive(), GUIPerson::getFromEdgeID(), MSCalibrator::getID(), MSRailSignal::LinkInfo::getID(), NBEdge::getID(), libsumo::LaneArea::getLaneID(), libsumo::InductionLoop::getLaneID(), libsumo::Vehicle::getLaneID(), MSParkingArea::getLastFreePosWithReservation(), MSLane::getLastVehicleInformation(), MSVehicle::getLatOffset(), MSLane::getLeader(), MSLink::getLeaderInfo(), MSLane::getLeaderOnConsecutive(), MSLane::getLeadersOnConsecutive(), MSLink::getLengthBeforeCrossing(), MSLane::getLinkTo(), MSTLLogicControl::TLSLogicVariants::getLogicInstantiatingOff(), MSDeterministicHiLevelTrafficLightLogic::getMeanSpeedForInputLanes(), MSDeterministicHiLevelTrafficLightLogic::getMeanSpeedForOutputLanes(), NIImporter_VISUM::getNamedEdgeContinuating(), MSPerson::getNextEdge(), MSPModel_Striping::getNextLane(), MSLane::getOppositeFollower(), MSLane::getOppositeLeader(), MSLane::getOppositePos(), libsumo::Simulation::getParameter(), GUITrafficLightLogicWrapper::getParameterWindow(), GUIInstantInductLoop::MyWrapper::getParameterWindow(), GUIMEInductLoop::MyWrapper::getParameterWindow(), GUIE2Collector::MyWrapper::getParameterWindow(), GUIInductLoop::MyWrapper::getParameterWindow(), GUILane::getParameterWindow(), MSLane::getPartialBehind(), MSSOTLTrafficLightLogic::getPhaseIndexWithMaxCTS(), MSSwarmTrafficLightLogic::getPheromoneForInputLanes(), MSSwarmTrafficLightLogic::getPheromoneForOutputLanes(), PolygonDynamics::getPolygonID(), GUITrafficLightLogicWrapper::getPopUpMenu(), NLTriggerBuilder::getPosition(), NLDetectorBuilder::getPositionChecking(), libsumo::Person::getRoadID(), libsumo::Vehicle::getRoadID(), MSLCM_LC2013::getRoundaboutDistBonus(), libsumo::Vehicle::getRouteID(), MSVehicle::getSafeFollowSpeed(), libsumo::Person::getStage(), MSContainer::MSContainerStage_Driving::getStageSummary(), MSPerson::MSPersonStage_Walking::getStageSummary(), MSContainer::MSContainerStage_Tranship::getStageSummary(), MSPerson::MSPersonStage_Driving::getStageSummary(), MSTransportable::Stage_Trip::getStageSummary(), MSPerson::MSPersonStage_Access::getStageSummary(), MSTransportable::Stage_Waiting::getStageSummary(), MSNet::getStoppingPlaceID(), MSLane::getSurroundingVehicles(), MSRailSignal::getTLLinkID(), MSLane::getUpcomingLinks(), MSDevice_SSM::getUpstreamVehicles(), MSPModel_Striping::getVehicleObstacles(), MSDevice_SSM::getVehiclesOnJunction(), MSTransportable::Stage_Driving::getWaitingDescription(), MSLink::getZipperSpeed(), NBNode::guessCrossings(), RODFDetectorCon::guessEmptyFlows(), NBNodeCont::guessTLs(), GUITLLogicPhasesTrackerWindow::GUITLLogicPhasesTrackerWindow(), MSLane::handleCollisionBetween(), MSVehicle::haveValidStopEdges(), libsumo::POI::highlight(), MSVehicle::ignoreRed(), MSDeterministicHiLevelTrafficLightLogic::init(), MSRailSignal::init(), MSDelayBasedTrafficLightLogic::init(), MSActuatedTrafficLightLogic::init(), MSTrafficLightLogic::init(), MSSOTLTrafficLightLogic::init(), MSSwarmTrafficLightLogic::init(), MSE2Collector::initAuxiliaries(), NIImporter_SUMO::initTrafficLightLogic(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NBDistrictCont::insert(), NBTrafficLightLogicCont::insert(), NBNodeCont::insert(), MSEdge::insertVehicle(), MSLane::integrateNewVehicles(), GNEJunction::invalidateTLS(), NBNode::invalidateTLS(), MSTLLogicControl::isActive(), MSPedestrianPushButton::isActiveForEdge(), MSPedestrianPushButton::isActiveOnAnySideOfTheRoad(), RODFNet::isDestination(), RODFNet::isFalseSource(), MSLane::isInsertionSuccess(), MSVehicle::isLeader(), MESegment::isOpen(), RODFNet::isSource(), NIImporter_VISUM::isSplitEdge(), MSSOTLTrafficLightLogic::isThresholdPassed(), MESegment::jamThresholdForSpeed(), NBNodeShapeComputer::joinSameDirectionEdges(), NBEdgeCont::joinSameNodeConnectingEdges(), MSAbstractLaneChangeModel::laneChangeOutput(), MSE3Collector::leave(), MSE3Collector::leaveFront(), MSDevice_BTreceiver::BTreceiverUpdate::leaveRange(), MSPedestrianPushButton::loadCrossingEdgeMap(), NIImporter_OpenDrive::loadNetwork(), MSPedestrianPushButton::loadPushButtons(), ODDistrictCont::makeDistricts(), MSE2Collector::makeVehicleInfo(), MSSOTLE2Sensors::meanVehiclesSpeed(), MSPModel_Striping::moveInDirection(), MSPModel_Striping::moveInDirectionOnLane(), MSPModel_Striping::PState::moveToNextLane(), libsumo::Person::moveToXY(), libsumo::Vehicle::moveToXY(), libsumo::Helper::moveToXYMap(), MSCalibrator::MSCalibrator(), MSChargingStation::MSChargingStation(), MSDevice_Battery::MSDevice_Battery(), MSE2Collector::MSE2Collector(), NBLoadedTLDef::myCompute(), NIImporter_SUMO::myEndElement(), MSLaneSpeedTrigger::myStartElement(), MSTriggeredRerouter::myStartElement(), MSPModel_Striping::nextBlocking(), MSE3Collector::MSE3EntryReminder::notifyEnter(), MSMeanData::MeanDataValues::notifyEnter(), MSDevice_BTsender::notifyEnter(), MSDevice_Example::notifyEnter(), MSDevice_BTreceiver::notifyEnter(), MSDevice_Bluelight::notifyEnter(), MSMeanData_Net::MSLaneMeanDataValues::notifyEnter(), MSDevice_Tripinfo::notifyEnter(), MSTriggeredRerouter::notifyEnter(), MSE3Collector::MSE3LeaveReminder::notifyEnter(), MSMeanData::MeanDataValueTracker::notifyEnter(), MSE2Collector::notifyEnter(), MSDevice_SSM::notifyEnter(), MSDevice_Transportable::notifyLeave(), MSDevice_Bluelight::notifyLeave(), MSDevice_Example::notifyLeave(), MSE3Collector::MSE3EntryReminder::notifyLeave(), MSDevice_BTsender::notifyLeave(), MSDevice_BTreceiver::notifyLeave(), MSDevice_Tripinfo::notifyLeave(), MSE3Collector::MSE3LeaveReminder::notifyLeave(), MSE2Collector::notifyLeave(), MSDevice_SSM::notifyLeave(), MSDevice_Bluelight::notifyMove(), MSDevice_Example::notifyMove(), MSE3Collector::MSE3EntryReminder::notifyMove(), MSMeanData::MeanDataValues::notifyMove(), MSDevice_BTsender::notifyMove(), MSDevice_BTreceiver::notifyMove(), MSE3Collector::MSE3LeaveReminder::notifyMove(), MSE2Collector::notifyMove(), MSDevice_SSM::notifyMove(), GNETLSEditorFrame::TLSFile::onCmdLoadTLSProgram(), GNETLSEditorFrame::TLSFile::onCmdSaveTLSProgram(), GUIViewTraffic::onGamingClick(), MSLink::opened(), RORouteHandler::openRoute(), RODFNet::idComp::operator()(), NBNetBuilder::by_id_sorter::operator()(), NBNode::nodes_by_id_sorter::operator()(), MSLane::incoming_lane_priority_sorter::operator()(), MSLane::outgoing_lane_priority_sorter::operator()(), NIImporter_VISUM::parse_EdgePolys(), NIImporter_VISUM::parse_Lanes(), NIImporter_VISUM::parse_Turns(), NLTriggerBuilder::parseAndBuildCalibrator(), MSRouteHandler::parseWalkPositions(), NBLoadedSUMOTLDef::patchIfCrossingsAdded(), MSLCM_LC2013::patchSpeed(), MSLCM_SL2015::patchSpeed(), NBLoadedTLDef::SignalGroup::patchTYellow(), MSVehicle::planMove(), MSVehicle::planMoveInternal(), MSLane::planMovements(), MSInternalJunction::postloadInit(), MSRightOfWayJunction::postloadInit(), AGStreet::print(), MSDevice_SSM::processEncounters(), MSVehicle::processLaneAdvances(), MSVehicle::processLinkApproaches(), MSVehicle::processNextStop(), NIXMLNodesHandler::processNodeType(), TraCIServerAPI_Vehicle::processSet(), MEVehicle::processStop(), NIXMLNodesHandler::processTrafficLightDefinitions(), MSDelayBasedTrafficLightLogic::proposeProlongation(), NBNodeCont::pruneClusterFringe(), MSPModel_Striping::PState::PState(), MSOffTrafficLightLogic::rebuildPhase(), NBEdge::recheckLanes(), NBEdgeCont::recheckPostProcessConnections(), NIImporter_OpenStreetMap::reconstructLayerElevation(), NBLoadedSUMOTLDef::reconstructLogic(), MSLink::removeApproaching(), MSVehicle::removePassedDriveItems(), GNEJunction::removeTLSConnections(), NBNodeCont::rename(), GNENet::renameJunction(), RORouteDef::repairCurrentRoute(), GNEJunction::replaceIncomingConnections(), MSVehicle::replaceParkingArea(), MSVehicle::replaceRoute(), MSBaseVehicle::replaceRouteEdges(), NIImporter_DlrNavteq::TrafficlightsHandler::report(), NLEdgeControlBuilder::reportCurrentEdgeOrLane(), MSBaseVehicle::reroute(), GUIVehicle::rerouteDRTStop(), MSTriggeredRerouter::rerouteParkingArea(), MSVehicle::rerouteParkingArea(), MSLane::resetManeuverReservation(), MSLane::resetPartialOccupation(), RODFNet::revalidateFlows(), NBRailwayTopologyAnalyzer::reverseEdges(), MSPerson::MSPersonStage_Walking::routeOutput(), MSPerson::MSPersonStage_Driving::routeOutput(), RONet::saveAndRemoveRoutesUntil(), ROVehicle::saveAsXML(), MSTransportableDevice_Routing::saveState(), MSDevice_Routing::saveState(), MSDevice::saveState(), MSDevice_Vehroutes::saveState(), MSDevice_Tripinfo::saveState(), MSBaseVehicle::saveState(), MSLane::saveState(), GUIVehicle::selectBlockingFoes(), MSE2Collector::selectLanes(), MSLink::setApproaching(), MSTransportable::Stage_Trip::setArrived(), NBNodeCont::setAsTLControlled(), GNEEdge::setAttribute(), MSChargingStation::setChargeDelay(), MSChargingStation::setChargingPower(), NLEdgeControlBuilder::setDefaultStopOffsets(), MSChargingStation::setEfficency(), MSLane::setManeuverReservation(), MSDevice_Battery::setMaximumBatteryCapacity(), NBEdge::setNodeBorder(), NIXMLEdgesHandler::setNodes(), NIImporter_OpenDrive::setNodeSecure(), MSLane::setPartialOccupation(), MSDevice_Battery::setPowerMax(), MSLink::setRequestInformation(), MSTLLogicControl::TLSLogicVariants::setStateInstantiatingOnline(), MSDevice_Battery::setStoppingTreshold(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBOwnTLDef::setTLControllingInformation(), NBTrafficLightLogicCont::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBEdge::shiftPositionAtNode(), MSLane::sortManeuverReservations(), IntermodalNetwork< E, L, N, V >::splitEdge(), MSLaneChangerSublane::startChangeSublane(), MSStopOut::stopEnded(), MSStopOut::stopStarted(), MSLane::succLinkSec(), GUITrafficLightLogicWrapper::switchTLSLogic(), MELoop::teleportVehicle(), NGNet::toNB(), MSSOTLTrafficLightLogic::trySwitch(), PolygonDynamics::update(), MSDevice_SSM::update(), MSDevice_SSM::updateAndWriteOutput(), MSVehicle::updateBestLanes(), MSLCM_SL2015::updateCFRelated(), MSSOTLTrafficLightLogic::updateCTS(), NLEdgeControlBuilder::updateCurrentLaneStopOffsets(), MSVehicle::updateDriveItems(), GNETLSEditorFrame::TLSJunction::updateJunctionDescription(), MSSwarmTrafficLightLogic::updatePheromoneLevels(), MSSwarmTrafficLightLogic::updateSensitivities(), MSAbstractLaneChangeModel::updateTargetLane(), MSDevice_BTreceiver::BTreceiverUpdate::updateVisibility(), NBNodeTypeComputer::validateRailCrossings(), MSPModel_Striping::PState::walk(), MSLCM_LC2013::wantsChange(), MSLCM_SL2015::wantsChange(), MSLCM_SL2015::wantsChangeSublane(), NBParking::write(), MSBatteryExport::write(), MSEmissionExport::write(), MSFCDExport::write(), MSInstantInductLoop::write(), MSLink::writeApproaching(), MSRailSignal::writeBlocks(), NWWriter_DlrNavteq::writeConnectedLanes(), NWWriter_SUMO::writeDistrict(), MSFullExport::writeEdge(), MSXMLRawOut::writeEdge(), NWWriter_SUMO::writeEdge(), MSMeanData::writeEdge(), NWWriter_XML::writeEdgesAndConnections(), RODFDetector::writeEmitterDefinition(), RODFDetectorCon::writeEmitterPOIs(), RODFDetectorCon::writeEmitters(), RODFDetectorCon::writeEndRerouterDetectors(), NWWriter_OpenDrive::writeInternalEdge(), writeInterval(), NWWriter_SUMO::writeJunction(), MSQueueExport::writeLane(), MSFullExport::writeLane(), MSXMLRawOut::writeLane(), NWWriter_DlrNavteq::writeLinksUnsplitted(), NWWriter_OpenDrive::writeNetwork(), NWWriter_XML::writeNodes(), NWWriter_DlrNavteq::writeNodesUnsplitted(), NWWriter_SUMO::writeRoundabout(), RODFDetectorCon::writeSpeedTrigger(), NWWriter_DlrNavteq::writeTrafficSignals(), MSFCDExport::writeTransportable(), RODFDetectorCon::writeValidationDetectors(), MSFullExport::writeVehicles(), PointOfInterest::writeXML(), SUMOPolygon::writeXML(), MSRouteProbe::writeXMLOutput(), MSInductLoop::writeXMLOutput(), MSE2Collector::writeXMLOutput(), and RONet::~RONet().
|
inlinestaticinherited |
get an identifier for Named-like object which may be Null
Definition at line 70 of file Named.h.
Referenced by MSLCM_LC2013::_wantsChange(), MSLCM_SL2015::_wantsChangeSublane(), MSLaneChanger::changeOpposite(), MSVehicle::checkRewindLinkLanes(), DijkstraRouter< E, V, BASE >::compute(), AStarRouter< MSEdge, SUMOVehicle, SUMOAbstractRouterPermissions< MSEdge, SUMOVehicle > >::compute(), NBEdge::computeEdge2Edges(), NBEdge::computeLanes2Edges(), NBOwnTLDef::computeLogicAndConts(), MSLaneChanger::continueChange(), MSLane::detectCollisions(), MSRailSignal::DriveWay::findProtection(), MSCFModel_W99::followSpeed(), MSCFModel_CACC::followSpeed(), MSVehicle::getBackPositionOnLane(), NBOwnTLDef::getBestCombination(), NBOwnTLDef::getBestPair(), MSVehicle::getCenterOnEdge(), MSLaneChanger::getColumnleader(), NBEdge::Connection::getDescription(), MSLane::getFollowersOnConsecutive(), GUIVehicle::getLaneID(), MSVehicle::getLatOffset(), MSLane::getLeaderOnConsecutive(), MSLaneChanger::getRealLeader(), GUIVehicle::getShadowLaneID(), GUIVehicle::getTargetLaneID(), NBEdge::init(), MSLane::isInsertionSuccess(), MESegment::isOpen(), joinNamedToString(), joinNamedToStringSorting(), MSPModel_Striping::PState::moveToNextLane(), libsumo::Person::moveToXY(), libsumo::Vehicle::moveToXY(), libsumo::Helper::moveToXYMap(), operator<<(), NBEdge::recheckLanes(), MSTriggeredRerouter::rerouteParkingArea(), MSLCM_LC2013::saveBlockerLength(), MSLCM_SL2015::saveBlockerLength(), MSLCM_LC2013::slowDownForBlocked(), MSLCM_SL2015::slowDownForBlocked(), MSLaneChangerSublane::startChangeSublane(), toString(), MSLeaderInfo::toString(), MSLeaderDistanceInfo::toString(), MSCriticalFollowerDistanceInfo::toString(), MSVehicle::updateBestLanes(), and MSAbstractLaneChangeModel::updateShadowLane().
|
staticprivate |
Definition at line 227 of file MSDevice_ToC.cpp.
References DEFAULT_INITIAL_AWARENESS, and MSDevice::getFloatParam().
Referenced by buildVehicleDevices().
|
inlinestatic |
returns all currently existing ToC devices
Definition at line 94 of file MSDevice_ToC.h.
References cleanup(), and myInstances.
Referenced by MSNet::writeOutput().
|
inlineinherited |
Returns the lane the reminder works on.
Definition at line 83 of file MSMoveReminder.h.
References MSMoveReminder::myLane.
Referenced by libsumo::LaneArea::getLaneID(), libsumo::InductionLoop::getLaneID(), GUIInstantInductLoop::MyWrapper::getParameterWindow(), GUIE2Collector::MyWrapper::getParameterWindow(), GUIInductLoop::MyWrapper::getParameterWindow(), libsumo::InductionLoop::getTree(), GUIInstantInductLoop::MyWrapper::MyWrapper(), GUIInductLoop::MyWrapper::MyWrapper(), MSMeanData_Amitran::MSLaneMeanDataValues::notifyEnter(), MSMeanData_Net::MSLaneMeanDataValues::notifyEnter(), MSDevice_Tripinfo::notifyEnter(), MSMeanData_Net::MSLaneMeanDataValues::notifyLeave(), MSDevice_Tripinfo::notifyLeave(), MSMeanData::MeanDataValues::notifyMove(), libsumo::InductionLoop::storeShape(), and MSMeanData::writeEdge().
|
staticprivate |
Definition at line 222 of file MSDevice_ToC.cpp.
References DEFAULT_LCABSTINENCE, and MSDevice::getFloatParam().
Referenced by buildVehicleDevices().
|
staticprivate |
Definition at line 202 of file MSDevice_ToC.cpp.
References DEFAULT_MANUAL_TYPE, and MSDevice::getStringParam().
Referenced by buildVehicleDevices().
|
staticprivate |
Definition at line 253 of file MSDevice_ToC.cpp.
References MSDevice::getFloatParam().
Referenced by buildVehicleDevices().
|
staticprivate |
Definition at line 232 of file MSDevice_ToC.cpp.
References DEFAULT_MRM_DECEL, and MSDevice::getFloatParam().
Referenced by buildVehicleDevices().
|
staticprivate |
Definition at line 258 of file MSDevice_ToC.cpp.
References MSDevice::getBoolParam().
Referenced by buildVehicleDevices().
|
inlineinherited |
Definition at line 79 of file MSVehicleDevice.h.
References SUMOVehicle::getNumericalID(), and MSVehicleDevice::myHolder.
|
staticprivate |
Definition at line 268 of file MSDevice_ToC.cpp.
References DEFAULT_OPENGAP_CHANGERATE, DEFAULT_OPENGAP_MAXDECEL, DEFAULT_OPENGAP_SPACING, DEFAULT_OPENGAP_TIMEGAP, MSDevice::getFloatParam(), and WRITE_ERROR.
Referenced by buildVehicleDevices().
|
staticprivate |
Definition at line 180 of file MSDevice_ToC.cpp.
References Parameterised::getParameter(), SUMOVehicle::getParameter(), MSVehicleType::getParameter(), OptionsCont::getString(), SUMOTrafficObject::getVehicleType(), Parameterised::knowsParameter(), and WRITE_WARNING.
Referenced by buildVehicleDevices().
|
overridevirtual |
try to retrieve the given parameter from this device. Throw exception for unsupported key
Reimplemented from MSDevice.
Definition at line 858 of file MSDevice_ToC.cpp.
References _2string(), deviceName(), SUMOTrafficObject::getID(), myAutomatedTypeID, myCurrentAwareness, myDynamicToCActive, myDynamicToCThreshold, MSVehicleDevice::myHolder, myInitialAwareness, myLCAbstinence, myManualTypeID, myMaxPreparationAccel, myMRMDecel, myMRMKeepRight, myMRMProbability, myRecoveryRate, myResponseTime, myState, STEPS2TIME, and toString().
Referenced by deviceName().
|
staticprivate |
Definition at line 217 of file MSDevice_ToC.cpp.
References DEFAULT_RECOVERY_RATE, and MSDevice::getFloatParam().
Referenced by buildVehicleDevices().
|
staticprivate |
Definition at line 212 of file MSDevice_ToC.cpp.
References DEFAULT_RESPONSE_TIME, and MSDevice::getFloatParam().
Referenced by buildVehicleDevices().
|
inlinestatic |
Definition at line 190 of file MSDevice_ToC.h.
References checkDynamicToC(), deactivateDeliberateLCs(), descheduleMRM(), descheduleRecovery(), descheduleToC(), descheduleToCPreparation(), initColorScheme(), isAutomated(), isManuallyDriven(), MSDevice_ToC(), myResponseTimeRNG, requestMRM(), requestToC(), resetDeliberateLCs(), setAwareness(), setState(), setVehicleColor(), switchHolderType(), and useColorScheme().
Referenced by MSStateHandler::myStartElement(), and MSStateHandler::saveRNGs().
|
staticprotectedinherited |
Definition at line 153 of file MSDevice.cpp.
References SUMOTrafficObject::getID(), Parameterised::getParameter(), SUMOVehicle::getParameter(), MSVehicleType::getParameter(), OptionsCont::getString(), SUMOTrafficObject::getVehicleType(), OptionsCont::isSet(), Parameterised::knowsParameter(), and WRITE_WARNING.
Referenced by getAutomatedType(), getManualType(), and MSDevice::setParameter().
|
private |
Initialize vehicle colors for different states.
Definition at line 429 of file MSDevice_ToC.cpp.
References AUTOMATED, MSVehicleType::getColor(), MSNet::getInstance(), MSNet::getVehicleControl(), MSVehicleControl::getVType(), MANUAL, MRM, myAutomatedTypeID, myColorScheme, myManualTypeID, PREPARING_TOC, RECOVERING, and UNDEFINED.
Referenced by getResponseTimeRNG(), and MSDevice_ToC().
|
staticprotectedinherited |
Adds common command options that allow to assign devices to vehicles.
[in] | deviceName | The name of the device type |
[in] | optionsTopic | The options topic into which the options shall be added |
Definition at line 126 of file MSDevice.cpp.
References OptionsCont::addDescription(), OptionsCont::addSynonyme(), and OptionsCont::doRegister().
Referenced by MSDevice_Battery::insertOptions(), MSDevice_Example::insertOptions(), MSTransportableDevice_FCD::insertOptions(), MSDevice_Bluelight::insertOptions(), MSDevice_FCD::insertOptions(), MSDevice_BTreceiver::insertOptions(), MSDevice_BTsender::insertOptions(), MSTransportableDevice_Routing::insertOptions(), MSDevice_DriverState::insertOptions(), MSDevice_Emissions::insertOptions(), MSDevice_Routing::insertOptions(), insertOptions(), MSDevice_SSM::insertOptions(), and MSDevice::setParameter().
|
static |
Inserts MSDevice_ToC-options.
Definition at line 109 of file MSDevice_ToC.cpp.
References OptionsCont::addDescription(), OptionsCont::addOptionSubTopic(), DEFAULT_DYNAMIC_TOC_THRESHOLD, DEFAULT_INITIAL_AWARENESS, DEFAULT_LCABSTINENCE, DEFAULT_MRM_DECEL, DEFAULT_MRM_PROBABILITY, DEFAULT_RECOVERY_RATE, DEFAULT_RESPONSE_TIME, OptionsCont::doRegister(), and MSDevice::insertDefaultAssignmentOptions().
Referenced by MSDevice::insertOptions(), and MSDevice_ToC::OpenGapParams::OpenGapParams().
|
staticprivate |
Two-dimensional interpolation of variance from lookup table assumes pMRM >= 0, leadTime >= 0.
Definition at line 1191 of file MSDevice_ToC.cpp.
References lookupResponseTimeLeadTimes, lookupResponseTimeMRMProbs, lookupResponseTimeVariances, and MAX_RESPONSETIME_VARIANCE.
Referenced by sampleResponseTime().
|
private |
Whether the current operation mode is automated.
Definition at line 1074 of file MSDevice_ToC.cpp.
References AUTOMATED, MRM, myState, and PREPARING_TOC.
Referenced by getResponseTimeRNG().
|
private |
Whether the current operation mode is manual.
Definition at line 1069 of file MSDevice_ToC.cpp.
References MANUAL, myState, and RECOVERING.
Referenced by getResponseTimeRNG(), and setParameter().
|
virtualinherited |
Loads the state of the device from the given description.
The default implementation does nothing.
[in] | attrs | XML attributes describing the current state |
Reimplemented in MSDevice_Tripinfo, MSDevice_Vehroutes, MSDevice_Routing, and MSTransportableDevice_Routing.
Definition at line 148 of file MSDevice.cpp.
Referenced by MSDevice::generateOutput().
Continue the MRM for one time step.
Definition at line 765 of file MSDevice_ToC.cpp.
References ACCEL2SPEED, deactivateDeliberateLCs(), DELTA_T, SUMOTrafficObject::getID(), MSVehicle::getInfluencer(), MSNet::getInstance(), MSVehicle::getSpeed(), MAX2(), MRM, MSVehicleDevice::myHolder, myHolderMS, myMRMDecel, myMRMKeepRight, myState, resetDeliberateLCs(), MSVehicle::Influencer::setLaneTimeLine(), MSVehicle::Influencer::setSpeedTimeLine(), and SIMTIME.
Referenced by deviceName(), and triggerMRM().
|
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.
[in] | veh | The entering vehicle. |
[in] | reason | how the vehicle enters the lane |
Reimplemented in MSDevice_SSM, MSE2Collector, MSMeanData::MeanDataValueTracker, MSE3Collector::MSE3LeaveReminder, MSCalibrator::VehicleRemover, MSTriggeredRerouter, MSDevice_Tripinfo, MSDevice_Routing, MSMeanData_Net::MSLaneMeanDataValues, MSInductLoop, MSMeanData_Amitran::MSLaneMeanDataValues, MSDevice_Bluelight, MSDevice_BTreceiver, MSDevice_Example, MSDevice_BTsender, MSMeanData::MeanDataValues, MSDevice_Vehroutes, MSRouteProbe, MSE3Collector::MSE3EntryReminder, MSDevice_Transportable, and MSDevice_FCD.
Definition at line 128 of file MSMoveReminder.h.
References UNUSED_PARAMETER.
|
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.
[in] | veh | The leaving vehicle. |
[in] | lastPos | Position on the lane when leaving. |
[in] | reason | how the vehicle leaves the lane |
Reimplemented in MSDevice_SSM, MSE2Collector, MSMeanData::MeanDataValueTracker, MSE3Collector::MSE3LeaveReminder, MSTriggeredRerouter, MSInductLoop, MSDevice_Tripinfo, MSDevice_BTreceiver, MSDevice_BTsender, MSMeanData::MeanDataValues, MSE3Collector::MSE3EntryReminder, MSDevice_Bluelight, MSDevice_Example, MSInstantInductLoop, MSDevice_Vehroutes, MSMeanData_Net::MSLaneMeanDataValues, and MSDevice_Transportable.
Definition at line 174 of file MSMoveReminder.h.
References UNUSED_PARAMETER, and MSMoveReminder::updateDetector().
|
overridevirtual |
Return value indicates whether the device still wants to be notified about the vehicle movement.
Reimplemented from MSMoveReminder.
Definition at line 828 of file MSDevice_ToC.cpp.
References AUTOMATED, checkDynamicToC(), DYNAMIC_TOC_LEADTIME_FACTOR, generatesOutput(), MSVehicle::getLane(), MSLane::getNumericalID(), myDynamicToCLane, myDynamicToCThreshold, myEvents, myHolderMS, myIssuedDynamicToC, myState, PREPARING_TOC, requestToC(), SIMSTEP, and triggerUpwardToC().
Referenced by deviceName().
|
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.
[in] | veh | Vehicle that asks this reminder. |
[in] | frontOnLane | time the front of the vehicle spent on the lane. |
[in] | timeOnLane | time some part of the vehicle spent on the lane. |
[in] | meanSpeedFrontOnLane | Average speed for the time that the front is on the lane. |
[in] | meanSpeedVehicleOnLane | Average speed for the time that the vehicle is on the lane (with front or back). |
[in] | travelledDistanceFrontOnLane | distance travelled while overlapping with the lane. |
[in] | travelledDistanceVehicleOnLane | distance travelled while front was on the lane. |
[in] | meanLengthOnLane | the average length of the vehicle's part on the lane during the last step (==complete length in meso case) |
Reimplemented in MSMeanData::MeanDataValueTracker, MSDevice_Tripinfo, MSDevice_Transportable, MSMeanData_Net::MSLaneMeanDataValues, MSMeanData_Amitran::MSLaneMeanDataValues, MSMeanData_Harmonoise::MSLaneMeanDataValues, and MSMeanData_Emissions::MSLaneMeanDataValues.
Definition at line 206 of file MSMoveReminder.h.
References UNUSED_PARAMETER.
Referenced by MSMeanData::MeanDataValues::notifyMove(), and MSMoveReminder::updateDetector().
|
private |
Invalidated assignment operator.
|
protectedinherited |
Definition at line 86 of file MSMoveReminder.cpp.
References MSMoveReminder::myLastVehicleUpdateValues.
Referenced by MSMoveReminder::getDescription(), MSMeanData_Net::MSLaneMeanDataValues::notifyLeave(), and MSMoveReminder::updateDetector().
|
private |
Request an MRM to be initiated immediately. No downward ToC will be scheduled.
Definition at line 537 of file MSDevice_ToC.cpp.
References descheduleRecovery(), descheduleToC(), descheduleToCPreparation(), and triggerMRM().
Referenced by getResponseTimeRNG(), and setParameter().
Request a ToC. If the device is in AUTOMATED or MRM state, a driver response time is sampled and the ToC is scheduled. If the response is larger than timeTillMRM, an MRM is scheduled as well. If the device is in MANUAL or UNDEFINED state, it switches to AUTOMATED. The request is ignored if the state is already PREPARING_TOC.
timeTillMRM | |
responseTime | If the default is given (== -1), the response time is sampled randomly, |
Definition at line 550 of file MSDevice_ToC.cpp.
References MSVehicle::Influencer::activateGapController(), MSDevice_ToC::OpenGapParams::active, MSEventControl::addEvent(), AUTOMATED, MSDevice_ToC::OpenGapParams::changeRate, DELTA_T, generatesOutput(), MSNet::getBeginOfTimestepEvents(), MSVehicle::getCarFollowModel(), MSCFModel::getHeadwayTime(), SUMOTrafficObject::getID(), MSVehicle::getInfluencer(), MSNet::getInstance(), MSDevice_ToC::OpenGapParams::maxDecel, MRM, myEvents, myExecuteMRMCommand, MSVehicleDevice::myHolder, myHolderMS, myOpenGapParams, myPrepareToCCommand, myState, myTriggerMRMCommand, myTriggerToCCommand, MSDevice_ToC::OpenGapParams::newSpaceHeadway, MSDevice_ToC::OpenGapParams::newTimeHeadway, PREPARING_TOC, sampleResponseTime(), setState(), SIMSTEP, SIMTIME, STEPS2TIME, TIME2STEPS, ToCPreparationStep(), triggerDownwardToC(), triggerMRM(), triggerUpwardToC(), and WRITE_WARNING.
Referenced by getResponseTimeRNG(), notifyMove(), and setParameter().
|
private |
Resets the holder's LC mode to the last differing to LCModeMRM.
Definition at line 1044 of file MSDevice_ToC.cpp.
References SUMOTrafficObject::getID(), MSVehicle::getInfluencer(), MSVehicleDevice::myHolder, myHolderMS, myPreviousLCMode, MSVehicle::Influencer::setLaneChangeMode(), and SIMTIME.
Referenced by descheduleMRM(), descheduleToCPreparation(), getResponseTimeRNG(), MRMExecutionStep(), setAwareness(), setState(), and ~MSDevice_ToC().
|
inlinestaticprivate |
Mean of the response time distribution. (Only depends on given lead time)
Definition at line 363 of file MSDevice_ToC.h.
References MIN2().
Referenced by sampleResponseTime().
|
private |
Samples a random driver response time from a truncated Gaussian with parameters according to the lookup tables.
Definition at line 1167 of file MSDevice_ToC.cpp.
References interpolateVariance(), MAX_RESPONSETIME_SAMPLE_TRIES, myMRMProbability, myResponseTimeRNG, and responseTimeMean().
Referenced by requestToC().
|
virtualinherited |
Saves the state of the device.
The default implementation writes a warning and does nothing.
[in] | out | The OutputDevice to write the information into |
Reimplemented in MSDevice_Tripinfo, MSDevice_Vehroutes, MSDevice_Routing, MSTransportableDevice_Routing, MSDevice_FCD, and MSTransportableDevice_FCD.
Definition at line 142 of file MSDevice.cpp.
References Named::getID(), and WRITE_WARNING.
Referenced by MSDevice::generateOutput().
|
private |
Set the awareness to the given value.
Definition at line 463 of file MSDevice_ToC.cpp.
References deactivateDeliberateLCs(), MSVehicle::getDriverState(), MAX2(), MIN2(), myCurrentAwareness, myHolderMS, myLCAbstinence, resetDeliberateLCs(), and WRITE_WARNING.
Referenced by awarenessRecoveryStep(), getResponseTimeRNG(), setParameter(), triggerDownwardToC(), triggerMRM(), and triggerUpwardToC().
|
inlineinherited |
Definition at line 224 of file MSMoveReminder.h.
References MSMoveReminder::myDescription.
Referenced by MSMeanData::init(), MEInductLoop::MEInductLoop(), METriggeredCalibrator::METriggeredCalibrator(), and MSCalibrator::MSCalibrator().
|
inlineinherited |
resets the id
[in] | newID | The new id of this object |
Definition at line 85 of file Named.h.
Referenced by Distribution_Parameterized::parse(), NBLoadedSUMOTLDef::reconstructLogic(), NBEdgeCont::remapIDs(), NBNodeCont::rename(), NBEdgeCont::rename(), GNEJunction::setAttribute(), and IntermodalNetwork< E, L, N, V >::splitEdge().
|
overridevirtual |
try to set the given parameter for this device. Throw exception for unsupported key
Reimplemented from MSDevice.
Definition at line 895 of file MSDevice_ToC.cpp.
References AUTOMATED, deviceName(), MSVehicleType::getColor(), MSBaseVehicle::getID(), MSNet::getInstance(), MSNet::getVehicleControl(), MSVehicleControl::getVType(), isManuallyDriven(), MANUAL, MRM, myAutomatedTypeID, myColorScheme, myCurrentAwareness, myDynamicToCActive, myDynamicToCThreshold, myHolderMS, myInitialAwareness, myLCAbstinence, myManualTypeID, myMaxPreparationAccel, myMRMDecel, myMRMKeepRight, myMRMProbability, myRecoveryRate, myResponseTime, myState, PREPARING_TOC, requestMRM(), requestToC(), setAwareness(), SIMTIME, switchHolderType(), TIME2STEPS, StringUtils::toBool(), StringUtils::toDouble(), and WRITE_WARNING.
Referenced by deviceName().
|
private |
Set the ToC device's state.
Definition at line 483 of file MSDevice_ToC.cpp.
References MSDevice_ToC::OpenGapParams::active, deactivateDeliberateLCs(), MSVehicle::Influencer::deactivateGapController(), MSVehicleType::getCarFollowModel(), MSVehicle::getCarFollowModel(), MSVehicle::getInfluencer(), MSCFModel::getMaxAccel(), MSBaseVehicle::getSingularType(), MIN2(), MRM, myHolderMS, myIssuedDynamicToC, myMaxPreparationAccel, myOpenGapParams, myOriginalMaxAccel, myState, myUseColorScheme, PREPARING_TOC, resetDeliberateLCs(), MSCFModel::setMaxAccel(), setVehicleColor(), and SIMTIME.
Referenced by awarenessRecoveryStep(), getResponseTimeRNG(), requestToC(), triggerDownwardToC(), triggerMRM(), and triggerUpwardToC().
|
private |
Definition at line 530 of file MSDevice_ToC.cpp.
References SUMOVehicleParameter::color, SUMOVehicle::getParameter(), myColorScheme, MSVehicleDevice::myHolder, myState, SUMOVehicleParameter::parametersSet, and VEHPARS_COLOR_SET.
Referenced by getResponseTimeRNG(), and setState().
|
private |
Switch the device holder's vehicle type.
Definition at line 734 of file MSDevice_ToC.cpp.
References SUMOTrafficObject::getID(), MSVehicleType::getID(), MSNet::getInstance(), MSNet::getVehicleControl(), MSVehicleControl::getVType(), MSVehicleDevice::myHolder, myHolderMS, MSBaseVehicle::replaceVehicleType(), SIMTIME, and WRITE_ERROR.
Referenced by getResponseTimeRNG(), setParameter(), triggerDownwardToC(), triggerMRM(), and triggerUpwardToC().
Continue the ToC preparation for one time step.
Definition at line 748 of file MSDevice_ToC.cpp.
References DELTA_T, descheduleToCPreparation(), SUMOTrafficObject::getID(), MSVehicleDevice::myHolder, myState, PREPARING_TOC, and SIMTIME.
Referenced by deviceName(), and requestToC().
Trigger execution of a ToC X–>MANUAL ("downwards")
Definition at line 655 of file MSDevice_ToC.cpp.
References MSEventControl::addEvent(), awarenessRecoveryStep(), DELTA_T, descheduleMRM(), descheduleToC(), descheduleToCPreparation(), generatesOutput(), MSNet::getBeginOfTimestepEvents(), SUMOTrafficObject::getID(), MSNet::getInstance(), myCurrentAwareness, myEvents, MSVehicleDevice::myHolder, myInitialAwareness, myManualTypeID, myRecoverAwarenessCommand, RECOVERING, setAwareness(), setState(), SIMSTEP, SIMTIME, and switchHolderType().
Referenced by deviceName(), and requestToC().
Trigger execution of an MRM.
Definition at line 601 of file MSDevice_ToC.cpp.
References MSEventControl::addEvent(), DELTA_T, descheduleMRM(), generatesOutput(), MSNet::getBeginOfTimestepEvents(), SUMOTrafficObject::getID(), MSNet::getInstance(), MANUAL, MRM, MRMExecutionStep(), myAutomatedTypeID, myEvents, myExecuteMRMCommand, MSVehicleDevice::myHolder, myState, RECOVERING, setAwareness(), setState(), SIMSTEP, SIMTIME, and switchHolderType().
Referenced by deviceName(), requestMRM(), and requestToC().
Trigger execution of a ToC X–>AUTOMATED ("upwards")
Definition at line 627 of file MSDevice_ToC.cpp.
References AUTOMATED, descheduleMRM(), descheduleRecovery(), descheduleToC(), descheduleToCPreparation(), generatesOutput(), SUMOTrafficObject::getID(), MANUAL, myAutomatedTypeID, myEvents, MSVehicleDevice::myHolder, myState, RECOVERING, setAwareness(), setState(), SIMSTEP, SIMTIME, and switchHolderType().
Referenced by deviceName(), notifyMove(), and requestToC().
|
inherited |
Definition at line 44 of file MSMoveReminder.cpp.
References MSMoveReminder::myLastVehicleUpdateValues, MSMoveReminder::notifyMoveInternal(), MSMoveReminder::removeFromVehicleUpdateValues(), and STEPS2TIME.
Referenced by MSMoveReminder::notifyLeave(), and MEVehicle::updateDetectorForWriting().
|
staticprivate |
Definition at line 263 of file MSDevice_ToC.cpp.
References MSDevice::getBoolParam().
Referenced by buildVehicleDevices(), and getResponseTimeRNG().
void MSDevice_ToC::writeOutput | ( | ) |
Write output to file given by option device.toc.file.
Definition at line 1017 of file MSDevice_ToC.cpp.
References OutputDevice::closeTag(), generatesOutput(), SUMOTrafficObject::getID(), myEvents, MSVehicleDevice::myHolder, myOutputFile, OutputDevice::openTag(), STEPS2TIME, and OutputDevice::writeAttr().
Referenced by deviceName(), and MSNet::writeOutput().
|
staticprivate |
Definition at line 60 of file MSDevice_ToC.h.
Referenced by cleanup(), and MSDevice_ToC().
|
staticprivate |
LC mode operational during an MRM.
Definition at line 331 of file MSDevice_ToC.h.
Referenced by deactivateDeliberateLCs().
|
staticprivate |
Definition at line 361 of file MSDevice_ToC.h.
Referenced by interpolateVariance().
|
staticprivate |
Grid of the response time distribution.
Definition at line 360 of file MSDevice_ToC.h.
Referenced by interpolateVariance().
|
staticprivate |
Variances of the response time distribution. Given the lead time and the MRM probability the variances in this table ensure that for the mean returned by responseTimeMean(leadTime) an MRM will occur with probability pMRM.
Definition at line 365 of file MSDevice_ToC.h.
Referenced by interpolateVariance().
|
private |
vehicle type ID for automated driving
Definition at line 279 of file MSDevice_ToC.h.
Referenced by getParameter(), initColorScheme(), MSDevice_ToC(), setParameter(), triggerMRM(), and triggerUpwardToC().
Coloring scheme,.
Definition at line 298 of file MSDevice_ToC.h.
Referenced by initColorScheme(), setParameter(), and setVehicleColor().
|
private |
Current awareness-level of the driver in [0,1].
Definition at line 295 of file MSDevice_ToC.h.
Referenced by awarenessRecoveryStep(), getParameter(), MSDevice_ToC(), setAwareness(), setParameter(), and triggerDownwardToC().
|
protectedinherited |
a description of this moveReminder
Definition at line 240 of file MSMoveReminder.h.
Referenced by MSMoveReminder::getDescription(), and MSMoveReminder::setDescription().
|
private |
Switch for considering dynamic ToCs,.
Definition at line 343 of file MSDevice_ToC.h.
Referenced by checkDynamicToC(), getParameter(), and setParameter().
|
private |
Lane, on which the ongoing dynamic ToC was issued. It can only be aborted if the lane was changed.
Definition at line 347 of file MSDevice_ToC.h.
Referenced by checkDynamicToC(), and notifyMove().
|
private |
Duration in s. for which the vehicle needs to be able to follow its route without a lane change to continue in automated mode (only has effect if dynamic ToCs are activated,.
Definition at line 338 of file MSDevice_ToC.h.
Referenced by checkDynamicToC(), getParameter(), notifyMove(), and setParameter().
|
private |
Storage for events to be written to the output.
Definition at line 325 of file MSDevice_ToC.h.
Referenced by notifyMove(), requestToC(), triggerDownwardToC(), triggerMRM(), triggerUpwardToC(), and writeOutput().
|
private |
Definition at line 317 of file MSDevice_ToC.h.
Referenced by descheduleMRM(), requestToC(), triggerMRM(), and ~MSDevice_ToC().
|
protectedinherited |
The vehicle that stores the device.
Definition at line 85 of file MSVehicleDevice.h.
Referenced by MSDevice_Vehroutes::addRoute(), MSDevice_Transportable::addTransportable(), awarenessRecoveryStep(), checkDynamicToC(), deactivateDeliberateLCs(), MSDevice_SSM::findFoeConflictLane(), MSDevice_Tripinfo::generateOutput(), MSDevice_Tripinfo::generateOutputForUnfinished(), MSVehicleDevice::getHolder(), MSVehicleDevice::getNumericalID(), getParameter(), MSDevice_Routing::getParameter(), MRMExecutionStep(), MSDevice_Vehroutes::notifyEnter(), MSDevice_Tripinfo::notifyLeave(), MSDevice_Routing::preInsertionReroute(), MSDevice_Transportable::removeTransportable(), requestToC(), MSDevice_Routing::reroute(), resetDeliberateLCs(), MSDevice_Routing::setParameter(), setVehicleColor(), switchHolderType(), ToCPreparationStep(), triggerDownwardToC(), triggerMRM(), triggerUpwardToC(), MSDevice_SSM::updateAndWriteOutput(), MSDevice_Vehroutes::writeOutput(), writeOutput(), MSDevice_Vehroutes::writeXMLRoute(), MSDevice_Transportable::~MSDevice_Transportable(), and MSDevice_Vehroutes::~MSDevice_Vehroutes().
|
private |
The holder vehicle casted to MSVehicle*.
Definition at line 309 of file MSDevice_ToC.h.
Referenced by checkDynamicToC(), deactivateDeliberateLCs(), MRMExecutionStep(), MSDevice_ToC(), notifyMove(), requestToC(), resetDeliberateLCs(), setAwareness(), setParameter(), setState(), and switchHolderType().
|
protectedinherited |
The name of the object.
Definition at line 134 of file Named.h.
Referenced by MSE2Collector::addDetectorToLanes(), RODFDetector::buildDestinationDistribution(), NGEdge::buildNBEdge(), NGNode::buildNBNode(), MSSOTLTrafficLightLogic::checkPhases(), NBNode::computeNodeShape(), MSE2Collector::detectorUpdate(), GNEPoly::getAttribute(), GNEPOI::getAttribute(), MSLane::getCanonicalPredecessorLane(), MSLane::getCanonicalSuccessorLane(), NBEdge::getLaneID(), ROEdge::getStoredEffort(), MSLane::getSurroundingVehicles(), ROEdge::getTravelTime(), MSDelayBasedTrafficLightLogic::init(), MSActuatedTrafficLightLogic::init(), MSSOTLTrafficLightLogic::init(), NBEdge::init(), MSLane::isInsertionSuccess(), NBNode::NBNode(), MSE2Collector::notifyEnter(), MSE2Collector::notifyLeave(), MSE2Collector::notifyMove(), MSMeanData::openInterval(), RORouteDef::preComputeCurrentRoute(), NBEdge::reinitNodes(), MSRoute::release(), GNEPOI::setAttribute(), GNEPoly::setAttribute(), MSSOTLTrafficLightLogic::setToATargetPhase(), NBEdge::splitGeometry(), Distribution_Parameterized::toStr(), MSChargingStation::writeChargingStationOutput(), RODFDetector::writeEmitterDefinition(), RODFDetector::writeSingleSpeedTrigger(), MEInductLoop::writeXMLOutput(), and MSE3Collector::writeXMLOutput().
|
private |
Average awareness the driver has initially after a ToC.
Definition at line 289 of file MSDevice_ToC.h.
Referenced by getParameter(), MSDevice_ToC(), setParameter(), and triggerDownwardToC().
|
staticprivate |
Definition at line 58 of file MSDevice_ToC.h.
Referenced by getInstances(), MSDevice_ToC(), and ~MSDevice_ToC().
|
private |
Flag to indicate that a dynamically triggered ToC is in preparation.
Definition at line 345 of file MSDevice_ToC.h.
Referenced by checkDynamicToC(), notifyMove(), and setState().
|
protectedinherited |
Lane on which the reminder works.
Definition at line 238 of file MSMoveReminder.h.
Referenced by MSE2Collector::getEstimatedCurrentVehicleNumber(), MSE2Collector::getEstimateQueueLength(), MSMoveReminder::getLane(), MSMoveReminder::MSMoveReminder(), MSE3Collector::MSE3EntryReminder::notifyEnter(), MSInductLoop::notifyEnter(), MSE3Collector::MSE3LeaveReminder::notifyEnter(), MSE2Collector::notifyEnter(), MSE3Collector::MSE3EntryReminder::notifyLeave(), MSE3Collector::MSE3LeaveReminder::notifyLeave(), MSE2Collector::notifyLeave(), MSE3Collector::MSE3EntryReminder::notifyMove(), MSMeanData::MeanDataValues::notifyMove(), MSE3Collector::MSE3LeaveReminder::notifyMove(), MSE2Collector::notifyMove(), and MSMeanData::MeanDataValueTracker::reset().
|
private |
Level of the awareness below which no lane-changes are performed.
Definition at line 287 of file MSDevice_ToC.h.
Referenced by getParameter(), setAwareness(), and setParameter().
|
private |
vehicle type ID for manual driving
Definition at line 277 of file MSDevice_ToC.h.
Referenced by getParameter(), initColorScheme(), MSDevice_ToC(), setParameter(), and triggerDownwardToC().
|
private |
Maximal acceleration that may be applied during the ToC preparation phase TODO: Make effective.
Definition at line 354 of file MSDevice_ToC.h.
Referenced by getParameter(), setParameter(), and setState().
|
private |
Deceleration rate applied during MRM.
Definition at line 292 of file MSDevice_ToC.h.
Referenced by checkDynamicToC(), getParameter(), MRMExecutionStep(), MSDevice_ToC(), and setParameter().
|
private |
Whether vehicle tries to change to the right during an MRM.
Definition at line 350 of file MSDevice_ToC.h.
Referenced by getParameter(), MRMExecutionStep(), and setParameter().
|
private |
Probability of an MRM to occur after a dynamically triggered ToC.
Definition at line 341 of file MSDevice_ToC.h.
Referenced by getParameter(), sampleResponseTime(), and setParameter().
|
private |
Parameters for the openGap mechanism applied during ToC preparation phase.
Definition at line 334 of file MSDevice_ToC.h.
Referenced by MSDevice_ToC(), requestToC(), and setState().
|
private |
Storage for original maximal acceleration of vehicle.
Definition at line 357 of file MSDevice_ToC.h.
Referenced by setState().
|
private |
The file the devices output goes to.
Definition at line 322 of file MSDevice_ToC.h.
Referenced by generatesOutput(), MSDevice_ToC(), and writeOutput().
|
private |
Definition at line 318 of file MSDevice_ToC.h.
Referenced by descheduleToCPreparation(), requestToC(), and ~MSDevice_ToC().
|
private |
LC mode overridden during MRM, stored for restoration.
Definition at line 328 of file MSDevice_ToC.h.
Referenced by deactivateDeliberateLCs(), and resetDeliberateLCs().
|
private |
Definition at line 316 of file MSDevice_ToC.h.
Referenced by awarenessRecoveryStep(), descheduleRecovery(), triggerDownwardToC(), and ~MSDevice_ToC().
|
private |
Recovery rate for the driver's awareness after a ToC.
Definition at line 285 of file MSDevice_ToC.h.
Referenced by awarenessRecoveryStep(), getParameter(), MSDevice_ToC(), and setParameter().
|
private |
Average response time needed by the driver to take back control.
Definition at line 283 of file MSDevice_ToC.h.
Referenced by getParameter(), MSDevice_ToC(), and setParameter().
|
staticprivate |
Random generator for ToC devices.
Definition at line 372 of file MSDevice_ToC.h.
Referenced by getResponseTimeRNG(), and sampleResponseTime().
|
private |
Current state of the device.
Definition at line 304 of file MSDevice_ToC.h.
Referenced by descheduleToCPreparation(), getParameter(), isAutomated(), isManuallyDriven(), MRMExecutionStep(), MSDevice_ToC(), notifyMove(), requestToC(), setParameter(), setState(), setVehicleColor(), ToCPreparationStep(), triggerMRM(), and triggerUpwardToC().
|
private |
Definition at line 314 of file MSDevice_ToC.h.
Referenced by descheduleMRM(), requestToC(), and ~MSDevice_ToC().
|
private |
Definition at line 315 of file MSDevice_ToC.h.
Referenced by descheduleToC(), requestToC(), and ~MSDevice_ToC().
|
private |
Whether a coloring scheme shall by applied to indicate the different toc stages,.
Definition at line 301 of file MSDevice_ToC.h.
Referenced by setState().