Eclipse SUMO - Simulation of Urban MObility
MSTransportableDevice_Routing Class Reference

A device that performs person rerouting based on current edge speeds. More...

#include <MSTransportableDevice_Routing.h>

Inheritance diagram for MSTransportableDevice_Routing:
Collaboration diagram for MSTransportableDevice_Routing:

Public Member Functions

void addTo (const StoringVisitor &cont) const
 Adds this object to the given container. More...
 
const std::string deviceName () const
 return the name for this type of device More...
 
virtual void generateOutput () const
 Called on writing tripinfo output. More...
 
MSTransportablegetHolder () const
 Returns the person that holds this device. More...
 
const std::string & getID () const
 Returns the id. More...
 
std::string getParameter (const std::string &key) const
 try to retrieve the given parameter from this device. Throw exception for unsupported key More...
 
void loadState (const SUMOSAXAttributes &attrs)
 Loads the state of the device from the given description. More...
 
void reroute (const SUMOTime currentTime, const bool onInit=false)
 initiate the rerouting, create router / thread pool on first use More...
 
void saveState (OutputDevice &out) const
 Saves the state of the device. More...
 
void setID (const std::string &newID)
 resets the id More...
 
void setParameter (const std::string &key, const std::string &value)
 try to set the given parameter for this device. Throw exception for unsupported key More...
 
 ~MSTransportableDevice_Routing ()
 Destructor. More...
 

Static Public Member Functions

static void buildDevices (MSTransportable &p, std::vector< MSTransportableDevice * > &into)
 Build devices for the given person, if needed. More...
 
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)
 checks MSTransportableDevice_Routing-options 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 void insertOptions (OptionsCont &oc)
 Inserts MSTransportableDevice_Routing-options. More...
 

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

MSTransportablemyHolder
 The person that stores the device. More...
 
std::string myID
 The name of the object. More...
 

Private Member Functions

 MSTransportableDevice_Routing (const MSTransportableDevice_Routing &)
 Invalidated copy constructor. More...
 
 MSTransportableDevice_Routing (MSTransportable &holder, const std::string &id, SUMOTime period)
 Constructor. More...
 
MSTransportableDevice_Routingoperator= (const MSTransportableDevice_Routing &)
 Invalidated assignment operator. More...
 
SUMOTime wrappedRerouteCommandExecute (SUMOTime currentTime)
 Performs rerouting after a period. More...
 

Private Attributes

SUMOTime myLastRouting
 The last time a routing took place. More...
 
SUMOTime myPeriod
 The period with which a vehicle shall be rerouted. More...
 
WrappingCommand< MSTransportableDevice_Routing > * myRerouteCommand
 The (optional) command responsible for rerouting. More...
 

Static Private Attributes

static std::mt19937 myEquipmentRNG
 A random number generator used to choose from vtype/route distributions and computing the speed factors. More...
 
static std::map< std::string, std::set< std::string > > myExplicitIDs
 vehicles which explicitly carry a device, sorted by device, first More...
 

Detailed Description

A device that performs person rerouting based on current edge speeds.

The routing-device system consists of in-vehicle devices that perform the routing and simulation-wide static methods for collecting edge weights and parallelizing in MSRoutingEngine.

A device is assigned using the common explicit/probability - procedure.

A device computes a new route for a person as soon as a personTrip appears in the plan.

Definition at line 51 of file MSTransportableDevice_Routing.h.

Constructor & Destructor Documentation

◆ ~MSTransportableDevice_Routing()

MSTransportableDevice_Routing::~MSTransportableDevice_Routing ( )

Destructor.

Definition at line 77 of file MSTransportableDevice_Routing.cpp.

References WrappingCommand< T >::deschedule(), and myRerouteCommand.

◆ MSTransportableDevice_Routing() [1/2]

MSTransportableDevice_Routing::MSTransportableDevice_Routing ( MSTransportable holder,
const std::string &  id,
SUMOTime  period 
)
private

Constructor.

Parameters
[in]holderThe vehicle that holds this device
[in]idThe ID of the device
[in]periodThe period with which a new route shall be searched

Definition at line 66 of file MSTransportableDevice_Routing.cpp.

