![]() |
SUMO - Simulation of Urban MObility
|
A device that performs vehicle rerouting based on current edge speeds. More...
#include <MSDevice_Routing.h>
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... | |
const std::string | deviceName () const |
return the name for this type of device More... | |
virtual void | generateOutput () const |
Called on writing tripinfo 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... | |
std::string | getParameter (const std::string &key) const |
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... | |
virtual void | notifyMoveInternal (const SUMOVehicle &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... | |
void | reroute (const SUMOTime currentTime, const bool onInit=false) |
initiate the rerouting, create router / thread pool on first use 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) |
try to set the given parameter for this device. Throw exception for unsupported key More... | |
void | skipRouting (const SUMOTime currentTime) |
Labels the current time step as "unroutable". More... | |
~MSDevice_Routing () | |
Destructor. More... | |
Methods called on vehicle movement / state change, overwriting MSDevice | |
bool | notifyEnter (SUMOVehicle &veh, MSMoveReminder::Notification reason, const MSLane *enteredLane=0) |
Computes a new route on vehicle insertion. More... | |
Interface methods, to be derived by subclasses | |
virtual bool | notifyMove (SUMOVehicle &veh, double oldPos, double newPos, double newSpeed) |
Checks whether the reminder still has to be notified about the vehicle moves. More... | |
virtual bool | notifyLeave (SUMOVehicle &veh, double lastPos, Notification reason, const MSLane *enteredLane=0) |
Called if the vehicle leaves the reminder's lane. More... | |
void | updateDetector (SUMOVehicle &veh, double entryPos, double leavePos, SUMOTime entryTime, SUMOTime currentTime, SUMOTime leaveTime, bool cleanUp) |
Static Public Member Functions | |
static void | buildVehicleDevices (SUMOVehicle &v, std::vector< MSDevice *> &into) |
Build devices for the given vehicle, if needed. More... | |
static bool | checkOptions (OptionsCont &oc) |
checks MSDevice_Routing-options More... | |
static void | cleanup () |
deletes the router instance More... | |
static void | cleanupAll () |
perform cleanup for all devices More... | |
static double | getAssumedSpeed (const MSEdge *edge) |
return current travel speed assumption 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 SUMOAbstractRouter< MSEdge, SUMOVehicle > & | getRouterTT (const MSEdgeVector &prohibited=MSEdgeVector()) |
return the router instance More... | |
static void | insertOptions (OptionsCont &oc) |
Inserts MSDevice_Routing-options. More... | |
static bool | isEnabled () |
returns whether any routing actions take place More... | |
Protected Member Functions | |
void | removeFromVehicleUpdateValues (SUMOVehicle &veh) |
Static Protected Member Functions | |
Helper methods for device assignment | |
static void | insertDefaultAssignmentOptions (const std::string &deviceName, const std::string &optionsTopic, OptionsCont &oc) |
Adds common command options that allow to assign devices to vehicles. More... | |
static bool | equippedByDefaultAssignmentOptions (const OptionsCont &oc, const std::string &deviceName, SUMOVehicle &v) |
Determines whether a vehicle should get a certain device. More... | |
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 Member Functions | |
MSDevice_Routing (SUMOVehicle &holder, const std::string &id, SUMOTime period, SUMOTime preInsertionPeriod) | |
Constructor. More... | |
MSDevice_Routing (const MSDevice_Routing &) | |
Invalidated copy constructor. More... | |
MSDevice_Routing & | operator= (const MSDevice_Routing &) |
Invalidated assignment operator. More... | |
SUMOTime | preInsertionReroute (const SUMOTime currentTime) |
Performs rerouting before insertion into the network. More... | |
SUMOTime | wrappedRerouteCommandExecute (SUMOTime currentTime) |
Performs rerouting after a period. More... | |
Static Private Member Functions | |
static double | getEffort (const MSEdge *const e, const SUMOVehicle *const v, double t) |
Returns the effort to pass an edge. More... | |
static void | initEdgeWeights () |
initialize the edge weights if not done before More... | |
Network state adaptation | |
static SUMOTime | adaptEdgeEfforts (SUMOTime currentTime) |
Adapt edge efforts by the current edge states. 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... | |
SUMOTime | myPreInsertionPeriod |
The period with which a vehicle shall be rerouted before insertion. More... | |
WrappingCommand< MSDevice_Routing > * | myRerouteCommand |
The (optional) command responsible for rerouting. More... | |
SUMOTime | mySkipRouting |
The time for which routing may be skipped because we cannot be inserted. More... | |
Static Private Attributes | |
static SUMOTime | myAdaptationInterval = -1 |
At which time interval the edge weights get updated. More... | |
static int | myAdaptationSteps |
The number of steps for averaging edge speeds (ring-buffer) More... | |
static int | myAdaptationStepsIndex = 0 |
The current index in the pastEdgeSpeed ring-buffer. More... | |
static double | myAdaptationWeight |
Information which weight prior edge efforts have. More... | |
static std::map< std::pair< const MSEdge *, const MSEdge * >, const MSRoute * > | myCachedRoutes |
The container of pre-calculated routes. More... | |
static std::vector< double > | myEdgeSpeeds |
The container of edge speeds. More... | |
static Command * | myEdgeWeightSettingCommand = 0 |
The weights adaptation/overwriting command. More... | |
static SUMOTime | myLastAdaptation = -1 |
Information when the last edge weight adaptation occured. More... | |
static std::vector< std::vector< double > > | myPastEdgeSpeeds |
The container of edge speeds. More... | |
static double | myRandomizeWeightsFactor = 0 |
Whether to disturb edge weights dynamically. More... | |
static SUMOAbstractRouter< MSEdge, SUMOVehicle > * | myRouter = 0 |
The router to use. More... | |
static AStarRouter< MSEdge, SUMOVehicle, prohibited_withPermissions< MSEdge, SUMOVehicle > > * | myRouterWithProhibited = 0 |
The router to use by rerouter elements. More... | |
static bool | myWithTaz |
whether taz shall be used at initial rerouting More... | |
A device that performs vehicle rerouting based on current edge speeds.
The routing-device system consists of in-vehicle devices that perform a routing and a simulation-wide (static) methods for colecting edge weights.
The edge weights container "myEdgeSpeeds" is pre-initialised as soon as one device is built and is kept updated via an event that adapts it to the current mean speed on the simulated network's edges.
A device is assigned to a vehicle using the common explicit/probability - procedure.
A device computes a new route for a vehicle as soon as the vehicle is inserted (within "enterLaneAtInsertion") - and, if the given period is larger than 0 - each x time steps where x is the period. This is triggered by an event that executes "wrappedRerouteCommandExecute".
Definition at line 75 of file MSDevice_Routing.h.
|
inherited |
Definition of a vehicle state.
Definition at line 95 of file MSMoveReminder.h.
MSDevice_Routing::~MSDevice_Routing | ( | ) |
Destructor.
Definition at line 196 of file MSDevice_Routing.cpp.
References WrappingCommand< T >::deschedule(), MSNet::getInstance(), and myRerouteCommand.
Referenced by isEnabled().
|
private |
Constructor.
[in] | holder | The vehicle that holds this device |
[in] | id | The ID of the device |
[in] | period | The period with which a new route shall be searched |
[in] | preInsertionPeriod | The route search period before insertion |
Definition at line 183 of file MSDevice_Routing.cpp.
References MSEventControl::addEvent(), SUMOVehicleParameter::depart, MSNet::getInsertionEvents(), MSNet::getInstance(), SUMOVehicle::getParameter(), myEdgeWeightSettingCommand, myPreInsertionPeriod, myRerouteCommand, preInsertionReroute(), VEHPARS_FORCE_REROUTE, and SUMOVehicleParameter::wasSet().
Referenced by buildVehicleDevices(), and skipRouting().
|
private |
Invalidated copy constructor.
Adapt edge efforts by the current edge states.
This method is called by the event handler at the end of a simulation step. The current edge weights are combined with the previously stored.
[in] | currentTime | The current simulation time |
Definition at line 301 of file MSDevice_Routing.cpp.
References OutputDevice::closeTag(), DELTA_T, OutputDevice::getDeviceByOption(), MSNet::getEdgeControl(), MSEdgeControl::getEdges(), MSNet::getInstance(), OptionsCont::getOptions(), initEdgeWeights(), myAdaptationInterval, myAdaptationSteps, myAdaptationStepsIndex, myAdaptationWeight, myCachedRoutes, myEdgeSpeeds, myLastAdaptation, myPastEdgeSpeeds, OutputDevice::openTag(), STEPS2TIME, SUMO_ATTR_BEGIN, SUMO_ATTR_END, SUMO_ATTR_ID, SUMO_TAG_EDGE, SUMO_TAG_INTERVAL, and OutputDevice::writeAttr().
Referenced by buildVehicleDevices(), and skipRouting().
|
inlineinherited |
Adds this object to the given container.
Definition at line 128 of file Named.h.
References Named::StoringVisitor::add().
|
static |
Build devices for the given vehicle, if needed.
The options are read and evaluated whether rerouting-devices shall be built for the given vehicle.
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.
For each seen vehicle, the global vehicle index is increased.
The built device is stored in the given vector.
[in] | v | The vehicle for which a device may be built |
Definition at line 155 of file MSDevice_Routing.cpp.
References adaptEdgeEfforts(), MSEventControl::addEvent(), OutputDevice::createDeviceByOption(), MSDevice::equippedByDefaultAssignmentOptions(), OptionsCont::getBool(), MSNet::getEndOfTimestepEvents(), OptionsCont::getFloat(), SUMOVehicle::getID(), MSNet::getInstance(), OptionsCont::getOptions(), SUMOVehicle::getParameter(), OptionsCont::getString(), MSDevice_Routing(), myAdaptationInterval, myAdaptationWeight, myEdgeWeightSettingCommand, myWithTaz, string2time(), VEHPARS_FORCE_REROUTE, SUMOVehicleParameter::wasSet(), and WRITE_WARNING.
Referenced by MSDevice::buildVehicleDevices(), and MSBaseVehicle::createDevice().
|
static |
checks MSDevice_Routing-options
Definition at line 125 of file MSDevice_Routing.cpp.
References OptionsCont::getFloat(), OptionsCont::getInt(), OptionsCont::getString(), OptionsCont::isDefault(), string2time(), and WRITE_ERROR.
Referenced by MSDevice::checkOptions().
|
static |
deletes the router instance
Definition at line 507 of file MSDevice_Routing.cpp.
References MSEdge::isTazConnector(), myCachedRoutes, myRouter, myRouterWithProhibited, and myWithTaz.
Referenced by MSDevice::cleanupAll().
|
staticinherited |
perform cleanup for all devices
Definition at line 95 of file MSDevice.cpp.
References MSDevice_Tripinfo::cleanup(), and cleanup().
Referenced by MSNet::clearAll(), and MSDevice::getEquipmentRNG().
|
inlinevirtual |
return the name for this type of device
Implements MSDevice.
Definition at line 166 of file MSDevice_Routing.h.
References reroute().
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 115 of file MSDevice.cpp.
References TplConvert::_2bool(), MSDevice::deviceName(), OptionsCont::exists(), OptionsCont::getBool(), OptionsCont::getFloat(), SUMOVehicle::getID(), MSNet::getInstance(), OptionsCont::getOptions(), Parameterised::getParameter(), SUMOVehicle::getParameter(), MSVehicleType::getParameter(), MSVehicleControl::getQuota(), OptionsCont::getStringVector(), MSNet::getVehicleControl(), SUMOVehicle::getVehicleType(), OptionsCont::isSet(), Parameterised::knowsParameter(), MSDevice::myEquipmentRNG, MSDevice::myExplicitIDs, and RandHelper::rand().
Referenced by MSDevice_Battery::buildVehicleDevices(), MSDevice_Bluelight::buildVehicleDevices(), MSDevice_Example::buildVehicleDevices(), MSDevice_BTsender::buildVehicleDevices(), MSDevice_BTreceiver::buildVehicleDevices(), MSDevice_Emissions::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 135 of file MSDevice.h.
References MSDevice::loadState(), and MSDevice::saveState().
|
static |
return current travel speed assumption
Definition at line 295 of file MSDevice_Routing.cpp.
References getEffort(), and MSEdge::getLength().
Referenced by MSEdge::getRoutingSpeed(), and skipRouting().
|
inlineinherited |
Definition at line 234 of file MSMoveReminder.h.
References MSMoveReminder::myDescription, and MSMoveReminder::removeFromVehicleUpdateValues().
Referenced by MSBaseVehicle::getSingularType(), MSMeanData_Net::MSLaneMeanDataValues::notifyMoveInternal(), and MSMeanData_Net::MSLaneMeanDataValues::write().
|
staticprivate |
Returns the effort to pass an edge.
This method is given to the used router in order to obtain the efforts to pass an edge from the internal edge weights container.
The time is not used, here, as the current simulation state is used in an aggregated way.
[in] | e | The edge for which the effort to be passed shall be returned |
[in] | v | The vehicle that is rerouted |
[in] | t | The time for which the effort shall be returned |
Definition at line 281 of file MSDevice_Routing.cpp.
References MSEdge::getLength(), MSEdge::getMinimumTravelTime(), MSEdge::getNumericalID(), MAX2(), myEdgeSpeeds, myRandomizeWeightsFactor, NUMERICAL_EPS, and RandHelper::rand().
Referenced by getAssumedSpeed(), getParameter(), getRouterTT(), reroute(), and skipRouting().
|
inlinestaticinherited |
Definition at line 90 of file MSDevice.h.
References MSDevice::cleanupAll(), MSDevice::deviceName(), and MSDevice::myEquipmentRNG.
Referenced by NLBuilder::init(), and GUILoadThread::run().
|
inlineinherited |
Returns the vehicle that holds this device.
Definition at line 119 of file MSDevice.h.
References MSDevice::myHolder.
Referenced by MSChargingStation::addChargeValueForOutput().
|
inlineinherited |
Returns the id.
Definition at line 65 of file Named.h.
References Named::myID.
Referenced by NIImporter_SUMO::_loadNetwork(), MSLCM_LC2013::adaptSpeedToPedestrians(), MSVehicle::adaptToLeader(), MSVehicle::adaptToLeaders(), LaneStoringVisitor::add(), MSPModel_Striping::add(), MSVehicleTransfer::add(), PCPolyContainer::add(), MSDetectorControl::add(), Named::StoringVisitor::add(), ShapeContainer::add(), IntermodalRouter< E, L, N, V >::addAccess(), NLTriggerBuilder::addAccess(), RORouteDef::addAlternative(), MSLane::addApproachingLane(), NBLoadedSUMOTLDef::addConnection(), NLHandler::addConnection(), NIXMLConnectionsHandler::addCrossing(), MSPModel_Striping::addCrossingVehs(), RODFDetectorCon::addDetector(), RONet::addEdge(), NBParkingCont::addEdges2Keep(), ROJTREdge::addFollowerProbability(), MSTLLogicControl::TLSLogicVariants::addLogic(), RONet::addNode(), NIImporter_SUMO::addPhase(), GUIEdge::addRerouter(), NBEdge::addRestrictedLane(), RONet::addRouteDef(), NBDistrict::addSink(), NBDistrict::addSource(), NIXMLEdgesHandler::addSplit(), NBTrafficLightLogic::addStep(), ROVehicle::addStop(), MSRouteHandler::addStop(), MSVehicle::addStop(), MSNet::addStoppingPlace(), NBEdge::addStraightConnections(), NIXMLTrafficLightsHandler::addTlConnection(), NIVissimDisturbance::addToNode(), MSVehicle::addTraciStop(), MSVehicle::addTraciStopAtStoppingPlace(), AGActivityTripWriter::addTrip(), NIXMLConnectionsHandler::addWalkingArea(), NBEdge::append(), NBPTStopCont::assignAndCreatNewPTStopAsNeeded(), NBPTStopCont::assignPTStopToEdgeOfClosestPlatform(), 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(), NIVissimConnection::buildEdgeConnections(), RODFNet::buildEdgeFlowMap(), GNETLSEditorFrame::buildIinternalLanes(), NBEdge::buildInnerEdges(), NGEdge::buildNBEdge(), NIVissimEdge::buildNBEdge(), NBRampsComputer::buildOffRamp(), NBRampsComputer::buildOnRamp(), MELoop::buildSegmentsFor(), MSSOTLE2Sensors::buildSensorForLane(), MSSOTLE2Sensors::buildSensorForOutLane(), NBNode::buildWalkingAreas(), MSBaseVehicle::calculateArrivalParams(), MSSwarmTrafficLightLogic::calculateEtaDiff(), MSSwarmTrafficLightLogic::calculateEtaRatio(), MSSOTLPolicyBasedTrafficLightLogic::canRelease(), MSLaneChanger::changeOpposite(), MELoop::changeSegment(), MSSimpleTrafficLightLogic::changeStepAndDuration(), MSEdge::checkAndRegisterBiDirEdge(), MSLane::checkForPedestrians(), NBEdge::checkGeometry(), NBEdgeCont::checkGrade(), MSVehicleTransfer::checkInsertions(), MSVehicle::checkLinkLeader(), NBEdgeCont::checkOverlap(), MSDevice_Battery::checkParam(), MSE2Collector::checkPositioning(), MSVehicle::checkRewindLinkLanes(), MSSwarmTrafficLightLogic::choosePolicy(), MSDevice_SSM::classifyEncounter(), NBTrafficLightLogic::closeBuilding(), ODDistrictHandler::closeDistrict(), NLHandler::closeEdge(), RORouteHandler::closeRouteDistribution(), RORouteHandler::closeVehicle(), NBTrafficLightDefinition::collectAllLinks(), NBLoadedSUMOTLDef::collectEdges(), NBTrafficLightDefinition::collectEdges(), NBLoadedSUMOTLDef::collectEdgeVectors(), NBLoadedTLDef::collectLinks(), ROJTRRouter::compute(), NBTrafficLightDefinition::compute(), NBEdge::computeAngle(), NBEdge::computeLaneShapes(), NBNode::computeLogic(), NBOwnTLDef::computeLogicAndConts(), NBNode::computeNodeShape(), NBNodeShapeComputer::computeNodeShapeDefault(), NBNodeShapeComputer::computeNodeShapeSmall(), RODFNet::computeRoutesFor(), NBTrafficLightLogicCont::computeSingleLogic(), NBNode::computeSmoothShape(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NGNet::connect(), 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(), NBEdge::divideOnEdges(), NBEdge::divideSelectedLanesOnEdges(), MSTransportable::Stage_Waiting::endEventOutput(), MSTransportable::Stage_Driving::endEventOutput(), MSE3Collector::enter(), MSVehicle::enterLaneAtMove(), METriggeredCalibrator::execute(), MSCalibrator::execute(), Command_SaveTLSState::execute(), Command_SaveTLSSwitchStates::execute(), Command_SaveTLSSwitches::execute(), MSVTypeProbe::execute(), MSPModel_Striping::MovePedestrians::execute(), MSTrafficLightLogic::SwitchCommand::execute(), MSVehicle::executeMove(), MSLane::executeMovements(), NBNodeCont::extract(), NBTrafficLightLogicCont::extract(), NBEdgeCont::extract(), libsumo::Helper::findCloserLane(), MSDevice_SSM::findFoeConflictLane(), libsumo::Simulation::findIntermodalRoute(), MSDevice_SSM::findSurroundingVehicles(), MSDevice_SSM::flushConflicts(), NBTrafficLightDefinition::forbids(), NBRampsComputer::fulfillsRampConstraints(), RODFDetectorCon::getAggFlowFor(), RODFDetectorCon::getAnyDetectorForEdge(), MSPModel_Striping::getArbitraryPath(), GNEConnection::getAttribute(), MSVehicle::getBackPosition(), MSVehicle::getBackPositionOnLane(), libsumo::Vehicle::getBestLanes(), NBOwnTLDef::getBestPair(), MSVehicle::getCenterOnEdge(), MSDevice_Battery::getChargingStationID(), NBEdge::getConnection(), NBEdge::getConnectionRef(), libsumo::TrafficLight::getControlledLinks(), NBEdge::getCrossingAngle(), RODFNet::getDetectorEdge(), libsumo::Lane::getEdgeID(), MSMeanData::getEdgeID(), NBEdge::getFirstNonPedestrianLane(), MSLane::getFollower(), MSLane::getFollowersOnConsecutive(), libsumo::InductionLoop::getLaneID(), libsumo::LaneArea::getLaneID(), libsumo::Vehicle::getLaneID(), MSLane::getLastVehicleInformation(), MSVehicle::getLatOffset(), MSLane::getLeader(), MSLink::getLeaderInfo(), MSLane::getLeaderOnConsecutive(), MSLane::getLeadersOnConsecutive(), MSLink::getLengthBeforeCrossing(), libsumo::Lane::getLinks(), MSLane::getLinkTo(), MSTLLogicControl::TLSLogicVariants::getLogicInstantiatingOff(), MSDeterministicHiLevelTrafficLightLogic::getMeanSpeedForInputLanes(), MSDeterministicHiLevelTrafficLightLogic::getMeanSpeedForOutputLanes(), NIImporter_VISUM::getNamedEdgeContinuating(), MSPerson::getNextEdge(), MSPModel_Striping::getNextLane(), MSLane::getOppositeFollower(), MSLane::getOppositeLeader(), MSLane::getOppositePos(), GUITrafficLightLogicWrapper::getParameterWindow(), GUIInstantInductLoop::MyWrapper::getParameterWindow(), GUIMEInductLoop::MyWrapper::getParameterWindow(), GUIVehicle::getParameterWindow(), GUIE2Collector::MyWrapper::getParameterWindow(), GUIInductLoop::MyWrapper::getParameterWindow(), MSLane::getPartialBehind(), MSSOTLTrafficLightLogic::getPhaseIndexWithMaxCTS(), MSSwarmTrafficLightLogic::getPheromoneForInputLanes(), MSSwarmTrafficLightLogic::getPheromoneForOutputLanes(), GUITrafficLightLogicWrapper::getPopUpMenu(), NLTriggerBuilder::getPosition(), NLDetectorBuilder::getPositionChecking(), NBNode::getPossiblySplittedIncoming(), NBNode::getPossiblySplittedOutgoing(), NIImporter_VISUM::getReversedContinuating(), NBPTStopCont::getReverseStop(), libsumo::Person::getRoadID(), libsumo::Vehicle::getRoadID(), libsumo::Vehicle::getRouteID(), MSNet::getStoppingPlaceID(), MSDevice_SSM::getUpstreamVehicles(), MSDevice_SSM::getVehiclesOnJunction(), MSTransportable::Stage_Driving::getWaitingDescription(), MSVehicleControl::getWaitingVehicle(), MSLink::getZipperSpeed(), NBNode::guessCrossings(), RODFDetectorCon::guessEmptyFlows(), NBEdgeCont::guessSidewalks(), NBNodeCont::guessTLs(), GUITLLogicPhasesTrackerWindow::GUITLLogicPhasesTrackerWindow(), MSLane::handleCollisionBetween(), NBEdgeCont::ignoreFilterMatch(), MSVehicle::ignoreRed(), MSDeterministicHiLevelTrafficLightLogic::init(), MSRailSignal::init(), MSDelayBasedTrafficLightLogic::init(), MSActuatedTrafficLightLogic::init(), MSTrafficLightLogic::init(), MSSOTLTrafficLightLogic::init(), MSSwarmTrafficLightLogic::init(), NBEdge::init(), MSE2Collector::initAuxiliaries(), NIImporter_SUMO::initTrafficLightLogic(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NBDistrictCont::insert(), NBNodeCont::insert(), NBTrafficLightLogicCont::insert(), NBEdgeCont::insert(), MSEdge::insertVehicle(), MSLane::integrateNewVehicle(), IntermodalNetwork< E, L, N, V >::IntermodalNetwork(), GNEJunction::invalidateTLS(), NBNode::invalidateTLS(), MSTLLogicControl::isActive(), MSPedestrianPushButton::isActiveForEdge(), MSPedestrianPushButton::isActiveOnAnySideOfTheRoad(), RODFNet::isDestination(), RODFNet::isFalseSource(), MSLane::isInsertionSuccess(), RODFNet::isSource(), MSSOTLTrafficLightLogic::isThresholdPassed(), NBNodeCont::joinJunctions(), NBEdgeCont::joinSameNodeConnectingEdges(), MSAbstractLaneChangeModel::laneChangeOutput(), MSE3Collector::leave(), MSE3Collector::leaveFront(), MSDevice_BTreceiver::BTreceiverUpdate::leaveRange(), MSPedestrianPushButton::loadCrossingEdgeMap(), NIImporter_OpenDrive::loadNetwork(), MSPedestrianPushButton::loadPushButtons(), NBEdge::MainDirections::MainDirections(), ODDistrictCont::makeDistricts(), MSE2Collector::makeVehicleInfo(), GNEJunction::markAsModified(), MSSOTLE2Sensors::meanVehiclesSpeed(), METriggeredCalibrator::METriggeredCalibrator(), MSPModel_Striping::moveInDirection(), MSPModel_Striping::moveInDirectionOnLane(), NBRampsComputer::moveRampRight(), 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(), NIXMLEdgesHandler::myEndElement(), NIImporter_SUMO::myEndElement(), NIXMLConnectionsHandler::myStartElement(), MSCalibrator::myStartElement(), MSLaneSpeedTrigger::myStartElement(), MSTriggeredRerouter::myStartElement(), NBConnection::NBConnection(), NBRequest::NBRequest(), MSPModel_Striping::nextBlocking(), MSDevice_BTreceiver::notifyEnter(), MSDevice_BTsender::notifyEnter(), MSMeanData::MeanDataValues::notifyEnter(), MSDevice_Bluelight::notifyEnter(), MSDevice_Example::notifyEnter(), MSMeanData_Net::MSLaneMeanDataValues::notifyEnter(), MSDevice_Tripinfo::notifyEnter(), MSTriggeredRerouter::notifyEnter(), MSMeanData::MeanDataValueTracker::notifyEnter(), MSE2Collector::notifyEnter(), MSDevice_SSM::notifyEnter(), MSDevice_Transportable::notifyLeave(), MSE3Collector::MSE3EntryReminder::notifyLeave(), MSDevice_Bluelight::notifyLeave(), MSDevice_Example::notifyLeave(), MSDevice_BTreceiver::notifyLeave(), MSDevice_BTsender::notifyLeave(), MSDevice_Tripinfo::notifyLeave(), MSE3Collector::MSE3LeaveReminder::notifyLeave(), MSE2Collector::notifyLeave(), MSDevice_SSM::notifyLeave(), MSDevice_Example::notifyMove(), MSMeanData::MeanDataValues::notifyMove(), MSDevice_BTreceiver::notifyMove(), MSDevice_BTsender::notifyMove(), MSE2Collector::notifyMove(), MSDevice_SSM::notifyMove(), MSMeanData_Net::MSLaneMeanDataValues::notifyMoveInternal(), GUIViewTraffic::onGamingClick(), GNEViewNet::onLeftBtnPress(), MSLink::opened(), RORouteHandler::openRoute(), Named::ComparatorIdLess::operator()(), NBTurningDirectionsComputer::combination_by_angle_sorter::operator()(), RODFNet::idComp::operator()(), NBNetBuilder::by_id_sorter::operator()(), NBOwnTLDef::edge_by_incoming_priority_sorter::operator()(), NBContHelper::same_connection_edge_sorter::operator()(), NBContHelper::edge_by_angle_to_nodeShapeCentroid_sorter::operator()(), NBNode::nodes_by_id_sorter::operator()(), MSEdge::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_LanesConnections(), NIImporter_VISUM::parse_Turns(), NIImporter_VISUM::parse_TurnsToSignalGroups(), NLTriggerBuilder::parseAndBuildCalibrator(), NIXMLConnectionsHandler::parseDeprecatedLaneDefinition(), NIXMLConnectionsHandler::parseLaneBound(), MSRouteHandler::parseWalkPositions(), NBLoadedSUMOTLDef::patchIfCrossingsAdded(), MSLCM_LC2013::patchSpeed(), MSLCM_SL2015::patchSpeed(), NBLoadedTLDef::SignalGroup::patchTYellow(), MSVehicle::planMove(), MSVehicle::planMoveInternal(), MSLane::planMovements(), MSInternalJunction::postloadInit(), MSRightOfWayJunction::postloadInit(), NBEdge::prepareEdgePriorities(), AGStreet::print(), MSDevice_SSM::processEncounters(), MSVehicle::processLinkAproaches(), MSVehicle::processNextStop(), TraCIServerAPI_Vehicle::processSet(), NIXMLNodesHandler::processTrafficLightDefinitions(), NWWriter_SUMO::prohibitionConnection(), MSDelayBasedTrafficLightLogic::proposeProlongation(), MSPModel_Striping::PState::PState(), NBEdgeCont::recheckLanes(), NBEdge::recheckLanes(), NBEdgeCont::recheckPostProcessConnections(), NIImporter_OpenStreetMap::reconstructLayerElevation(), NBLoadedSUMOTLDef::reconstructLogic(), NBNodeCont::remapIDs(), NBEdgeCont::remapIDs(), NBLoadedTLDef::SignalGroup::remapIncoming(), NBLoadedTLDef::SignalGroup::remapOutgoing(), MSLink::removeApproaching(), NBNodeCont::removeIsolatedRoads(), MSVehicle::removePassedDriveItems(), MSCalibrator::removePending(), NBNode::removeSelfLoops(), NBEdgeCont::removeUnwishedEdges(), NBNodeCont::rename(), NBEdgeCont::rename(), GNENet::renameEdge(), GNENet::renameJunction(), RORouteDef::repairCurrentRoute(), NBConnection::replaceFrom(), MSVehicle::replaceParkingArea(), MSBaseVehicle::replaceRouteEdges(), NBConnection::replaceTo(), NIImporter_DlrNavteq::TrafficlightsHandler::report(), NIImporter_DlrNavteq::ConnectedLanesHandler::report(), MSBaseVehicle::reroute(), MSTriggeredRerouter::rerouteParkingArea(), MSLane::resetManeuverReservation(), MSLane::resetPartialOccupation(), NBEdge::restoreRestrictedLane(), GNEEdge::retrieveGNEConnection(), NIXMLTrafficLightsHandler::retrieveLaneIndex(), RODFNet::revalidateFlows(), NBPTLineCont::reviseStops(), MSPerson::MSPersonStage_Walking::routeOutput(), MSPerson::MSPersonStage_Driving::routeOutput(), RONet::saveAndRemoveRoutesUntil(), MSDevice::saveState(), MSDevice_Vehroutes::saveState(), MSDevice_Tripinfo::saveState(), MSBaseVehicle::saveState(), MSLane::saveState(), GUIVehicle::selectBlockingFoes(), MSE2Collector::selectLanes(), MSLink::setApproaching(), NBNodeCont::setAsTLControlled(), GNEEdge::setAttribute(), MSChargingStation::setChargeDelay(), MSChargingStation::setChargingPower(), NBEdge::setControllingTLInformation(), MSChargingStation::setEfficency(), GNEJunction::setLogicValid(), MSLane::setManeuverReservation(), MSDevice_Battery::setMaximumBatteryCapacity(), NBEdge::setNodeBorder(), NIXMLEdgesHandler::setNodes(), MSLane::setPartialOccupation(), MSDevice_Battery::setPowerMax(), MSLink::setRequestInformation(), MSTLLogicControl::TLSLogicVariants::setStateInstantiatingOnline(), MSDevice_Battery::setStoppingTreshold(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBOwnTLDef::setTLControllingInformation(), NBTrafficLightLogicCont::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBEdge::shiftPositionAtNode(), NBEdgeCont::splitAt(), IntermodalRouter< E, L, N, V >::splitEdge(), MSLaneChangerSublane::startChangeSublane(), MSStopOut::stopEnded(), MSLane::succLinkSec(), GUITrafficLightLogicWrapper::switchTLSLogic(), MELoop::teleportVehicle(), METriggeredCalibrator::tryEmit(), MSSOTLTrafficLightLogic::trySwitch(), MSDevice_SSM::update(), MSVehicle::updateBestLanes(), MSLCM_SL2015::updateCFRelated(), MSSOTLTrafficLightLogic::updateCTS(), GNETLSEditorFrame::updateDescription(), MSVehicle::updateDriveItems(), MSSwarmTrafficLightLogic::updatePheromoneLevels(), MSSwarmTrafficLightLogic::updateSensitivities(), MSAbstractLaneChangeModel::updateTargetLane(), MSDevice_BTreceiver::BTreceiverUpdate::updateVisibility(), MSPModel_Striping::PState::walk(), MSLCM_LC2013::wantsChange(), MSLCM_SL2015::wantsChange(), MSLCM_SL2015::wantsChangeSublane(), NBParking::write(), MSEmissionExport::write(), MSBatteryExport::write(), MSFCDExport::write(), MSInstantInductLoop::write(), MSLink::writeApproaching(), NBSign::writeAsPOI(), NWWriter_DlrNavteq::writeConnectedLanes(), NWWriter_SUMO::writeConnection(), NWWriter_SUMO::writeDistrict(), MSFullExport::writeEdge(), MSXMLRawOut::writeEdge(), NWWriter_SUMO::writeEdge(), MSMeanData::writeEdge(), NWWriter_XML::writeEdgesAndConnections(), RODFDetector::writeEmitterDefinition(), RODFDetectorCon::writeEmitterPOIs(), RODFDetectorCon::writeEmitters(), RODFDetectorCon::writeEndRerouterDetectors(), NWWriter_SUMO::writeInternalConnections(), NWWriter_OpenDrive::writeInternalEdge(), writeInterval(), NWWriter_SUMO::writeJunction(), MSQueueExport::writeLane(), MSFullExport::writeLane(), NWWriter_DlrNavteq::writeLinksUnsplitted(), NWWriter_OpenDrive::writeNetwork(), NWWriter_XML::writeNodes(), NWWriter_DlrNavteq::writeNodesUnsplitted(), NWWriter_OpenDrive::writeNormalEdge(), NWWriter_DlrNavteq::writeProhibitedManoeuvres(), NWWriter_SUMO::writeRoundabout(), RODFDetectorCon::writeSpeedTrigger(), NWWriter_DlrNavteq::writeTrafficSignals(), MSFCDExport::writeTransportable(), RODFDetectorCon::writeValidationDetectors(), MSFullExport::writeVehicles(), SUMOPolygon::writeXML(), PointOfInterest::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 58 of file Named.h.
Referenced by MSLCM_LC2013::_wantsChange(), MSLCM_SL2015::_wantsChangeSublane(), MSLaneChanger::changeOpposite(), MSLaneChanger::continueChange(), MSLane::detectCollisions(), MSVehicle::getBackPositionOnLane(), NBOwnTLDef::getBestPair(), MSVehicle::getCenterOnEdge(), NBEdge::Connection::getDescription(), MSLane::getFollowersOnConsecutive(), MSVehicle::getLatOffset(), GUIVehicle::getParameterWindow(), MSLaneChanger::getRealLeader(), NBEdge::init(), MSLane::isInsertionSuccess(), 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(), toString(), MSLeaderInfo::toString(), MSLeaderDistanceInfo::toString(), MSCriticalFollowerDistanceInfo::toString(), MSVehicle::updateBestLanes(), and MSAbstractLaneChangeModel::updateShadowLane().
|
inlineinherited |
Returns the lane the reminder works on.
Definition at line 89 of file MSMoveReminder.h.
References MSMoveReminder::myLane.
Referenced by MSDevice_Tripinfo::computeLengthAndDuration(), libsumo::InductionLoop::getLaneID(), libsumo::LaneArea::getLaneID(), GUIInstantInductLoop::MyWrapper::getParameterWindow(), GUIE2Collector::MyWrapper::getParameterWindow(), GUIInductLoop::MyWrapper::getParameterWindow(), TraCIServerAPI_InductionLoop::getPosition(), libsumo::InductionLoop::getTree(), GUIInstantInductLoop::MyWrapper::MyWrapper(), GUIInductLoop::MyWrapper::MyWrapper(), MSDevice_Vehroutes::notifyEnter(), MSMeanData_Amitran::MSLaneMeanDataValues::notifyEnter(), MSMeanData_Net::MSLaneMeanDataValues::notifyEnter(), MSDevice_Tripinfo::notifyEnter(), MSMeanData_Net::MSLaneMeanDataValues::notifyLeave(), MSDevice_Tripinfo::notifyLeave(), MSMeanData::MeanDataValues::notifyMove(), and MSMeanData::writeEdge().
|
virtual |
try to retrieve the given parameter from this device. Throw exception for unsupported key
Reimplemented from MSDevice.
Definition at line 460 of file MSDevice_Routing.cpp.
References deviceName(), MSEdge::dictionary(), getEffort(), MSDevice::myHolder, myPeriod, StringUtils::startsWith(), time2string(), and toString().
Referenced by skipRouting().
|
static |
return the router instance
Definition at line 449 of file MSDevice_Routing.cpp.
References MSEdge::getAllEdges(), getEffort(), myRouterWithProhibited, and prohibited_withPermissions< E, V >::prohibit().
Referenced by MSVehicle::Influencer::getRouterTT(), isEnabled(), and MSTriggeredRerouter::notifyEnter().
|
staticprivate |
initialize the edge weights if not done before
Definition at line 224 of file MSDevice_Routing.cpp.
References OptionsCont::getBool(), MSNet::getCurrentTimeStep(), OptionsCont::getFloat(), MSNet::getInstance(), OptionsCont::getInt(), OptionsCont::getOptions(), MSNet::getTravelTime(), myAdaptationSteps, myEdgeSpeeds, myLastAdaptation, myPastEdgeSpeeds, myRandomizeWeightsFactor, and SIMTIME.
Referenced by adaptEdgeEfforts(), reroute(), and skipRouting().
|
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 |
!! describe
!! describe
!! describe
Definition at line 101 of file MSDevice.cpp.
References OptionsCont::addDescription(), OptionsCont::addSynonyme(), and OptionsCont::doRegister().
Referenced by MSDevice_Battery::insertOptions(), MSDevice_Bluelight::insertOptions(), MSDevice_Example::insertOptions(), MSDevice_BTsender::insertOptions(), MSDevice_BTreceiver::insertOptions(), MSDevice_Emissions::insertOptions(), insertOptions(), MSDevice_SSM::insertOptions(), and MSDevice::setParameter().
|
static |
Inserts MSDevice_Routing-options.
Definition at line 79 of file MSDevice_Routing.cpp.
References OptionsCont::addDescription(), OptionsCont::addSynonyme(), OptionsCont::doRegister(), MSDevice::insertDefaultAssignmentOptions(), myAdaptationInterval, myAdaptationSteps, myEdgeSpeeds, myEdgeWeightSettingCommand, and myLastAdaptation.
Referenced by MSDevice::insertOptions().
|
inlinestatic |
returns whether any routing actions take place
Definition at line 112 of file MSDevice_Routing.h.
References getRouterTT(), myAdaptationInterval, myWithTaz, notifyEnter(), and ~MSDevice_Routing().
Referenced by MSInsertionControl::determineCandidates(), and MSInsertionControl::emitVehicles().
|
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, and MSDevice_Vehroutes.
Definition at line 157 of file MSDevice.cpp.
Referenced by MSDevice::generateOutput().
|
virtual |
Computes a new route on vehicle insertion.
A new route is computed by calling the vehicle's "reroute" method, supplying "getEffort" as the edge effort retrieval method.
If the reroute period is larger than 0, an event is generated and added to the list of simulation step begin events which executes "wrappedRerouteCommandExecute".
[in] | veh | The entering vehicle. |
[in] | reason | how the vehicle enters the lane |
Reimplemented from MSMoveReminder.
Definition at line 205 of file MSDevice_Routing.cpp.
References MSEventControl::addEvent(), WrappingCommand< T >::deschedule(), MSNet::getBeginOfTimestepEvents(), MSNet::getInstance(), myPeriod, myPreInsertionPeriod, myRerouteCommand, MSMoveReminder::NOTIFICATION_DEPARTED, and wrappedRerouteCommandExecute().
Referenced by MSStateHandler::closeVehicle(), MSBaseVehicle::createDevice(), isEnabled(), and setParameter().
|
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, MSDevice_Bluelight, MSDevice_Example, MSInstantInductLoop, MSDevice_Vehroutes, MSE3Collector::MSE3EntryReminder, MSMeanData_Net::MSLaneMeanDataValues, and MSDevice_Transportable.
Definition at line 180 of file MSMoveReminder.h.
References UNUSED_PARAMETER, and MSMoveReminder::updateDetector().
|
inlinevirtualinherited |
Checks whether the reminder still has to be notified about the vehicle moves.
Indicator if the reminders is still active for the passed vehicle/parameters. If false, the vehicle will erase this reminder from it's reminder-container.
[in] | veh | Vehicle that asks this reminder. |
[in] | oldPos | Position before move. |
[in] | newPos | Position after move with newSpeed. |
[in] | newSpeed | Moving speed. |
Reimplemented in MSDevice_SSM, MSE2Collector, MSE3Collector::MSE3LeaveReminder, MSTriggeredRerouter, MSInductLoop, MSDevice_BTreceiver, MSDevice_BTsender, MSMeanData::MeanDataValues, MSDevice_Tripinfo, MSDevice_Emissions, MSInstantInductLoop, MSE3Collector::MSE3EntryReminder, MSDevice_Bluelight, MSDevice_Example, MSDevice_Battery, and MSDevice_Transportable.
Definition at line 155 of file MSMoveReminder.h.
References UNUSED_PARAMETER.
|
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, MSMeanData_Net::MSLaneMeanDataValues, MSMeanData_Amitran::MSLaneMeanDataValues, MSMeanData_Harmonoise::MSLaneMeanDataValues, and MSMeanData_Emissions::MSLaneMeanDataValues.
Definition at line 212 of file MSMoveReminder.h.
References UNUSED_PARAMETER.
Referenced by MSMeanData::MeanDataValues::notifyMove(), and MSMoveReminder::updateDetector().
|
private |
Invalidated assignment operator.
Referenced by skipRouting().
Performs rerouting before insertion into the network.
A new route is computed by calling the reroute method. If the routing involves taz the internal route cache is asked beforehand.
[in] | currentTime | The current simulation time |
Definition at line 253 of file MSDevice_Routing.cpp.
References MSRoute::begin(), DELTA_T, MSRoute::getLastEdge(), SUMOVehicle::getRoute(), MSEdge::isTazConnector(), myCachedRoutes, MSDevice::myHolder, myPreInsertionPeriod, mySkipRouting, SUMOVehicle::replaceRoute(), and reroute().
Referenced by MSDevice_Routing(), and skipRouting().
|
protectedinherited |
Definition at line 93 of file MSMoveReminder.cpp.
References MSMoveReminder::myLastVehicleUpdateValues.
Referenced by MSMoveReminder::getDescription(), MSMeanData_Net::MSLaneMeanDataValues::notifyLeave(), and MSMoveReminder::updateDetector().
void MSDevice_Routing::reroute | ( | const SUMOTime | currentTime, |
const bool | onInit = false |
||
) |
initiate the rerouting, create router / thread pool on first use
Definition at line 353 of file MSDevice_Routing.cpp.
References MSEdge::getAllEdges(), SUMOVehicle::getChosenSpeedFactor(), getEffort(), MSNet::getInstance(), OptionsCont::getInt(), OptionsCont::getOptions(), OptionsCont::getString(), MSNet::getTravelTime(), SUMOVehicle::getVClass(), MSNet::hasPermissions(), initEdgeWeights(), OptionsCont::isSet(), myAdaptationInterval, MSDevice::myHolder, myLastAdaptation, myLastRouting, myRouter, myWithTaz, SUMOVehicle::reroute(), SUMOVehicle::setChosenSpeedFactor(), and string2time().
Referenced by deviceName(), preInsertionReroute(), and wrappedRerouteCommandExecute().
|
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, and MSDevice_Vehroutes.
Definition at line 151 of file MSDevice.cpp.
References Named::getID(), and WRITE_WARNING.
Referenced by MSDevice::generateOutput().
|
inlineinherited |
Definition at line 230 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 73 of file Named.h.
References Named::myID.
Referenced by Distribution_Parameterized::parse(), NBLoadedSUMOTLDef::reconstructLogic(), NBNodeCont::remapIDs(), NBEdgeCont::remapIDs(), NBNodeCont::rename(), NBEdgeCont::rename(), and IntermodalRouter< E, L, N, V >::splitEdge().
|
virtual |
try to set the given parameter for this device. Throw exception for unsupported key
Reimplemented from MSDevice.
Definition at line 476 of file MSDevice_Routing.cpp.
References TplConvert::_2double(), WrappingCommand< T >::deschedule(), deviceName(), MSEdge::dictionary(), MSEdge::getLength(), MSEdge::getNumericalID(), myEdgeSpeeds, MSDevice::myHolder, myPeriod, myRerouteCommand, MSMoveReminder::NOTIFICATION_DEPARTED, notifyEnter(), StringUtils::startsWith(), and TIME2STEPS.
Referenced by skipRouting().
|
inline |
Labels the current time step as "unroutable".
Sets mySkipRouting to the current time in order to skip rerouting. This is useful for pre insertion routing when we know in advance we cannot insert.
[in] | currentTime | The current simulation time |
Definition at line 183 of file MSDevice_Routing.h.
References adaptEdgeEfforts(), getAssumedSpeed(), getEffort(), getParameter(), initEdgeWeights(), MSDevice_Routing(), myRouter, mySkipRouting, operator=(), preInsertionReroute(), setParameter(), and wrappedRerouteCommandExecute().
Referenced by MSInsertionControl::checkCandidates().
|
inherited |
Definition at line 50 of file MSMoveReminder.cpp.
References MSMoveReminder::myLastVehicleUpdateValues, MSMoveReminder::notifyMoveInternal(), MSMoveReminder::removeFromVehicleUpdateValues(), and STEPS2TIME.
Referenced by MSMoveReminder::notifyLeave(), and MEVehicle::updateDetectorForWriting().
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.
[in] | currentTime | The current simulation time |
Definition at line 274 of file MSDevice_Routing.cpp.
References myPeriod, and reroute().
Referenced by notifyEnter(), and skipRouting().
|
staticprivate |
At which time interval the edge weights get updated.
Definition at line 342 of file MSDevice_Routing.h.
Referenced by adaptEdgeEfforts(), buildVehicleDevices(), insertOptions(), isEnabled(), and reroute().
|
staticprivate |
The number of steps for averaging edge speeds (ring-buffer)
Definition at line 348 of file MSDevice_Routing.h.
Referenced by adaptEdgeEfforts(), initEdgeWeights(), and insertOptions().
|
staticprivate |
The current index in the pastEdgeSpeed ring-buffer.
Definition at line 351 of file MSDevice_Routing.h.
Referenced by adaptEdgeEfforts().
|
staticprivate |
Information which weight prior edge efforts have.
Definition at line 339 of file MSDevice_Routing.h.
Referenced by adaptEdgeEfforts(), and buildVehicleDevices().
|
staticprivate |
The container of pre-calculated routes.
Definition at line 360 of file MSDevice_Routing.h.
Referenced by adaptEdgeEfforts(), cleanup(), and preInsertionReroute().
|
protectedinherited |
a description of this moveReminder
Definition at line 246 of file MSMoveReminder.h.
Referenced by MSMoveReminder::getDescription(), and MSMoveReminder::setDescription().
|
staticprivate |
The container of edge speeds.
Definition at line 336 of file MSDevice_Routing.h.
Referenced by adaptEdgeEfforts(), getEffort(), initEdgeWeights(), insertOptions(), and setParameter().
|
staticprivate |
The weights adaptation/overwriting command.
Definition at line 333 of file MSDevice_Routing.h.
Referenced by buildVehicleDevices(), insertOptions(), and MSDevice_Routing().
|
protectedinherited |
The vehicle that stores the device.
Definition at line 188 of file MSDevice.h.
Referenced by MSDevice_Vehroutes::addRoute(), MSDevice_Transportable::addTransportable(), MSDevice_Tripinfo::computeLengthAndDuration(), MSDevice_Tripinfo::generateOutput(), MSDevice_Tripinfo::generateOutputForUnfinished(), MSDevice::getHolder(), getParameter(), MSDevice_Vehroutes::notifyEnter(), MSDevice_Tripinfo::notifyLeave(), preInsertionReroute(), MSDevice_Transportable::removeTransportable(), reroute(), setParameter(), MSDevice_SSM::updateAndWriteOutput(), MSDevice_Tripinfo::updateStatistics(), MSDevice_Vehroutes::writeOutput(), MSDevice_Vehroutes::writeXMLRoute(), and MSDevice_Vehroutes::~MSDevice_Vehroutes().
|
protectedinherited |
The name of the object.
Definition at line 135 of file Named.h.
Referenced by MSE2Collector::addDetectorToLanes(), RODFDetector::buildDestinationDistribution(), NGEdge::buildNBEdge(), NGNode::buildNBNode(), MSSOTLTrafficLightLogic::checkPhases(), NBNode::computeNodeShape(), MSE2Collector::detectorUpdate(), METriggeredCalibrator::execute(), MSCalibrator::execute(), GNEPOI::getAttribute(), GNEPOILane::getAttribute(), GNEPoly::getAttribute(), MSLane::getCanonicalPredecessorLane(), MSLane::getCanonicalSuccessorLane(), Named::getID(), NBEdge::getLaneID(), NBEdge::getLaneIDInsecure(), ROEdge::getStoredEffort(), ROEdge::getTravelTime(), MSDelayBasedTrafficLightLogic::init(), MSActuatedTrafficLightLogic::init(), MSSOTLTrafficLightLogic::init(), MSCalibrator::init(), NBEdge::init(), MSLane::isInsertionSuccess(), MSCalibrator::myStartElement(), MSE2Collector::notifyEnter(), MSE2Collector::notifyLeave(), MSE2Collector::notifyMove(), MSMeanData::openInterval(), RORouteDef::preComputeCurrentRoute(), NBEdge::reinitNodes(), MSRoute::release(), GNEPOI::setAttribute(), GNEPOILane::setAttribute(), GNEPoly::setAttribute(), Named::setID(), MSSOTLTrafficLightLogic::setToATargetPhase(), NBEdge::splitGeometry(), Distribution_Parameterized::toStr(), MSChargingStation::writeChargingStationOutput(), RODFDetector::writeEmitterDefinition(), MSXMLRawOut::writeLane(), NBNode::writeLogic(), RODFDetector::writeSingleSpeedTrigger(), MEInductLoop::writeXMLOutput(), MSCalibrator::writeXMLOutput(), and MSE3Collector::writeXMLOutput().
|
protectedinherited |
Lane on which the reminder works.
Definition at line 244 of file MSMoveReminder.h.
Referenced by MSE2Collector::getEstimatedCurrentVehicleNumber(), MSE2Collector::getEstimateQueueLength(), MSMoveReminder::getLane(), MSMoveReminder::MSMoveReminder(), MSInductLoop::notifyEnter(), MSE2Collector::notifyEnter(), MSE2Collector::notifyLeave(), MSMeanData::MeanDataValues::notifyMove(), MSE2Collector::notifyMove(), and MSMeanData::MeanDataValueTracker::reset().
|
staticprivate |
Information when the last edge weight adaptation occured.
Definition at line 345 of file MSDevice_Routing.h.
Referenced by adaptEdgeEfforts(), initEdgeWeights(), insertOptions(), and reroute().
|
private |
The last time a routing took place.
Definition at line 324 of file MSDevice_Routing.h.
Referenced by reroute().
|
staticprivate |
The container of edge speeds.
Definition at line 354 of file MSDevice_Routing.h.
Referenced by adaptEdgeEfforts(), and initEdgeWeights().
|
private |
The period with which a vehicle shall be rerouted.
Definition at line 318 of file MSDevice_Routing.h.
Referenced by getParameter(), notifyEnter(), setParameter(), and wrappedRerouteCommandExecute().
|
private |
The period with which a vehicle shall be rerouted before insertion.
Definition at line 321 of file MSDevice_Routing.h.
Referenced by MSDevice_Routing(), notifyEnter(), and preInsertionReroute().
|
staticprivate |
Whether to disturb edge weights dynamically.
Definition at line 369 of file MSDevice_Routing.h.
Referenced by getEffort(), and initEdgeWeights().
|
private |
The (optional) command responsible for rerouting.
Definition at line 330 of file MSDevice_Routing.h.
Referenced by MSDevice_Routing(), notifyEnter(), setParameter(), and ~MSDevice_Routing().
|
staticprivate |
The router to use.
Definition at line 363 of file MSDevice_Routing.h.
Referenced by cleanup(), reroute(), and skipRouting().
|
staticprivate |
The router to use by rerouter elements.
Definition at line 366 of file MSDevice_Routing.h.
Referenced by cleanup(), and getRouterTT().
|
private |
The time for which routing may be skipped because we cannot be inserted.
Definition at line 327 of file MSDevice_Routing.h.
Referenced by preInsertionReroute(), and skipRouting().
|
staticprivate |
whether taz shall be used at initial rerouting
Definition at line 357 of file MSDevice_Routing.h.
Referenced by buildVehicleDevices(), cleanup(), isEnabled(), and reroute().