SUMO - Simulation of Urban MObility
MESegment Class Reference

A single mesoscopic segment (cell) More...

#include <MESegment.h>

Inheritance diagram for MESegment:
Inheritance graph
Collaboration diagram for MESegment:
Collaboration graph

Public Types

typedef std::vector< MEVehicle * > Queue
 
typedef std::vector< QueueQueues
 

Public Member Functions

void addReminders (MEVehicle *veh) const
 add this lanes MoveReminders to the given vehicle More...
 
void addTo (const StoringVisitor &cont) const
 Adds this object to the given container. More...
 
bool free () const
 return whether this segment is considered free as opposed to jammed More...
 
SUMOReal getBruttoOccupancy () const
 Returns the occupany of the segment (the sum of the vehicle lengths + minGaps) More...
 
size_t getCarNumber () const
 Returns the total number of cars on the segment. More...
 
const MSEdgegetEdge () const
 Returns the edge this segment belongs to. More...
 
SUMOTime getEntryBlockTime () const
 return the next time at which a vehicle my enter this segment More...
 
SUMOTime getEventTime () const
 Returns the (planned) time at which the next vehicle leaves this segment. More...
 
SUMOReal getEventTimeSeconds () const
 Like getEventTime but returns seconds (for visualization) More...
 
SUMOReal getFlow () const
 returns flow based on headway More...
 
const std::string & getID () const
 Returns the id. More...
 
unsigned int getIndex () const
 Returns the running index of the segment in the edge (0 is the most upstream). More...
 
SUMOReal getLength () const
 Returns the length of the segment in meters. More...
 
SUMOReal getLengthGeometryFactor () const
 return precomputed geometrical length / myLength More...
 
MSLinkgetLink (const MEVehicle *veh, bool tlsPenalty=false) const
 Returns the link the given car will use when passing the next junction. More...
 
SUMOReal getMeanSpeed (bool useCache) const
 Returns the average speed of vehicles on the segment in meters per second. If there is no vehicle on the segment it returns the maximum allowed speed. More...
 
SUMOReal getMeanSpeed () const
 wrapper to satisfy the FunctionBinding signature More...
 
SUMOTime getMinimumHeadwayTime () const
 return the minimum headway-time with which vehicles may enter or leave this segment More...
 
SUMOTime getNextInsertionTime (SUMOTime earliestEntry) const
 return a time after earliestEntry at which a vehicle may be inserted at full speed More...
 
MESegmentgetNextSegment () const
 Returns the following segment on the same edge (0 if it is the last). More...
 
const QueuegetQueue (size_t index) const
 Returns the cars in the queue with the given index for visualization. More...
 
SUMOReal getRelativeJamThreshold () const
 Returns the relative occupany of the segment (percentage of road used)) at which the segment is considered jammed. More...
 
SUMOReal getRelativeOccupancy () const
 Returns the relative occupany of the segment (percentage of road used)) More...
 
std::vector< const MEVehicle * > getVehicles () const
 returns all vehicles (for debugging) More...
 
bool hasSpaceFor (const MEVehicle *veh, SUMOTime entryTime, bool init=false) const
 Returns whether the given vehicle would still fit into the segment. More...
 
bool initialise (MEVehicle *veh, SUMOTime time)
 Inserts (emits) vehicle into the segment. More...
 
bool isOpen (const MEVehicle *veh) const
 Returns whether the vehicle may use the next link. More...
 
 MESegment (const std::string &id, const MSEdge &parent, MESegment *next, SUMOReal length, SUMOReal speed, unsigned int idx, SUMOTime tauff, SUMOTime taufj, SUMOTime taujf, SUMOTime taujj, SUMOReal jamThresh, bool multiQueue, bool junctionControl, SUMOReal lengthGeometryFactor)
 constructor More...
 
size_t numQueues () const
 return the number of queues More...
 
void receive (MEVehicle *veh, SUMOTime time, bool isDepart=false, bool afterTeleport=false)
 Adds the vehicle to the segment, adapting its parameters. More...
 
unsigned int remainingVehicleCapacity (const SUMOReal vehLength) const
 return the remaining physical space on this segment More...
 
MEVehicleremoveCar (MEVehicle *v, SUMOTime leaveTime, MESegment *next)
 Removes the given car from the edge's que. More...
 
void send (MEVehicle *veh, MESegment *next, SUMOTime time)
 Removes the vehicle from the segment, adapting its parameters. More...
 
void setEntryBlockTime (SUMOTime entryBlockTime)
 set the next time at which a vehicle my enter this segment More...
 
void setID (const std::string &newID)
 resets the id More...
 
void setSpeed (SUMOReal newSpeed, SUMOTime currentTime, SUMOReal jamThresh=DO_NOT_PATCH_JAM_THRESHOLD)
 reset mySpeed and patch the speed of all vehicles in it. Also set/recompute myJamThreshold More...
 
bool vaporizeAnyCar (SUMOTime currentTime)
 tries to remove any car from this segment More...
 
void writeVehicles (OutputDevice &of) const
 
Measure collection
void addDetector (MSMoveReminder *data)
 Adds a data collector for a detector to this segment. More...
 
void removeDetector (MSMoveReminder *data)
 Removes a data collector for a detector from this segment. More...
 
void prepareDetectorForWriting (MSMoveReminder &data)
 Updates data of a detector for all vehicle queues. More...
 
State saving/loading
void saveState (OutputDevice &out)
 Saves the state of this segment into the given stream. More...
 
void loadState (std::vector< std::string > &vehIDs, MSVehicleControl &vc, const SUMOTime blockTime, const unsigned int queIdx)
 Loads the state of this segment with the given parameters. More...
 

Static Public Member Functions

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 bool isInvalid (const MESegment *segment)
 whether the given segment is 0 or encodes vaporization More...
 

Static Public Attributes

static const SUMOReal DO_NOT_PATCH_JAM_THRESHOLD
 

Protected Member Functions

SUMOTime getTLSPenalty (const MEVehicle *veh) const
 Returns the penalty time for passing a tls-controlled link (if using gMesoTLSPenalty > 0) More...
 

Protected Attributes

std::string myID
 The name of the object. More...
 

Private Member Functions

SUMOTime getTimeHeadway (bool predecessorIsFree)
 
SUMOReal jamThresholdForSpeed (SUMOReal speed) const
 compute jam threshold for the given speed More...
 
bool limitedControlOverride (const MSLink *link) const
 whether the given link may be passed because the option meso-junction-control.limited is set More...
 
 MESegment (const MESegment &)
 Invalidated copy constructor. More...
 
 MESegment (const std::string &id)
 constructor for dummy segment More...
 