References MSEventControl::addEvent(), SUMOVehicleParameter::depart, MSNet::getInsertionEvents(), MSNet::getInstance(), MSTransportable::getParameter(), MSRoutingEngine::hasEdgeUpdates(), VEHPARS_FORCE_REROUTE, SUMOVehicleParameter::wasSet(), and wrappedRerouteCommandExecute().

Referenced by buildDevices().

◆ MSTransportableDevice_Routing() [2/2]

MSTransportableDevice_Routing::MSTransportableDevice_Routing ( const MSTransportableDevice_Routing )
private

Invalidated copy constructor.

Member Function Documentation

◆ addTo()

void Named::addTo ( const StoringVisitor cont) const
inlineinherited

Adds this object to the given container.

Parameters
[in,filled]cont The container to add this item to

Definition at line 126 of file Named.h.

References Named::StoringVisitor::add().

◆ buildDevices()

void MSTransportableDevice_Routing::buildDevices ( MSTransportable p,
std::vector< MSTransportableDevice * > &  into 
)
static

Build devices for the given person, if needed.

The options are read and evaluated whether rerouting-devices shall be built for the given person.

When the first device is built, the static container of edge weights used for routing is initialised with the mean speed the edges allow. In addition, an event is generated which updates these weights is built and added to the list of events to execute at a simulation end.

The built device is stored in the given vector.

Parameters
[in]pThe person for which a device may be built
[filled]into The vector to store the built device in

Definition at line 51 of file MSTransportableDevice_Routing.cpp.

References MSDevice::equippedByDefaultAssignmentOptions(), MSTransportable::getID(), OptionsCont::getOptions(), MSTransportable::getParameter(), OptionsCont::getString(), MSRoutingEngine::initWeightUpdate(), MSTransportableDevice_Routing(), string2time(), VEHPARS_FORCE_REROUTE, and SUMOVehicleParameter::wasSet().

Referenced by MSDevice::buildTransportableDevices().

◆ buildTransportableDevices()

void MSDevice::buildTransportableDevices ( MSTransportable p,
std::vector< MSTransportableDevice * > &  into 
)
staticinherited

Build devices for the given person, if needed.

Parameters
[in]pThe person for which a device may be built
[filled]into The vector to store the built device in

Definition at line 112 of file MSDevice.cpp.

References buildDevices(), and MSTransportableDevice_FCD::buildDevices().

Referenced by MSTransportable::MSTransportable().

◆ buildVehicleDevices()

◆ checkOptions()

static bool MSTransportableDevice_Routing::checkOptions ( OptionsCont oc)
static

checks MSTransportableDevice_Routing-options

Parameters
[filled]oc The options container with the user-defined options

◆ cleanupAll()

void MSDevice::cleanupAll ( )
staticinherited

perform cleanup for all devices

Definition at line 119 of file MSDevice.cpp.

References MSDevice_FCD::cleanup(), MSDevice_Tripinfo::cleanup(), and MSRoutingEngine::cleanup().

Referenced by MSNet::clearAll().

◆ deviceName()

const std::string MSTransportableDevice_Routing::deviceName ( ) const
inlinevirtual

return the name for this type of device

Implements MSDevice.

Definition at line 87 of file MSTransportableDevice_Routing.h.

Referenced by getParameter(), and setParameter().

◆ equippedByDefaultAssignmentOptions()

template<class DEVICEHOLDER >
bool MSDevice::equippedByDefaultAssignmentOptions ( const OptionsCont oc,
const std::string &  deviceName,
DEVICEHOLDER &  v,
bool  outputOptionSet,
const bool  isPerson = false 
)
staticprotectedinherited

◆ generateOutput()

virtual void MSDevice::generateOutput ( ) const
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.

Exceptions
IOErrornot yet implemented

Reimplemented in MSDevice_Vehroutes, MSDevice_Tripinfo, MSDevice_SSM, MSDevice_Example, MSDevice_Emissions, and MSDevice_Bluelight.

Definition at line 124 of file MSDevice.h.

◆ getBoolParam()

bool MSDevice::getBoolParam ( const SUMOVehicle v,
const OptionsCont oc,
std::string  paramName,
bool  deflt,
bool  required 
)
staticprotectedinherited

◆ getEquipmentRNG()

static std::mt19937* MSDevice::getEquipmentRNG ( )
inlinestaticinherited

◆ getFloatParam()

◆ getHolder()

MSTransportable& MSTransportableDevice::getHolder ( ) const
inlineinherited