SUMOTime newArrival (const MEVehicle *const v, SUMOReal newSpeed, SUMOTime currentTime)
 compute the new arrival time when switching speed More...
 
MESegmentoperator= (const MESegment &)
 Invalidated assignment operator. More...
 
bool overtake ()
 
void recomputeJamThreshold (SUMOReal jamThresh)
 compute a value for myJamThreshold if jamThresh is negative, compute a value which allows free flow at mySpeed interpret jamThresh as the relative occupation at which jam starts More...
 
void setSpeedForQueue (SUMOReal newSpeed, SUMOTime currentTime, SUMOTime blockTime, const std::vector< MEVehicle * > &vehs)
 
void updateDetectorsOnLeave (MEVehicle *v, SUMOTime currentTime, MESegment *next)
 Updates data of all detectors for a leaving vehicle. More...
 

Private Attributes

std::vector< SUMOTimemyBlockTimes
 The block times. More...
 
const SUMOReal myCapacity
 The number of lanes * the length. More...
 
Queues myCarQues
 The car queues. Vehicles are inserted in the front and removed in the back. More...
 
std::vector< MSMoveReminder * > myDetectorData
 The data collection for all kinds of detectors. More...
 
const MSEdgemyEdge
 The microsim edge this segment belongs to. More...
 
SUMOTime myEntryBlockTime
 
std::map< const MSEdge *, std::vector< size_t > > myFollowerMap
 The follower edge to que index mapping for multi queue segments. More...
 
const SUMOReal myHeadwayCapacity
 The capacity of the segment in number of cars, used only in time headway calculation This parameter has only an effect if tau_jf != tau_jj, which is not(!) the case per default. More...
 
const unsigned int myIndex
 Running number of the segment in the edge. More...
 
SUMOReal myJamThreshold
 The space (in m) which needs to be occupied before the segment is considered jammed. More...
 
const bool myJunctionControl
 Whether junction control is enabled. More...
 
SUMOTime myLastMeanSpeedUpdate
 the time at which myMeanSpeed was last updated More...
 
const SUMOReal myLength
 The segment's length. More...
 
const SUMOReal myLengthGeometryFactor
 
SUMOReal myMeanSpeed
 the mean speed on this segment. Updated at event time or on demand More...
 
MESegmentmyNextSegment
 The next segment of this edge, 0 if this is the last segment of this edge. More...
 
SUMOReal myOccupancy
 The occupied space (in m) on the segment. More...
 
const SUMOTime myTau_ff
 The time headway parameters, see the Eissfeldt thesis. More...
 
const SUMOTime myTau_fj
 
const SUMOTime myTau_jf
 
const SUMOTime myTau_jj
 
const bool myTLSPenalty
 Whether tls penalty is enabled. More...
 

Static Private Attributes

static MSEdge myDummyParent
 
static MESegment myVaporizationTarget
 

Detailed Description

A single mesoscopic segment (cell)

Definition at line 57 of file MESegment.h.

Member Typedef Documentation

typedef std::vector<MEVehicle*> MESegment::Queue

Definition at line 87 of file MESegment.h.

typedef std::vector<Queue> MESegment::Queues

Definition at line 88 of file MESegment.h.

Constructor & Destructor Documentation

MESegment::MESegment ( const std::string &  id,
const MSEdge parent,
MESegment next,
SUMOReal  length,
SUMOReal  speed,
unsigned int  idx,
SUMOTime  tauff,
SUMOTime  taufj,
SUMOTime  taujf,
SUMOTime  taujj,
SUMOReal  jamThresh,
bool  multiQueue,
bool  junctionControl,
SUMOReal  lengthGeometryFactor 
)

constructor

Parameters
[in]idThe id of this segment (currently: "<EDGEID>:<SEGMENTNO>")
[in]parentThe edge this segment is located within
[in]nextThe following segment (belonging to the same edge)
[in]lengthThe segment's length
[in]speedThe speed allowed on this segment
[in]idxThe running index of this segment within the segment's edge
[in]tauffThe factor for free-free headway time
[in]taufjThe factor for free-jam headway time
[in]taujfThe factor for jam-free headway time
[in]taujjThe factor for jam-jam headway time
[in]jamThreshpercentage of occupied space before the segment is jammed
[in]multiQueuewhether to install multiple queues on this segment
[in]junctionControlwhether junction control is enabled on this segment
[in]thequotient of geometrical length / given length
Todo:
recheck the id; using a ':' as divider is not really nice

Definition at line 67 of file MESegment.cpp.

References MSEdge::allowedLanes(), MSEdge::getLanes(), MSEdge::getNumSuccessors(), MSEdge::getSuccessors(), myBlockTimes, myCarQues, myFollowerMap, and recomputeJamThreshold().

MESegment::MESegment ( const MESegment )
private

Invalidated copy constructor.

MESegment::MESegment ( const std::string &  id)
private

constructor for dummy segment

Definition at line 120 of file MESegment.cpp.

Member Function Documentation

void MESegment::addDetector ( MSMoveReminder data)

Adds a data collector for a detector to this segment.

Parameters
[in]dataThe data collector to add

Definition at line 159 of file MESegment.cpp.

References myCarQues, and myDetectorData.

Referenced by MSMeanData::init(), MEInductLoop::MEInductLoop(), METriggeredCalibrator::METriggeredCalibrator(), MSRouteProbe::MSRouteProbe(), and MSTriggeredRerouter::MSTriggeredRerouter().

void MESegment::addReminders ( MEVehicle veh) const

add this lanes MoveReminders to the given vehicle

Definition at line 437 of file MESegment.cpp.

References MSBaseVehicle::addReminder(), and myDetectorData.

Referenced by receive().

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

Adds this object to the given container.

Parameters

Definition at line 126 of file Named.h.

References Named::StoringVisitor::add().

bool MESegment::free ( ) const
inline

return whether this segment is considered free as opposed to jammed

Definition at line 347 of file MESegment.h.

References myJamThreshold, and myOccupancy.

Referenced by getMeanSpeed(), getTimeHeadway(), and send().

SUMOReal MESegment::getBruttoOccupancy ( ) const
inline

Returns the occupany of the segment (the sum of the vehicle lengths + minGaps)

Returns
the occupany of the segment in meters

Definition at line 174 of file MESegment.h.

References myOccupancy.

Referenced by METriggeredCalibrator::invalidJam().

size_t MESegment::getCarNumber ( ) const

Returns the total number of cars on the segment.

Returns
the total number of cars on the segment

Definition at line 253 of file MESegment.cpp.

References myCarQues, and SUMOReal.

Referenced by getFlow(), GUIEdge::getParameterWindow(), getTimeHeadway(), and MSXMLRawOut::writeEdge().

SUMOTime MESegment::getEntryBlockTime ( ) const
inline

return the next time at which a vehicle my enter this segment

Definition at line 361 of file MESegment.h.

References myEntryBlockTime.

Referenced by MELoop::checkCar().

SUMOTime MESegment::getEventTime ( ) const

Returns the (planned) time at which the next vehicle leaves this segment.

Returns
The time the vehicle thinks it leaves

Definition at line 580 of file MESegment.cpp.

References myCarQues, and SUMOTime_MAX.

Referenced by MELoop::checkCar(), getEdge(), and getEventTimeSeconds().

SUMOReal MESegment::getEventTimeSeconds ( ) const
inline

Like getEventTime but returns seconds (for visualization)

Definition at line 289 of file MESegment.h.

References getEventTime(), getFlow(), getVehicles(), loadState(), saveState(), STEPS2TIME, and SUMOReal.

Referenced by GUIEdge::getParameterWindow().

SUMOReal MESegment::getFlow ( ) const

returns flow based on headway

Note
: returns magic number 10000 when headway cannot be computed

Definition at line 637 of file MESegment.cpp.

References getCarNumber(), getMeanSpeed(), and myLength.

Referenced by getEventTimeSeconds(), and GUIEdge::getParameterWindow().

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

Returns the id.

Returns
The stored id

Definition at line 65 of file Named.h.

References Named::myID.