Returns the person that holds this device.

Returns
The person that holds this device

Definition at line 72 of file MSTransportableDevice.h.

References MSTransportableDevice::myHolder.

◆ getID()

const std::string& Named::getID ( ) const
inlineinherited

Returns the id.

Returns
The stored id

Definition at line 76 of file Named.h.

References Named::myID.

Referenced by MSLCM_LC2013::adaptSpeedToPedestrians(), MSVehicle::adaptToLeader(), MSVehicle::adaptToLeaders(), LaneStoringVisitor::add(), Named::StoringVisitor::add(), MSVehicleTransfer::add(), MSPModel_Striping::add(), MSPModel_Remote::add(), PCPolyContainer::add(), ShapeContainer::add(), MSDetectorControl::add(), NLTriggerBuilder::addAccess(), RORouteDef::addAlternative(), MSLane::addApproachingLane(), NLHandler::addConnection(), NBLoadedSUMOTLDef::addConnection(), MSPModel_Striping::addCrossingVehs(), RODFDetectorCon::addDetector(), RONet::addEdge(), ROJTREdge::addFollowerProbability(), MSTLLogicControl::TLSLogicVariants::addLogic(), MSLane::addNeigh(), RONet::addNode(), NIImporter_SUMO::addPhase(), GUIEdge::addRerouter(), RONet::addRouteDef(), NIXMLEdgesHandler::addSplit(), NBTrafficLightLogic::addStep(), MSRouteHandler::addStop(), ROVehicle::addStop(), MSVehicle::addStop(), MSNet::addStoppingPlace(), MSVehicle::addTraciStop(), MSVehicle::addTraciStopAtStoppingPlace(), AGActivityTripWriter::addTrip(), NIXMLConnectionsHandler::addWalkingArea(), libsumo::Helper::applySubscriptionFilters(), GUITrafficLightLogicWrapper::begin2TrackPhases(), 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(), MSRailSignal::LinkInfo::buildDriveWay(), NLDetectorBuilder::buildE2Detector(), RODFNet::buildEdgeFlowMap(), GNETLSEditorFrame::buildIinternalLanes(), NBEdge::buildInnerEdges(), NIVissimEdge::buildNBEdge(), NGEdge::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(), IntermodalRouter< E, L, N, V >::compute(), ROJTRRouter::compute(), NBTrafficLightDefinition::compute(), NBNode::computeInternalLaneShape(), NBNode::computeLanes2Lanes(), NBNode::computeLogic(), NBOwnTLDef::computeLogicAndConts(), NBNodeShapeComputer::computeNodeShapeDefault(), NBNodeShapeComputer::computeNodeShapeSmall(), NBNodeTypeComputer::computeNodeTypes(), RODFNet::computeRoutesFor(), NBTrafficLightLogicCont::computeSingleLogic(), NBNode::computeSmoothShape(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), MSVehicle::Manoeuvre::configureEntryManoeuvre(), MSVehicle::Manoeuvre::configureExitManoeuvre(), NGNet::connect(), NBOwnTLDef::corridorLike(), MSSOTLWaveTrafficLightLogic::countVehicles(), MSSOTLE2Sensors::countVehicles(), MSDevice_SSM::createEncounters(), GUINet::createTLWrapper(), MSActuatedTrafficLightLogic::decideNextPhase(), MSDeterministicHiLevelTrafficLightLogic::decideNextPhase(), MSSOTLPolicyBasedTrafficLightLogic::decideNextPhase(), MSSwarmTrafficLightLogic::decideNextPhase(), MSDeterministicHiLevelTrafficLightLogic::decidePolicy(), MSSwarmTrafficLightLogic::decidePolicy(), MSLane::detectCollisionBetween(), MSLane::detectCollisions(), MSLane::detectPedestrianJunctionCollision(), NIVissimDistrictConnection::dict_BuildDistrictNodes(), NIVissimDistrictConnection::dict_BuildDistricts(), MSE3Collector::enter(), MSVehicle::enterLaneAtMove(), MSVehicle::Manoeuvre::entryManoeuvreIsComplete(), METriggeredCalibrator::execute(), Command_SaveTLSProgram::execute(), Command_SaveTLSState::execute(), Command_SaveTLSSwitches::execute(), Command_SaveTLSSwitchStates::execute(), MSVTypeProbe::execute(), MSPModel_Striping::MovePedestrians::execute(), MSCalibrator::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(), GUITrafficLightLogicWrapper::getActiveTLLogic(), RODFDetectorCon::getAggFlowFor(), RODFDetectorCon::getAnyDetectorForEdge(), MSPModel_Striping::getArbitraryPath(), MSVehicle::getBackPosition(), MSVehicle::getBackPositionOnLane(), libsumo::Vehicle::getBestLanes(), NBOwnTLDef::getBestPair(), NBRailwayTopologyAnalyzer::getBrokenRailNodes(), MSLane::getCanonicalPredecessorLane(), MSLane::getCanonicalSuccessorLane(), MSVehicle::getCenterOnEdge(), MSDevice_Battery::getChargingStationID(), MSRailSignal::getClickableTLLinkID(), libsumo::TrafficLight::getControlledLinks(), MSLane::getCriticalLeader(), NBNodeShapeComputer::getDefaultRadius(), MSLink::getDescription(), NBTrafficLightDefinition::getDescription(), GUIPerson::getDestinationEdgeID(), RODFNet::getDetectorEdge(), MSActuatedTrafficLightLogic::getDetectorPriority(), GUIPerson::getEdgeID(), GUIMEVehicle::getEdgeID(), MSMeanData::getEdgeID(), libsumo::Lane::getEdgeID(), MSPModel_Remote::getFirstPedestrianLane(), MSLane::getFollower(), MSLane::getFollowersOnConsecutive(), GUIPerson::getFromEdgeID(), MSCalibrator::getID(), NBEdge::getID(), libsumo::InductionLoop::getLaneID(), libsumo::LaneArea::getLaneID(), libsumo::Vehicle::getLaneID(), MSParkingArea::getLastFreePosWithReservation(), MSLane::getLastVehicleInformation(), MSVehicle::getLatOffset(), MSLane::getLeader(), MSLink::getLeaderInfo(), MSLane::getLeaderOnConsecutive(), MSLane::getLeadersOnConsecutive(), MSLink::getLengthBeforeCrossing(), MSLane::getLinkTo(), MSDeterministicHiLevelTrafficLightLogic::getMeanSpeedForInputLanes(), MSDeterministicHiLevelTrafficLightLogic::getMeanSpeedForOutputLanes(), NIImporter_VISUM::getNamedEdgeContinuating(), MSPerson::getNextEdge(), MSPModel_Striping::getNextLane(), GNEDialogACChooser::getObjectName(), MSLane::getOppositeFollower(), MSLane::getOppositeLeader(), MSLane::getOppositePos(), libsumo::Simulation::getParameter(), GUILane::getParameterWindow(), GUITrafficLightLogicWrapper::getParameterWindow(), GUILane::getParentName(), 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(), MSContainer::MSContainerStage_Tranship::getStageSummary(), MSTransportable::Stage_Trip::getStageSummary(), MSTransportable::Stage_Waiting::getStageSummary(), MSPerson::MSPersonStage_Walking::getStageSummary(), MSPerson::MSPersonStage_Driving::getStageSummary(), MSNet::getStoppingPlaceID(), MSLane::getSurroundingVehicles(), MSActuatedTrafficLightLogic::getTarget(), MSRailSignal::getTLLinkID(), MSLane::getUpcomingLinks(), MSDevice_SSM::getUpstreamVehicles(), MSPModel_Striping::getVehicleObstacles(), MSDevice_SSM::getVehiclesOnJunction(), MSEdge::getWaitingVehicle(), MSLink::getZipperSpeed(), NBNode::guessCrossings(), RODFDetectorCon::guessEmptyFlows(), NBNodeCont::guessTLs(), GUITLLogicPhasesTrackerWindow::GUITLLogicPhasesTrackerWindow(), MSLane::handleCollisionBetween(), MSVehicle::haveValidStopEdges(), libsumo::POI::highlight(), MSVehicle::ignoreRed(), MSActuatedTrafficLightLogic::init(), MSDelayBasedTrafficLightLogic::init(), MSDeterministicHiLevelTrafficLightLogic::init(), MSRailSignal::init(), MSSOTLTrafficLightLogic::init(), MSSwarmTrafficLightLogic::init(), MSTrafficLightLogic::init(), MSE2Collector::initAuxiliaries(), NIImporter_SUMO::initTrafficLightLogic(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NBDistrictCont::insert(), NBNodeCont::insert(), NBTrafficLightLogicCont::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(), 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(), MSE2Collector::notifyEnter(), MSDevice_Bluelight::notifyEnter(), MSDevice_Example::notifyEnter(), MSDevice_SSM::notifyEnter(), MSDevice_Tripinfo::notifyEnter(), MSMeanData::MeanDataValues::notifyEnter(), MSMeanData::MeanDataValueTracker::notifyEnter(), MSMeanData_Net::MSLaneMeanDataValues::notifyEnter(), MSTriggeredRerouter::notifyEnter(), MSE3Collector::MSE3EntryReminder::notifyEnter(), MSE3Collector::MSE3LeaveReminder::notifyEnter(), MSDevice_BTreceiver::notifyEnter(), MSDevice_BTsender::notifyEnter(), MSDevice_Bluelight::notifyLeave(), MSDevice_Example::notifyLeave(), MSDevice_SSM::notifyLeave(), MSDevice_Transportable::notifyLeave(), MSDevice_Tripinfo::notifyLeave(), MSE2Collector::notifyLeave(), MSDevice_BTreceiver::notifyLeave(), MSDevice_BTsender::notifyLeave(), MSDevice_Bluelight::notifyMove(), MSDevice_BTreceiver::notifyMove(), MSDevice_BTsender::notifyMove(), MSDevice_Example::notifyMove(), MSDevice_SSM::notifyMove(), MSE2Collector::notifyMove(), MSMeanData::MeanDataValues::notifyMove(), MSDevice_ToC::notifyMove(), GNETLSEditorFrame::onCmdDefSwitch(), GUIViewTraffic::onGamingClick(), MSLink::opened(), RORouteHandler::openRoute(), MSLane::incoming_lane_priority_sorter::operator()(), MSLane::outgoing_lane_priority_sorter::operator()(), NBNetBuilder::by_id_sorter::operator()(), NBNode::nodes_by_id_sorter::operator()(), RODFNet::idComp::operator()(), NIImporter_VISUM::parse_Connectors_legacy(), 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(), MSDevice_ToC::requestToC(), MSBaseVehicle::reroute(), MSRailSignal::LinkInfo::reroute(), GUIVehicle::rerouteDRTStop(), MSTriggeredRerouter::rerouteParkingArea(), MSVehicle::rerouteParkingArea(), MSLane::resetManeuverReservation(), MSLane::resetPartialOccupation(), RODFNet::revalidateFlows(), NBRailwayTopologyAnalyzer::reverseEdges(), RONet::saveAndRemoveRoutesUntil(), ROPerson::Ride::saveAsXML(), ROVehicle::saveAsXML(), MSBaseVehicle::saveState(), MSLane::saveState(), MSDevice::saveState(), MSDevice_Routing::saveState(), MSDevice_Tripinfo::saveState(), MSDevice_Vehroutes::saveState(), saveState(), GUIVehicle::selectBlockingFoes(), MSE2Collector::selectLanes(), MSLink::setApproaching(), 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(), MSDevice_Battery::setStoppingTreshold(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBOwnTLDef::setTLControllingInformation(), NBTrafficLightLogicCont::setTLControllingInformation(), NBEdge::shiftPositionAtNode(), MSLane::sortManeuverReservations(), IntermodalNetwork< E, L, N, V >::splitEdge(), MSLaneChangerSublane::startChangeSublane(), MSStopOut::stopEnded(), MSStopOut::stopStarted(), MSLane::succLinkSec(), GUITrafficLightLogicWrapper::switchTLSLogic(), MELoop::teleportVehicle(), MSDevice_ToC::triggerDownwardToC(), MSDevice_ToC::triggerMRM(), MSDevice_ToC::triggerUpwardToC(), MSSOTLTrafficLightLogic::trySwitch(), MSDevice_SSM::update(), PolygonDynamics::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(), MSLCM_LC2013::wantsChange(), MSLCM_SL2015::wantsChange(), MSLCM_SL2015::wantsChangeSublane(), MSInstantInductLoop::write(), NBParking::write(), MSFCDExport::write(), MSBatteryExport::write(), MSEmissionExport::write(), MSLink::writeApproaching(), MSRailSignal::writeBlocks(), NWWriter_DlrNavteq::writeConnectedLanes(), NWWriter_SUMO::writeDistrict(), MSMeanData::writeEdge(), NWWriter_SUMO::writeEdge(), MSFullExport::writeEdge(), MSXMLRawOut::writeEdge(), NWWriter_XML::writeEdgesAndConnections(), RODFDetector::writeEmitterDefinition(), RODFDetectorCon::writeEmitterPOIs(), RODFDetectorCon::writeEmitters(), RODFDetectorCon::writeEndRerouterDetectors(), NWWriter_OpenDrive::writeInternalEdge(), writeInterval(), NWWriter_SUMO::writeJunction(), MSFullExport::writeLane(), MSQueueExport::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(), SUMOPolygon::writeXML(), PointOfInterest::writeXML(), MSE2Collector::writeXMLOutput(), MSInductLoop::writeXMLOutput(), MSRouteProbe::writeXMLOutput(), and RONet::~RONet().

◆ getIDSecure()

template<class T >
static std::string Named::getIDSecure ( const T *  obj,
const std::string &  fallBack = "NULL" 
)
inlinestaticinherited

get an identifier for Named-like object which may be Null

Definition at line 69 of file Named.h.

Referenced by MSLCM_LC2013::_wantsChange(), MSLCM_SL2015::_wantsChangeSublane(), MSLaneChanger::changeOpposite(), MSVehicle::checkRewindLinkLanes(), AStarRouter< E, V >::compute(), DijkstraRouter< E, V >::compute(), NBEdge::computeEdge2Edges(), NBEdge::computeLanes2Edges(), NBOwnTLDef::computeLogicAndConts(), MSLaneChanger::continueChange(), MSLane::detectCollisions(), MSRailSignal::DriveWay::findProtection(), NBPTLineCont::findWay(), MSCFModel_CACC::followSpeed(), MSCFModel_W99::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_SL2015::saveBlockerLength(), MSLCM_LC2013::saveBlockerLength(), MSLCM_LC2013::slowDownForBlocked(), MSLCM_SL2015::slowDownForBlocked(), MSLaneChangerSublane::startChangeSublane(), MSLeaderInfo::toString(), MSLeaderDistanceInfo::toString(), MSCriticalFollowerDistanceInfo::toString(), toString(), MSVehicle::updateBestLanes(), and MSAbstractLaneChangeModel::updateShadowLane().

◆ getParameter()

std::string MSTransportableDevice_Routing::getParameter ( const std::string &  key) const
virtual

try to retrieve the given parameter from this device. Throw exception for unsupported key

Reimplemented from MSDevice.

Definition at line 105 of file MSTransportableDevice_Routing.cpp.

References deviceName(), myPeriod, and time2string().

◆ getStringParam()

std::string MSDevice::getStringParam ( const SUMOVehicle v,
const OptionsCont oc,
std::string  paramName,
std::string  deflt,
bool  required 
)
staticprotectedinherited

◆ insertDefaultAssignmentOptions()

void MSDevice::insertDefaultAssignmentOptions ( const std::string &  deviceName,
const std::string &  optionsTopic,
OptionsCont oc,
const bool  isPerson = false 
)
staticprotectedinherited

◆ insertOptions()

void MSTransportableDevice_Routing::insertOptions ( OptionsCont oc)
static

Inserts MSTransportableDevice_Routing-options.

Parameters
[filled]oc The options container to add the options to

Definition at line 42 of file MSTransportableDevice_Routing.cpp.

References OptionsCont::addDescription(), OptionsCont::addSynonyme(), OptionsCont::doRegister(), and MSDevice::insertDefaultAssignmentOptions().

Referenced by MSDevice::insertOptions().

◆ loadState()

void MSTransportableDevice_Routing::loadState ( const SUMOSAXAttributes attrs)
virtual

Loads the state of the device from the given description.

Parameters
[in]attrsXML attributes describing the current state

Reimplemented from MSDevice.

Definition at line 148 of file MSTransportableDevice_Routing.cpp.

References SUMOSAXAttributes::getString(), myPeriod, and SUMO_ATTR_STATE.

◆ operator=()

MSTransportableDevice_Routing& MSTransportableDevice_Routing::operator= ( const MSTransportableDevice_Routing )
private

Invalidated assignment operator.

◆ reroute()

void MSTransportableDevice_Routing::reroute ( const SUMOTime  currentTime,
const bool  onInit = false 
)

initiate the rerouting, create router / thread pool on first use

Definition at line 93 of file MSTransportableDevice_Routing.cpp.

References MSRoutingEngine::getLastAdaptation(), MSRoutingEngine::initEdgeWeights(), and myLastRouting.

Referenced by wrappedRerouteCommandExecute().

◆ saveState()

void MSTransportableDevice_Routing::saveState ( OutputDevice out) const
virtual

Saves the state of the device.

Parameters
[in]outThe OutputDevice to write the information into

Reimplemented from MSDevice.

Definition at line 137 of file MSTransportableDevice_Routing.cpp.

References OutputDevice::closeTag(), Named::getID(), myPeriod, OutputDevice::openTag(), SUMO_ATTR_ID, SUMO_ATTR_STATE, SUMO_TAG_DEVICE, toString(), and OutputDevice::writeAttr().

◆ setID()

void Named::setID ( const std::string &  newID)
inlineinherited

◆ setParameter()

void MSTransportableDevice_Routing::setParameter ( const std::string &  key,
const std::string &  value 
)
virtual

try to set the given parameter for this device. Throw exception for unsupported key

Reimplemented from MSDevice.

Definition at line 114 of file MSTransportableDevice_Routing.cpp.

References MSEventControl::addEvent(), WrappingCommand< T >::deschedule(), deviceName(), MSNet::getInsertionEvents(), MSNet::getInstance(), myPeriod, myRerouteCommand, SIMSTEP, TIME2STEPS, StringUtils::toDouble(), and wrappedRerouteCommandExecute().

◆ wrappedRerouteCommandExecute()

SUMOTime MSTransportableDevice_Routing::wrappedRerouteCommandExecute ( SUMOTime  currentTime)
private

Performs rerouting after a period.

A new route is computed by calling the vehicle's "reroute" method, supplying "getEffort" as the edge effort retrieval method.

This method is called from the event handler at the begin of a simulation step after the rerouting period is over. The reroute period is returned.

Parameters
[in]currentTimeThe current simulation time
Returns
The offset to the next call (the rerouting period "myPeriod")
See also
MSVehicle::reroute
MSEventHandler
WrappingCommand

Definition at line 86 of file MSTransportableDevice_Routing.cpp.

References myPeriod, and reroute().

Referenced by MSTransportableDevice_Routing(), and setParameter().

Field Documentation

◆ myEquipmentRNG

std::mt19937 MSDevice::myEquipmentRNG
staticprivateinherited

A random number generator used to choose from vtype/route distributions and computing the speed factors.

Definition at line 189 of file MSDevice.h.

Referenced by MSDevice::equippedByDefaultAssignmentOptions(), and MSDevice::getEquipmentRNG().

◆ myExplicitIDs

std::map< std::string, std::set< std::string > > MSDevice::myExplicitIDs
staticprivateinherited

vehicles which explicitly carry a device, sorted by device, first

Definition at line 186 of file MSDevice.h.

Referenced by MSDevice::equippedByDefaultAssignmentOptions().

◆ myHolder

MSTransportable& MSTransportableDevice::myHolder
protectedinherited

The person that stores the device.

Definition at line 78 of file MSTransportableDevice.h.

Referenced by MSTransportableDevice::getHolder().

◆ myID

◆ myLastRouting

SUMOTime MSTransportableDevice_Routing::myLastRouting
private

The last time a routing took place.

Definition at line 145 of file MSTransportableDevice_Routing.h.

Referenced by reroute().

◆ myPeriod

SUMOTime MSTransportableDevice_Routing::myPeriod
private

The period with which a vehicle shall be rerouted.

Definition at line 142 of file MSTransportableDevice_Routing.h.

Referenced by getParameter(), loadState(), saveState(), setParameter(), and wrappedRerouteCommandExecute().

◆ myRerouteCommand

WrappingCommand< MSTransportableDevice_Routing >* MSTransportableDevice_Routing::myRerouteCommand
private

The (optional) command responsible for rerouting.

Definition at line 148 of file MSTransportableDevice_Routing.h.

Referenced by setParameter(), and ~MSTransportableDevice_Routing().


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