Referenced by NIImporter_SUMO::_loadNetwork(), MSVehicleTransfer::add(), TraCIServerAPI_Lane::StoringVisitor::add(), MSDetectorControl::add(), Named::StoringVisitor::add(), IntermodalRouter< E, L, N, V >::addAccess(), NLTriggerBuilder::addAccess(), RORouteDef::addAlternative(), MSLane::addApproachingLane(), MSNet::addBusStop(), MSNet::addChargingStation(), NBLoadedSUMOTLDef::addConnection(), NLHandler::addConnection(), MSNet::addContainerStop(), NIXMLConnectionsHandler::addCrossing(), RODFDetectorCon::addDetector(), RONet::addEdge(), ROJTREdge::addFollowerProbability(), MSTLLogicControl::TLSLogicVariants::addLogic(), RONet::addNode(), NIImporter_SUMO::addPhase(), GUIEdge::addRerouter(), NBEdge::addRestrictedLane(), RONet::addRouteDef(), NBDistrict::addSink(), NBDistrict::addSource(), NIXMLEdgesHandler::addSplit(), NBTrafficLightLogic::addStep(), MSRouteHandler::addStop(), ROVehicle::addStop(), MSVehicle::addStop(), NIXMLTrafficLightsHandler::addTlConnection(), NIVissimDisturbance::addToNode(), MSVehicle::addTraciBusOrContainerStop(), MSVehicle::addTraciStop(), AGActivityTripWriter::addTrip(), GUITrafficLightLogicWrapper::begin2TrackPhases(), MSContainer::MSContainerStage_Driving::beginEventOutput(), MSContainer::MSContainerStage_Waiting::beginEventOutput(), MSPerson::MSPersonStage_Driving::beginEventOutput(), MSPerson::MSPersonStage_Waiting::beginEventOutput(), NLEdgeControlBuilder::build(), NIVisumTL::build(), RODFNet::buildApproachList(), MS_E2_ZS_CollectorOverLanes::buildCollector(), MSSOTLE2Sensors::buildContinueSensior(), MSSOTLE2Sensors::buildCountSensorForLane(), MSSOTLE2Sensors::buildCountSensorForOutLane(), NBNode::buildCrossings(), NBNode::buildCrossingsAndWalkingAreas(), NIImporter_VISUM::buildDistrictNode(), NIVissimConnection::buildEdgeConnections(), RODFNet::buildEdgeFlowMap(), GNEConnector::buildIinternalLanes(), GNETLSEditor::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(), MELoop::changeSegment(), MSSimpleTrafficLightLogic::changeStepAndDuration(), NBEdge::checkGeometry(), MSVehicleTransfer::checkInsertions(), MSSwarmTrafficLightLogic::choosePolicy(), ODDistrictHandler::closeDistrict(), NLHandler::closeEdge(), RORouteHandler::closeRouteDistribution(), RORouteHandler::closeVehicle(), NBTrafficLightDefinition::collectAllLinks(), NBLoadedSUMOTLDef::collectEdges(), NBTrafficLightDefinition::collectEdges(), NBLoadedSUMOTLDef::collectEdgeVectors(), NBLoadedTLDef::collectLinks(), ROJTRRouter::compute(), NBTrafficLightDefinition::compute(), NBNode::computeInternalLaneShape(), NBEdge::computeLaneShapes(), NBNode::computeLogic(), NBOwnTLDef::computeLogicAndConts(), NBNode::computeNodeShape(), RODFNet::computeRoutesFor(), NBTrafficLightLogicCont::computeSingleLogic(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NGNet::connect(), MSAbstractLaneChangeModel::continueLaneChangeManeuver(), NLDetectorBuilder::convUncontE2PosLength(), MSSOTLWaveTrafficLightLogic::countVehicles(), MSSOTLE2Sensors::countVehicles(), GUINet::createTLWrapper(), MSDeterministicHiLevelTrafficLightLogic::decideNextPhase(), MSSOTLPolicyBasedTrafficLightLogic::decideNextPhase(), MSSwarmTrafficLightLogic::decideNextPhase(), MSDeterministicHiLevelTrafficLightLogic::decidePolicy(), MSSwarmTrafficLightLogic::decidePolicy(), NIVissimDistrictConnection::dict_BuildDistricts(), MSContainer::MSContainerStage_Driving::endEventOutput(), MSContainer::MSContainerStage_Waiting::endEventOutput(), MSPerson::MSPersonStage_Driving::endEventOutput(), MSPerson::MSPersonStage_Waiting::endEventOutput(), MSE3Collector::enter(), 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(), TraCIServerAPI_Vehicle::findCloserLane(), NBRampsComputer::fulfillsRampConstraints(), RODFDetectorCon::getAggFlowFor(), RODFDetectorCon::getAnyDetectorForEdge(), MSNet::getBusStopID(), MSNet::getChargingStationID(), NBEdge::getConnection(), MSNet::getContainerStopID(), NBEdge::getCrossingAngle(), GNEEdge::getDest(), RODFNet::getDetectorEdge(), MSMeanData::getEdgeID(), MSE2Collector::getEstimateQueueLength(), NBEdge::getFirstNonPedestrianLane(), MS_E2_ZS_CollectorOverLanes::getLanePredeccessorLanes(), MSTLLogicControl::TLSLogicVariants::getLogicInstantiatingOff(), MSDeterministicHiLevelTrafficLightLogic::getMeanSpeedForInputLanes(), MSDeterministicHiLevelTrafficLightLogic::getMeanSpeedForOutputLanes(), NIImporter_VISUM::getNamedEdgeContinuating(), MSPerson::getNextEdge(), MSPModel_Striping::getNextLane(), GUIInstantInductLoop::MyWrapper::getParameterWindow(), GUIMEInductLoop::MyWrapper::getParameterWindow(), GUI_E2_ZS_Collector::MyWrapper::getParameterWindow(), GUIVehicle::getParameterWindow(), GUIInductLoop::MyWrapper::getParameterWindow(), MSSOTLTrafficLightLogic::getPhaseIndexWithMaxCTS(), MSSwarmTrafficLightLogic::getPheromoneForInputLanes(), MSSwarmTrafficLightLogic::getPheromoneForOutputLanes(), GUITrafficLightLogicWrapper::getPopUpMenu(), NLTriggerBuilder::getPosition(), NLDetectorBuilder::getPositionChecking(), NBNode::getPossiblySplittedIncoming(), NBNode::getPossiblySplittedOutgoing(), NIImporter_VISUM::getReversedContinuating(), GNEEdge::getSource(), MSVehicleControl::getWaitingVehicle(), MSLink::getZipperSpeed(), NBNode::guessCrossings(), RODFDetectorCon::guessEmptyFlows(), NBEdgeCont::guessSidewalks(), NBNodeCont::guessTLs(), GUITLLogicPhasesTrackerWindow::GUITLLogicPhasesTrackerWindow(), MSLane::handleCollision(), NBEdgeCont::ignoreFilterMatch(), MSDeterministicHiLevelTrafficLightLogic::init(), MSRailSignal::init(), MSActuatedTrafficLightLogic::init(), MSTrafficLightLogic::init(), MSSOTLTrafficLightLogic::init(), MSSwarmTrafficLightLogic::init(), NIImporter_SUMO::initTrafficLightLogic(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NBDistrictCont::insert(), NBNodeCont::insert(), NBTrafficLightLogicCont::insert(), NBEdgeCont::insert(), MSEdge::insertVehicle(), IntermodalNetwork< E, L, N, V >::IntermodalNetwork(), GNEJunction::invalidateTLS(), NBNode::invalidateTLS(), MSTLLogicControl::isActive(), MSPedestrianPushButton::isActiveForEdge(), MSPedestrianPushButton::isActiveOnAnySideOfTheRoad(), RODFNet::isDestination(), RODFNet::isFalseSource(), RODFNet::isSource(), MSSOTLTrafficLightLogic::isThresholdPassed(), NBNodeCont::joinJunctions(), NBEdgeCont::joinSameNodeConnectingEdges(), MSE3Collector::leave(), MSDevice_BTreceiver::BTreceiverUpdate::leaveRange(), MSPedestrianPushButton::loadCrossingEdgeMap(), NIImporter_OpenDrive::loadNetwork(), MSPedestrianPushButton::loadPushButtons(), ODDistrictCont::makeDistricts(), MSSOTLE2Sensors::meanVehiclesSpeed(), METriggeredCalibrator::METriggeredCalibrator(), MSPModel_Striping::moveInDirection(), MSPModel_Striping::moveInDirectionOnLane(), NBRampsComputer::moveRampRight(), MSPModel_Striping::PState::moveToNextLane(), MSCalibrator::MSCalibrator(), MSChargingStation::MSChargingStation(), MSDevice_Battery::MSDevice_Battery(), NBLoadedTLDef::myCompute(), NIXMLEdgesHandler::myEndElement(), NIImporter_SUMO::myEndElement(), NIXMLConnectionsHandler::myStartElement(), MSLaneSpeedTrigger::myStartElement(), MSTriggeredRerouter::myStartElement(), NBConnection::NBConnection(), NBRequest::NBRequest(), MSDevice_BTreceiver::notifyEnter(), MSDevice_BTsender::notifyEnter(), MSDevice_Example::notifyEnter(), MSDevice_Tripinfo::notifyEnter(), MSTriggeredRerouter::notifyEnter(), MSE2Collector::notifyEnter(), MSDevice_Transportable::notifyLeave(), MSE3Collector::MSE3EntryReminder::notifyLeave(), MSDevice_Example::notifyLeave(), MSDevice_Tripinfo::notifyLeave(), MSDevice_BTreceiver::notifyLeave(), MSDevice_BTsender::notifyLeave(), MSDevice_Example::notifyMove(), MSDevice_BTreceiver::notifyMove(), MSDevice_BTsender::notifyMove(), MSMeanData::MeanDataValues::notifyMove(), MSE2Collector::notifyMove(), GUIViewTraffic::onGamingClick(), 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()(), NIImporter_VISUM::parse_EdgePolys(), NIImporter_VISUM::parse_Lanes(), NIImporter_VISUM::parse_LanesConnections(), NIImporter_VISUM::parse_Turns(), NIImporter_VISUM::parse_TurnsToSignalGroups(), NIXMLConnectionsHandler::parseDeprecatedLaneDefinition(), NIXMLConnectionsHandler::parseLaneBound(), MSRouteHandler::parseWalkPositions(), NBLoadedSUMOTLDef::patchIfCrossingsAdded(), MSLCM_JE2013::patchSpeed(), NBLoadedTLDef::SignalGroup::patchTYellow(), MSRightOfWayJunction::postloadInit(), AGStreet::print(), TraCIServerAPI_TLS::processGet(), TraCIServerAPI_InductionLoop::processGet(), TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_Person::processGet(), TraCIServerAPI_ArealDetector::processGet(), TraCIServerAPI_Lane::processGet(), TraCIServerAPI_Vehicle::processSet(), NIXMLNodesHandler::processTrafficLightDefinitions(), NWWriter_SUMO::prohibitionConnection(), MSPModel_Striping::PState::PState(), NBEdgeCont::recheckPostProcessConnections(), NBLoadedTLDef::SignalGroup::remapIncoming(), NBLoadedTLDef::SignalGroup::remapOutgoing(), NBLoadedSUMOTLDef::removeConnection(), NBNodeCont::removeIsolatedRoads(), MSCalibrator::removePending(), NBNode::removeSelfLoops(), NBEdgeCont::removeUnwishedEdges(), NBNodeCont::removeUnwishedNodes(), NBNodeCont::rename(), NBEdgeCont::rename(), GNENet::renameEdge(), GNENet::renameJunction(), RORouteDef::repairCurrentRoute(), NBConnection::replaceFrom(), MSBaseVehicle::replaceRouteEdges(), NBConnection::replaceTo(), NIImporter_DlrNavteq::TrafficlightsHandler::report(), NIXMLTrafficLightsHandler::retrieveLaneIndex(), RODFNet::revalidateFlows(), RONet::saveAndRemoveRoutesUntil(), MSBaseVehicle::saveState(), MSLane::saveState(), MSDevice_Battery::setActualBatteryCapacity(), MSDevice_Battery::setAirDragCoefficient(), NBNodeCont::setAsTLControlled(), MSChargingStation::setChrgPower(), MSDevice_Battery::setConstantPowerIntake(), NBEdge::setControllingTLInformation(), MSChargingStation::setEfficency(), MSDevice_Battery::setFrontSurfaceArea(), MSDevice_Battery::setInternalMomentOfInertia(), GNEJunction::setLogicValid(), MSDevice_Battery::setMass(), MSDevice_Battery::setMaximumBatteryCapacity(), NIXMLEdgesHandler::setNodes(), MSDevice_Battery::setPowerMax(), MSDevice_Battery::setPropulsionEfficiency(), MSDevice_Battery::setRadialDragCoefficient(), MSDevice_Battery::setRecuperationEfficiency(), MSLink::setRequestInformation(), MSDevice_Battery::setRollDragCoefficient(), MSTLLogicControl::TLSLogicVariants::setStateInstantiatingOnline(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBOwnTLDef::setTLControllingInformation(), NBTrafficLightLogicCont::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBEdge::shiftPositionAtNode(), NBEdgeCont::splitAt(), MSLane::succLinkSec(), GUITrafficLightLogicWrapper::switchTLSLogic(), MELoop::teleportVehicle(), METriggeredCalibrator::tryEmit(), MSSOTLTrafficLightLogic::trySwitch(), MSSOTLTrafficLightLogic::updateCTS(), GNETLSEditor::updateDescription(), MSSwarmTrafficLightLogic::updatePheromoneLevels(), MSSwarmTrafficLightLogic::updateSensitivities(), MSDevice_BTreceiver::BTreceiverUpdate::updateVisibility(), TraCIServerAPI_Vehicle::vtdMap(), MSPModel_Striping::PState::walk(), MSLCM_JE2013::wantsChange(), MSBatteryExport::write(), MSEmissionExport::write(), MSFCDExport::write(), MSInstantInductLoop::write(), NBSign::writeAsPOI(), 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(), writeInterval(), NWWriter_SUMO::writeJunction(), MSQueueExport::writeLane(), MSFullExport::writeLane(), NWWriter_DlrNavteq::writeLinksUnsplitted(), NWWriter_OpenDrive::writeNetwork(), NWWriter_XML::writeNodes(), NWWriter_DlrNavteq::writeNodesUnsplitted(), NWWriter_SUMO::writeRoundabout(), RODFDetectorCon::writeSpeedTrigger(), NWWriter_DlrNavteq::writeTrafficSignals(), MSFCDExport::writeTransportable(), MSInductLoop::writeTypedXMLOutput(), RODFDetectorCon::writeValidationDetectors(), MSFullExport::writeVehicles(), PointOfInterest::writeXML(), SUMO::Polygon::writeXML(), MSRouteProbe::writeXMLOutput(), and MSE2Collector::writeXMLOutput().

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 58 of file Named.h.

Referenced by operator<<(), and toString().

unsigned int MESegment::getIndex ( ) const
inline

Returns the running index of the segment in the edge (0 is the most upstream).

Returns
the running index of the segment in the edge

Definition at line 150 of file MESegment.h.

References myIndex.

Referenced by MELoop::changeSegment(), GUIEdge::getParameterWindow(), MEVehicle::getPositionOnLane(), MEVehicle::loadState(), MEVehicle::saveState(), MELoop::teleportVehicle(), MEVehicle::updateDetectorForWriting(), and MEVehicle::updateDetectors().

SUMOReal MESegment::getLength ( ) const
inline
SUMOReal MESegment::getLengthGeometryFactor ( ) const
inline
MSLink * MESegment::getLink ( const MEVehicle veh,
bool  tlsPenalty = false 
) const

Returns the link the given car will use when passing the next junction.

This returns non-zero values only for the last segment and only if junction control is enabled.

Parameters
[in]vehThe vehicle in question
[in]tlsPenaltyWhether the link should be returned for computing tlsPenalty
Returns
The link to use or 0 without junction control

Definition at line 353 of file MESegment.cpp.

References MSEdge::getLanes(), MSLane::getLinkCont(), MEVehicle::getQueIndex(), myEdge, myJunctionControl, and MSBaseVehicle::succEdge().

Referenced by MELoop::checkCar(), getMeanSpeed(), getTLSPenalty(), isOpen(), loadState(), receive(), MEVehicle::replaceRoute(), send(), and setSpeedForQueue().

SUMOReal MESegment::getMeanSpeed ( bool  useCache) const

Returns the average speed of vehicles on the segment in meters per second. If there is no vehicle on the segment it returns the maximum allowed speed.

Parameters
[in]useCachewhether to use a cached value if available
Note
this value is cached in myMeanSpeed. Since caching only takes place once every simstep there is a potential for side-influences (i.e. GUI calls to this method, ...) For that reason the simulation logic doesn't use the cache. This shouldn't matter much for speed since it is only used during initializsation of vehicles onto the segment.
Returns
the average speed on the segment

Definition at line 263 of file MESegment.cpp.

References free(), MSNet::getCurrentTimeStep(), MSNet::getInstance(), MSEdge::getSpeedLimit(), myCarQues, myEdge, myLastMeanSpeedUpdate, myMeanSpeed, myTau_ff, myTau_jf, and SUMOReal.

Referenced by METriggeredCalibrator::invalidJam().

SUMOReal MESegment::getMeanSpeed ( ) const
inline

wrapper to satisfy the FunctionBinding signature

Definition at line 207 of file MESegment.h.

References getLink(), isOpen(), receive(), removeCar(), send(), vaporizeAnyCar(), and writeVehicles().

Referenced by getFlow(), GUIEdge::getParameterWindow(), getRelativeJamThreshold(), and hasSpaceFor().

SUMOTime MESegment::getMinimumHeadwayTime ( ) const
inline

return the minimum headway-time with which vehicles may enter or leave this segment

Definition at line 371 of file MESegment.h.

References myTau_ff.

Referenced by METriggeredCalibrator::maximumInflow().

SUMOTime MESegment::getNextInsertionTime ( SUMOTime  earliestEntry) const

return a time after earliestEntry at which a vehicle may be inserted at full speed

Definition at line 338 of file MESegment.cpp.

References MSEdge::getSpeedLimit(), MAX2(), MAX3(), myBlockTimes, myCarQues, myEdge, myEntryBlockTime, myLength, and TIME2STEPS.

Referenced by METriggeredCalibrator::execute(), and isInvalid().

MESegment* MESegment::getNextSegment ( ) const
inline
const Queue& MESegment::getQueue ( size_t  index) const
inline

Returns the cars in the queue with the given index for visualization.

Returns
the Queue (XXX not thread-safe!)

Definition at line 141 of file MESegment.h.

References myCarQues.

SUMOReal MESegment::getRelativeJamThreshold ( ) const
inline

Returns the relative occupany of the segment (percentage of road used)) at which the segment is considered jammed.

Returns
the jam treshold of the segment in percent

Definition at line 190 of file MESegment.h.

References getMeanSpeed(), myCapacity, myJamThreshold, and SUMOReal.

Referenced by GUIEdge::getParameterWindow().

SUMOReal MESegment::getRelativeOccupancy ( ) const
inline

Returns the relative occupany of the segment (percentage of road used))

Returns
the occupany of the segment in percent

Definition at line 182 of file MESegment.h.

References myCapacity, and myOccupancy.

Referenced by GUIEdge::getParameterWindow().

SUMOTime MESegment::getTimeHeadway ( bool  predecessorIsFree)
private
SUMOTime MESegment::getTLSPenalty ( const MEVehicle veh) const
protected

Returns the penalty time for passing a tls-controlled link (if using gMesoTLSPenalty > 0)

Parameters
[in]vehThe vehicle in question
Returns
The time penalty

Definition at line 643 of file MESegment.cpp.

References getLink(), MSLink::getMesoTLSPenalty(), MSLink::isTLSControlled(), and myTLSPenalty.

Referenced by getLengthGeometryFactor(), and receive().

std::vector< const MEVehicle * > MESegment::getVehicles ( ) const

returns all vehicles (for debugging)

Definition at line 627 of file MESegment.cpp.

References myCarQues, and SUMOReal.

Referenced by getEventTimeSeconds().

bool MESegment::hasSpaceFor ( const MEVehicle veh,
SUMOTime  entryTime,
bool  init = false 
) const

Returns whether the given vehicle would still fit into the segment.

Parameters
[in]vehThe vehicle to check space for
[in]entryTimeThe time at which the vehicle wants to enter
[in]initwhether the check is done at insertion time
Returns
true if the vehicle may be added to this segment, false otherwise

Definition at line 215 of file MESegment.cpp.

References MSVehicleType::getLengthWithGap(), getMeanSpeed(), MSBaseVehicle::getVehicleType(), jamThresholdForSpeed(), myCapacity, myEntryBlockTime, myOccupancy, and SUMOReal.

Referenced by MELoop::changeSegment(), MELoop::checkCar(), initialise(), MSEdge::insertVehicle(), and MELoop::teleportVehicle().

bool MESegment::initialise ( MEVehicle veh,
SUMOTime  time 
)

Inserts (emits) vehicle into the segment.

Parameters
[in]vehThe vehicle to emit
[in]timeThe emission time
Returns
Whether the emission was successful

Definition at line 238 of file MESegment.cpp.

References MSGlobals::gCheckRoutes, MSBaseVehicle::getID(), hasSpaceFor(), MSBaseVehicle::hasValidRoute(), and receive().

Referenced by MSEdge::insertVehicle(), and METriggeredCalibrator::tryEmit().

static bool MESegment::isInvalid ( const MESegment segment)
inlinestatic

whether the given segment is 0 or encodes vaporization

Definition at line 338 of file MESegment.h.

References getNextInsertionTime(), and myVaporizationTarget.

Referenced by MELoop::changeSegment(), and send().

bool MESegment::isOpen ( const MEVehicle veh) const

Returns whether the vehicle may use the next link.

In case of disabled junction control it returns always true.

Parameters
[in]vehThe vehicle in question
Returns
Whether it may pass to the next segment

Definition at line 384 of file MESegment.cpp.

References MEVehicle::estimateLeaveSpeed(), MSVehicleType::getCarFollowModel(), MEVehicle::getEventTime(), MSBaseVehicle::getImpatience(), MSVehicleType::getLengthWithGap(), getLink(), MSCFModel::getMaxDecel(), MEVehicle::getSpeed(), MSBaseVehicle::getVehicleType(), MEVehicle::getWaitingTime(), MSLink::havePriority(), limitedControlOverride(), myTLSPenalty, and MSLink::opened().

Referenced by getMeanSpeed(), and MEVehicle::mayProceed().

SUMOReal MESegment::jamThresholdForSpeed ( SUMOReal  speed) const
private
bool MESegment::limitedControlOverride ( const MSLink link) const
private

whether the given link may be passed because the option meso-junction-control.limited is set

Definition at line 400 of file MESegment.cpp.

References MSLane::getEdge(), MSLink::getLane(), MELoop::getSegmentForEdge(), MSGlobals::gMesoLimitedJunctionControl, MSGlobals::gMesoNet, myJamThreshold, and myOccupancy.

Referenced by getLengthGeometryFactor(), and isOpen().

void MESegment::loadState ( std::vector< std::string > &  vehIDs,
MSVehicleControl vc,
const SUMOTime  blockTime,
const unsigned int  queIdx 
)

Loads the state of this segment with the given parameters.

This method is called for every internal que the segment has. Every vehicle is retrieved from the given MSVehicleControl and added to this segment. Then, the internal queues that store vehicles dependant to their next edge are filled the same way. Then, the departure of last vehicles onto the next edge are restored.

Parameters
[in]vehIDsThe vehicle ids for the current que
[in]vcThe vehicle control to retrieve references vehicles from
[in]blockTimeThe time the last vehicle left the que
[in]queIdxThe index of the current que
Todo:

What about throwing an IOError?

What about throwing an error if something else fails (a vehicle can not be referenced)?

Definition at line 607 of file MESegment.cpp.

References MELoop::addLeaderCar(), MSVehicleType::getLengthWithGap(), getLink(), MEVehicle::getSegment(), MSVehicleControl::getVehicle(), MSBaseVehicle::getVehicleType(), MSGlobals::gMesoNet, MIN2(), myBlockTimes, myCapacity, myCarQues, and myOccupancy.

Referenced by getEventTimeSeconds(), and MSStateHandler::myStartElement().

SUMOTime MESegment::newArrival ( const MEVehicle *const  v,
SUMOReal  newSpeed,
SUMOTime  currentTime 
)
private

compute the new arrival time when switching speed

Definition at line 560 of file MESegment.cpp.

References MEVehicle::getLastEntryTime(), MEVehicle::getSpeed(), MAX2(), MIN2(), myLength, STEPS2TIME, SUMOReal, and TIME2STEPS.

Referenced by getLengthGeometryFactor(), and setSpeedForQueue().

size_t MESegment::numQueues ( ) const
inline

return the number of queues

Definition at line 135 of file MESegment.h.

References myCarQues.

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

Invalidated assignment operator.

bool MESegment::overtake ( )
private
void MESegment::prepareDetectorForWriting ( MSMoveReminder data)

Updates data of a detector for all vehicle queues.

Parameters
[in]dataThe detector data to update

Definition at line 201 of file MESegment.cpp.

References MSNet::getCurrentTimeStep(), MSNet::getInstance(), MAX2(), myCarQues, and myTau_ff.

Referenced by METriggeredCalibrator::execute(), MSMeanData::init(), MSMeanData::resetOnly(), MSMeanData::writeEdge(), and MEInductLoop::writeXMLOutput().

void MESegment::recomputeJamThreshold ( SUMOReal  jamThresh)
private

compute a value for myJamThreshold if jamThresh is negative, compute a value which allows free flow at mySpeed interpret jamThresh as the relative occupation at which jam starts

Definition at line 132 of file MESegment.cpp.

References DO_NOT_PATCH_JAM_THRESHOLD, MSEdge::getSpeedLimit(), jamThresholdForSpeed(), myCapacity, myEdge, myJamThreshold, and SUMOReal.

Referenced by getLengthGeometryFactor(), MESegment(), and setSpeed().

unsigned int MESegment::remainingVehicleCapacity ( const SUMOReal  vehLength) const
inline

return the remaining physical space on this segment

Definition at line 352 of file MESegment.h.

References myCapacity, and myOccupancy.

Referenced by METriggeredCalibrator::remainingVehicleCapacity().

MEVehicle * MESegment::removeCar ( MEVehicle v,
SUMOTime  leaveTime,
MESegment next 
)

Removes the given car from the edge's que.

Parameters
[in]vThe vehicle to remove
[in]leaveTimeThe time at which the vehicle is leaving the que
[in]nextThe next segment for this vehicle
Returns
The next first vehicle to add to the net's que

Definition at line 299 of file MESegment.cpp.

References MSVehicleType::getLengthWithGap(), MEVehicle::getQueIndex(), MSBaseVehicle::getVehicleType(), MSEdge::lock(), MAX2(), myCarQues, myEdge, myOccupancy, SUMOReal, MSEdge::unlock(), and updateDetectorsOnLeave().

Referenced by getMeanSpeed(), and send().

void MESegment::removeDetector ( MSMoveReminder data)

Removes a data collector for a detector from this segment.

Parameters
[in]dataThe data collector to remove

Definition at line 170 of file MESegment.cpp.

References myCarQues, and myDetectorData.

Referenced by METriggeredCalibrator::~METriggeredCalibrator().

void MESegment::saveState ( OutputDevice out)

Saves the state of this segment into the given stream.

Some internal values which must be restored are saved as well as ids of the vehicles stored in internal queues and the last departures of connected edges.

Parameters

Definition at line 595 of file MESegment.cpp.

References OutputDevice::closeTag(), myBlockTimes, myCarQues, OutputDevice::openTag(), SUMO_ATTR_TIME, SUMO_ATTR_VALUE, SUMO_TAG_SEGMENT, SUMO_TAG_VIEWSETTINGS_VEHICLES, and OutputDevice::writeAttr().

Referenced by getEventTimeSeconds().

void MESegment::send ( MEVehicle veh,
MESegment next,
SUMOTime  time 
)

Removes the vehicle from the segment, adapting its parameters.

Parameters
[in]vehThe vehicle in question
[in]nextThe subsequent segment for delay calculation
[in]timethe leave time
Todo:
Isn't always time == veh->getEventTime?

Definition at line 413 of file MESegment.cpp.

References MELoop::addLeaderCar(), free(), MEVehicle::getEventTime(), getLink(), MEVehicle::getQueIndex(), getTimeHeadway(), MSGlobals::gMesoNet, isInvalid(), MAX2(), myBlockTimes, removeCar(), and MEVehicle::setEventTime().

Referenced by MELoop::changeSegment(), getMeanSpeed(), and MELoop::teleportVehicle().

void MESegment::setEntryBlockTime ( SUMOTime  entryBlockTime)
inline

set the next time at which a vehicle my enter this segment

Definition at line 366 of file MESegment.h.

References myEntryBlockTime.

Referenced by MELoop::teleportVehicle().

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

resets the id

Parameters
[in]newIDThe new id of this object

Definition at line 73 of file Named.h.

References Named::myID.

Referenced by NBNodeCont::rename(), and NBEdgeCont::rename().

void MESegment::setSpeed ( SUMOReal  newSpeed,
SUMOTime  currentTime,
SUMOReal  jamThresh = DO_NOT_PATCH_JAM_THRESHOLD 
)

reset mySpeed and patch the speed of all vehicles in it. Also set/recompute myJamThreshold

Parameters
[in]jamThreshfollows the semantic of option meso-jam-threshold

Definition at line 569 of file MESegment.cpp.

References myBlockTimes, myCarQues, recomputeJamThreshold(), and setSpeedForQueue().

Referenced by METriggeredCalibrator::execute(), getEdge(), and MSLaneSpeedTrigger::processCommand().

void MESegment::setSpeedForQueue ( SUMOReal  newSpeed,
SUMOTime  currentTime,
SUMOTime  blockTime,
const std::vector< MEVehicle * > &  vehs 
)
private
void MESegment::updateDetectorsOnLeave ( MEVehicle v,
SUMOTime  currentTime,
MESegment next 
)
private

Updates data of all detectors for a leaving vehicle.

Parameters
[in]vThe vehicle to update values for
[in]currentTimeThe leave time of the vehicle
[in]nextThe next segment on this vehicles route

Definition at line 185 of file MESegment.cpp.

References myNextSegment, myVaporizationTarget, MSMoveReminder::NOTIFICATION_ARRIVED, MSMoveReminder::NOTIFICATION_JUNCTION, MSMoveReminder::NOTIFICATION_SEGMENT, MSMoveReminder::NOTIFICATION_VAPORIZED, and MEVehicle::updateDetectors().

Referenced by getLengthGeometryFactor(), receive(), and removeCar().

bool MESegment::vaporizeAnyCar ( SUMOTime  currentTime)

tries to remove any car from this segment

Parameters
[in]currentTimethe current time
Returns
Whether vaporization was successful
Note
: cars removed via this method do NOT count as arrivals

Definition at line 524 of file MESegment.cpp.

References MELoop::changeSegment(), MSGlobals::gMesoNet, myCarQues, myVaporizationTarget, and MELoop::removeLeaderCar().

Referenced by METriggeredCalibrator::execute(), and getMeanSpeed().

void MESegment::writeVehicles ( OutputDevice of) const

Definition at line 289 of file MESegment.cpp.

References myCarQues, and MSXMLRawOut::writeVehicle().

Referenced by getMeanSpeed(), and MSXMLRawOut::writeEdge().

Field Documentation

const SUMOReal MESegment::DO_NOT_PATCH_JAM_THRESHOLD
static

Definition at line 375 of file MESegment.h.

Referenced by getEdge(), and recomputeJamThreshold().

std::vector<SUMOTime> MESegment::myBlockTimes
private

The block times.

Definition at line 470 of file MESegment.h.

Referenced by getNextInsertionTime(), loadState(), MESegment(), receive(), saveState(), send(), and setSpeed().

const SUMOReal MESegment::myCapacity
private
Queues MESegment::myCarQues
private
std::vector<MSMoveReminder*> MESegment::myDetectorData
private

The data collection for all kinds of detectors.

Definition at line 461 of file MESegment.h.

Referenced by addDetector(), addReminders(), and removeDetector().

MSEdge MESegment::myDummyParent
staticprivate

Definition at line 482 of file MESegment.h.

const MSEdge& MESegment::myEdge
private

The microsim edge this segment belongs to.

Definition at line 427 of file MESegment.h.

Referenced by getEdge(), getLink(), getMeanSpeed(), getNextInsertionTime(), receive(), recomputeJamThreshold(), and removeCar().

SUMOTime MESegment::myEntryBlockTime
private
std::map<const MSEdge*, std::vector<size_t> > MESegment::myFollowerMap
private

The follower edge to que index mapping for multi queue segments.

Definition at line 467 of file MESegment.h.

Referenced by MESegment(), and receive().

const SUMOReal MESegment::myHeadwayCapacity
private

The capacity of the segment in number of cars, used only in time headway calculation This parameter has only an effect if tau_jf != tau_jj, which is not(!) the case per default.

Definition at line 443 of file MESegment.h.

Referenced by getTimeHeadway().

const unsigned int MESegment::myIndex
private

Running number of the segment in the edge.

Definition at line 436 of file MESegment.h.

Referenced by getIndex(), and receive().

SUMOReal MESegment::myJamThreshold
private

The space (in m) which needs to be occupied before the segment is considered jammed.

Definition at line 458 of file MESegment.h.

Referenced by free(), getRelativeJamThreshold(), limitedControlOverride(), and recomputeJamThreshold().

const bool MESegment::myJunctionControl
private

Whether junction control is enabled.

Definition at line 452 of file MESegment.h.

Referenced by getLink().

SUMOTime MESegment::myLastMeanSpeedUpdate
mutableprivate

the time at which myMeanSpeed was last updated

Definition at line 489 of file MESegment.h.

Referenced by getMeanSpeed().

const SUMOReal MESegment::myLength
private

The segment's length.

Definition at line 433 of file MESegment.h.

Referenced by getFlow(), getLength(), getNextInsertionTime(), jamThresholdForSpeed(), newArrival(), overtake(), and receive().

const SUMOReal MESegment::myLengthGeometryFactor
private

Definition at line 478 of file MESegment.h.

Referenced by getLengthGeometryFactor().

SUMOReal MESegment::myMeanSpeed
mutableprivate

the mean speed on this segment. Updated at event time or on demand

Definition at line 486 of file MESegment.h.

Referenced by getMeanSpeed().

MESegment* MESegment::myNextSegment
private

The next segment of this edge, 0 if this is the last segment of this edge.

Definition at line 430 of file MESegment.h.

Referenced by getNextSegment(), and updateDetectorsOnLeave().

SUMOReal MESegment::myOccupancy
private

The occupied space (in m) on the segment.

Definition at line 449 of file MESegment.h.

Referenced by free(), getBruttoOccupancy(), getRelativeOccupancy(), hasSpaceFor(), limitedControlOverride(), loadState(), overtake(), receive(), remainingVehicleCapacity(), and removeCar().

const SUMOTime MESegment::myTau_ff
private

The time headway parameters, see the Eissfeldt thesis.

Definition at line 439 of file MESegment.h.

Referenced by getMeanSpeed(), getMinimumHeadwayTime(), getTimeHeadway(), jamThresholdForSpeed(), prepareDetectorForWriting(), receive(), and setSpeedForQueue().

const SUMOTime MESegment::myTau_fj
private

Definition at line 439 of file MESegment.h.

Referenced by getTimeHeadway().

const SUMOTime MESegment::myTau_jf
private

Definition at line 439 of file MESegment.h.

Referenced by getMeanSpeed(), and getTimeHeadway().

const SUMOTime MESegment::myTau_jj
private

Definition at line 439 of file MESegment.h.

Referenced by getTimeHeadway().

const bool MESegment::myTLSPenalty
private

Whether tls penalty is enabled.

Definition at line 455 of file MESegment.h.

Referenced by getTimeHeadway(), getTLSPenalty(), and isOpen().

MESegment MESegment::myVaporizationTarget
staticprivate

Definition at line 483 of file MESegment.h.

Referenced by isInvalid(), updateDetectorsOnLeave(), and vaporizeAnyCar().


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