![]() |
SUMO - Simulation of Urban MObility
|
A single mesoscopic segment (cell) More...
#include <MESegment.h>
Public Types | |
typedef std::vector< MEVehicle * > | Queue |
typedef std::vector< Queue > | Queues |
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... | |
double | getBruttoOccupancy () const |
Returns the occupany of the segment (the sum of the vehicle lengths + minGaps) More... | |
int | getCarNumber () const |
Returns the total number of cars on the segment. More... | |
const MSEdge & | getEdge () 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... | |
double | getEventTimeSeconds () const |
Like getEventTime but returns seconds (for visualization) More... | |
double | getFlow () const |
returns flow based on headway More... | |
const std::string & | getID () const |
Returns the id. More... | |
int | getIndex () const |
Returns the running index of the segment in the edge (0 is the most upstream). More... | |
double | getLastHeadwaySeconds () const |
get the last headway time in seconds More... | |
double | getLength () const |
Returns the length of the segment in meters. More... | |
MSLink * | getLink (const MEVehicle *veh, bool tlsPenalty=false) const |
Returns the link the given car will use when passing the next junction. More... | |
SUMOTime | getLinkPenalty (const MEVehicle *veh) const |
Returns the penalty time for passing a link (if using gMesoTLSPenalty > 0 or gMesoMinorPenalty > 0) More... | |
double | 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... | |
double | 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... | |
MESegment * | getNextSegment () const |
Returns the following segment on the same edge (0 if it is the last). More... | |
const Queue & | getQueue (int index) const |
Returns the cars in the queue with the given index for visualization. More... | |
double | getRelativeJamThreshold () const |
Returns the relative occupany of the segment (percentage of road used)) at which the segment is considered jammed. More... | |
double | getRelativeOccupancy () const |
Returns the relative occupany of the segment (percentage of road used)) More... | |
double | getTLSCapacity (const MEVehicle *veh) const |
Returns the average green time as fraction of cycle time. 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, double length, double speed, int idx, SUMOTime tauff, SUMOTime taufj, SUMOTime taujf, SUMOTime taujj, double jamThresh, bool multiQueue, bool junctionControl) | |
constructor More... | |
int | 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... | |
int | remainingVehicleCapacity (const double vehLength) const |
return the remaining physical space on this segment More... | |
MEVehicle * | removeCar (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 (double newSpeed, SUMOTime currentTime, double 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 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 double | DO_NOT_PATCH_JAM_THRESHOLD |
Protected Attributes | |
std::string | myID |
The name of the object. More... | |
Private Member Functions | |
double | getMaxPenaltySeconds () const |
return the maximum tls penalty for all links from this edge More... | |
SUMOTime | getTimeHeadway (const MESegment *pred, const MEVehicle *veh) |
bool | hasBlockedLeader () const |
whether a leader in any queue is blocked More... | |
double | jamThresholdForSpeed (double speed, double jamThresh) const |
compute jam threshold for the given speed and jam-threshold option 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, double newSpeed, SUMOTime currentTime) |
compute the new arrival time when switching speed More... | |
MESegment & | operator= (const MESegment &) |
Invalidated assignment operator. More... | |
bool | overtake () |
void | recomputeJamThreshold (double 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 (double newSpeed, SUMOTime currentTime, SUMOTime blockTime, const std::vector< MEVehicle *> &vehs) |
SUMOTime | tauWithVehLength (SUMOTime tau, double lengthWithGap) const |
convert net time gap (leader back to follower front) to gross time gap (leader front to follower front) More... | |
void | updateDetectorsOnLeave (MEVehicle *v, SUMOTime currentTime, MESegment *next) |
Updates data of all detectors for a leaving vehicle. More... | |
Static Private Member Functions | |
static bool | useMultiQueue (bool multiQueue, const MSEdge &parent) |
whether the segment requires use of multiple queues More... | |
Private Attributes | |
double | myA |
slope and axis offset for the jam-jam headway function More... | |
double | myB |
std::vector< SUMOTime > | myBlockTimes |
The block times. More... | |
const double | 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 MSEdge & | myEdge |
The microsim edge this segment belongs to. More... | |
SUMOTime | myEntryBlockTime |
std::map< const MSEdge *, std::vector< int > > | myFollowerMap |
The follower edge to que index mapping for multi queue segments. More... | |
const double | 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 int | myIndex |
Running number of the segment in the edge. More... | |
double | 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 | myLastHeadway |
the last headway More... | |
SUMOTime | myLastMeanSpeedUpdate |
the time at which myMeanSpeed was last updated More... | |
const double | myLength |
The segment's length. More... | |
double | myMeanSpeed |
the mean speed on this segment. Updated at event time or on demand More... | |
const bool | myMinorPenalty |
Whether minor penalty is enabled. More... | |
MESegment * | myNextSegment |
The next segment of this edge, 0 if this is the last segment of this edge. More... | |
double | 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 |
double | myTau_length |
Headway parameter for computing gross time headyway from net time headway, length and edge speed. More... | |
const bool | myTLSPenalty |
Whether tls penalty is enabled. More... | |
Static Private Attributes | |
static MSEdge | myDummyParent |
static MESegment | myVaporizationTarget |
A single mesoscopic segment (cell)
Definition at line 56 of file MESegment.h.
typedef std::vector<MEVehicle*> MESegment::Queue |
Definition at line 85 of file MESegment.h.
typedef std::vector<Queue> MESegment::Queues |
Definition at line 86 of file MESegment.h.
MESegment::MESegment | ( | const std::string & | id, |
const MSEdge & | parent, | ||
MESegment * | next, | ||
double | length, | ||
double | speed, | ||
int | idx, | ||
SUMOTime | tauff, | ||
SUMOTime | taufj, | ||
SUMOTime | taujf, | ||
SUMOTime | taujj, | ||
double | jamThresh, | ||
bool | multiQueue, | ||
bool | junctionControl | ||
) |
constructor
[in] | id | The id of this segment (currently: "<EDGEID>:<SEGMENTNO>") |
[in] | parent | The edge this segment is located within |
[in] | next | The following segment (belonging to the same edge) |
[in] | length | The segment's length |
[in] | speed | The speed allowed on this segment |
[in] | idx | The running index of this segment within the segment's edge |
[in] | tauff | The factor for free-free headway time |
[in] | taufj | The factor for free-jam headway time |
[in] | taujf | The factor for jam-free headway time |
[in] | taujj | The factor for jam-jam headway time |
[in] | jamThresh | percentage of occupied space before the segment is jammed |
[in] | multiQueue | whether to install multiple queues on this segment |
[in] | junctionControl | whether junction control is enabled on this segment |
[in] | the | quotient of geometrical length / given length |
Definition at line 66 of file MESegment.cpp.
References MSEdge::allowedLanes(), MSEdge::getLanes(), MSEdge::getNumSuccessors(), MSEdge::getSuccessors(), myBlockTimes, myCarQues, myFollowerMap, recomputeJamThreshold(), and useMultiQueue().
|
private |
Invalidated copy constructor.
|
private |
constructor for dummy segment
Definition at line 124 of file MESegment.cpp.
void MESegment::addDetector | ( | MSMoveReminder * | data | ) |
Adds a data collector for a detector to this segment.
[in] | data | The data collector to add |
Definition at line 204 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 479 of file MESegment.cpp.
References MSBaseVehicle::addReminder(), and myDetectorData.
Referenced by receive().
|
inlineinherited |
Adds this object to the given container.
Definition at line 128 of file Named.h.
References Named::StoringVisitor::add().
|
inline |
return whether this segment is considered free as opposed to jammed
Definition at line 350 of file MESegment.h.
References myJamThreshold, and myOccupancy.
Referenced by getMeanSpeed(), getTimeHeadway(), and hasSpaceFor().
|
inline |
Returns the occupany of the segment (the sum of the vehicle lengths + minGaps)
Definition at line 172 of file MESegment.h.
References myOccupancy.
Referenced by METriggeredCalibrator::invalidJam().
int MESegment::getCarNumber | ( | ) | const |
Returns the total number of cars on the segment.
Definition at line 302 of file MESegment.cpp.
References myCarQues.
Referenced by getFlow(), GUIEdge::getParameterWindow(), getTimeHeadway(), and MSXMLRawOut::writeEdge().
|
inline |
Returns the edge this segment belongs to.
Definition at line 270 of file MESegment.h.
References DO_NOT_PATCH_JAM_THRESHOLD, getEventTime(), myEdge, and setSpeed().
Referenced by MELoop::changeSegment(), METriggeredCalibrator::execute(), GUIMEVehicle::getColorValue(), GUIEdge::getParameterWindow(), METriggeredCalibrator::invalidJam(), MSStateHandler::myStartElement(), GUIMEInductLoop::MyWrapper::MyWrapper(), MEVehicle::saveState(), MEVehicle::setEventTime(), MELoop::teleportVehicle(), and MEInductLoop::writeXMLOutput().
|
inline |
return the next time at which a vehicle my enter this segment
Definition at line 364 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.
Definition at line 624 of file MESegment.cpp.
References myCarQues, and SUMOTime_MAX.
Referenced by MELoop::checkCar(), getEdge(), and getEventTimeSeconds().
|
inline |
Like getEventTime but returns seconds (for visualization)
Definition at line 287 of file MESegment.h.
References getEventTime(), and STEPS2TIME.
Referenced by GUIEdge::getParameterWindow().
double MESegment::getFlow | ( | ) | const |
returns flow based on headway
Definition at line 692 of file MESegment.cpp.
References getCarNumber(), getMeanSpeed(), and myLength.
Referenced by getLastHeadwaySeconds(), and GUIEdge::getParameterWindow().
|
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_Example::notifyLeave(), MSDevice_Bluelight::notifyLeave(), MSDevice_BTreceiver::notifyLeave(), MSDevice_BTsender::notifyLeave(), MSDevice_Tripinfo::notifyLeave(), MSE3Collector::MSE3LeaveReminder::notifyLeave(), MSE2Collector::notifyLeave(), MSDevice_SSM::notifyLeave(), MSDevice_Example::notifyMove(), MSDevice_BTreceiver::notifyMove(), MSDevice_BTsender::notifyMove(), MSMeanData::MeanDataValues::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_Vehroutes::saveState(), MSDevice::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(), MSBatteryExport::write(), MSEmissionExport::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().
|
inline |
Returns the running index of the segment in the edge (0 is the most upstream).
Definition at line 148 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().
|
inline |
get the last headway time in seconds
Definition at line 292 of file MESegment.h.
References getFlow(), getVehicles(), loadState(), myLastHeadway, saveState(), and STEPS2TIME.
Referenced by GUIEdge::getParameterWindow().
|
inline |
Returns the length of the segment in meters.
Definition at line 164 of file MESegment.h.
References myLength.
Referenced by MEVehicle::getAverageSpeed(), MEVehicle::getConservativeSpeed(), GUIEdge::getParameterWindow(), MEVehicle::getPositionOnLane(), MELoop::getSegmentForEdge(), MELoop::setApproaching(), MEVehicle::updateDetectorForWriting(), and MEVehicle::updateDetectors().
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.
[in] | veh | The vehicle in question |
[in] | tlsPenalty | Whether the link should be returned for computing tlsPenalty |
Definition at line 394 of file MESegment.cpp.
References MSEdge::getLanes(), MSLane::getLinkCont(), MEVehicle::getQueIndex(), myEdge, myJunctionControl, and MSBaseVehicle::succEdge().
Referenced by MELoop::checkCar(), getLinkPenalty(), getMeanSpeed(), getTLSCapacity(), isOpen(), loadState(), receive(), MEVehicle::replaceRoute(), send(), and setSpeedForQueue().
Returns the penalty time for passing a link (if using gMesoTLSPenalty > 0 or gMesoMinorPenalty > 0)
[in] | veh | The vehicle in question |
Definition at line 698 of file MESegment.cpp.
References getLink(), MSLink::getMesoTLSPenalty(), MSGlobals::gMesoLimitedJunctionControl, MSGlobals::gMesoMinorPenalty, MSLink::havePriority(), MSLink::isTLSControlled(), limitedControlOverride(), myMinorPenalty, and myTLSPenalty.
Referenced by MEVehicle::getCurrentLinkPenaltySeconds(), and receive().
|
private |
return the maximum tls penalty for all links from this edge
Definition at line 733 of file MESegment.cpp.
References MSEdge::getLanes(), MSLane::getLinkCont(), MSLink::getMesoTLSPenalty(), MSGlobals::gMesoMinorPenalty, MSLink::havePriority(), MAX2(), myEdge, and STEPS2TIME.
Referenced by recomputeJamThreshold().
double 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.
[in] | useCache | whether to use a cached value if available |
Definition at line 312 of file MESegment.cpp.
References free(), MSNet::getCurrentTimeStep(), MSNet::getInstance(), MSEdge::getSpeedLimit(), myCarQues, myEdge, myLastMeanSpeedUpdate, myMeanSpeed, myTau_ff, myTau_jf, and tauWithVehLength().
Referenced by METriggeredCalibrator::invalidJam().
|
inline |
wrapper to satisfy the FunctionBinding signature
Definition at line 205 of file MESegment.h.
References getLink(), isOpen(), receive(), removeCar(), send(), vaporizeAnyCar(), and writeVehicles().
Referenced by getFlow(), GUIEdge::getParameterWindow(), getRelativeJamThreshold(), and hasSpaceFor().
|
inline |
return the minimum headway-time with which vehicles may enter or leave this segment
Definition at line 374 of file MESegment.h.
References myTau_ff.
Referenced by METriggeredCalibrator::maximumInflow().
return a time after earliestEntry at which a vehicle may be inserted at full speed
Definition at line 379 of file MESegment.cpp.
References MSEdge::getSpeedLimit(), MAX2(), MAX3(), myBlockTimes, myCarQues, myEdge, myEntryBlockTime, myLength, and TIME2STEPS.
Referenced by METriggeredCalibrator::execute(), and isInvalid().
|
inline |
Returns the following segment on the same edge (0 if it is the last).
Definition at line 156 of file MESegment.h.
References myNextSegment.
Referenced by METriggeredCalibrator::execute(), MELoop::getSegmentForEdge(), MSMeanData::init(), MSEdge::insertVehicle(), MEVehicle::loadState(), MSRouteProbe::MSRouteProbe(), MSStateHandler::myStartElement(), MELoop::nextSegment(), MSLaneSpeedTrigger::processCommand(), MSMeanData::resetOnly(), MELoop::teleportVehicle(), MSXMLRawOut::writeEdge(), MSMeanData::writeEdge(), and MELoop::~MELoop().
|
inline |
Returns the cars in the queue with the given index for visualization.
Definition at line 139 of file MESegment.h.
References myCarQues.
|
inline |
Returns the relative occupany of the segment (percentage of road used)) at which the segment is considered jammed.
Definition at line 188 of file MESegment.h.
References getMeanSpeed(), myCapacity, and myJamThreshold.
Referenced by GUIEdge::getParameterWindow().
|
inline |
Returns the relative occupany of the segment (percentage of road used))
Definition at line 180 of file MESegment.h.
References myCapacity, and myOccupancy.
Referenced by GUIEdge::getParameterWindow().
Definition at line 370 of file MESegment.cpp.
References free(), getCarNumber(), MSVehicleType::getLengthWithGap(), getTLSCapacity(), MSBaseVehicle::getVehicleType(), myA, myB, myTau_ff, myTau_fj, myTau_jf, tauWithVehLength(), and TIME2STEPS.
Referenced by send().
double MESegment::getTLSCapacity | ( | const MEVehicle * | veh | ) | const |
Returns the average green time as fraction of cycle time.
[in] | veh | The vehicle in question for determining the link |
Definition at line 719 of file MESegment.cpp.
References MSLink::getGreenFraction(), getLink(), MSLink::isTLSControlled(), and myTLSPenalty.
Referenced by getTimeHeadway().
std::vector< const MEVehicle * > MESegment::getVehicles | ( | ) | const |
returns all vehicles (for debugging)
Definition at line 671 of file MESegment.cpp.
References myCarQues.
Referenced by getLastHeadwaySeconds().
|
private |
whether a leader in any queue is blocked
Definition at line 681 of file MESegment.cpp.
References myCarQues.
Referenced by hasSpaceFor().
Returns whether the given vehicle would still fit into the segment.
[in] | veh | The vehicle to check space for |
[in] | entryTime | The time at which the vehicle wants to enter |
[in] | init | whether the check is done at insertion time |
Definition at line 260 of file MESegment.cpp.
References free(), MSVehicleType::getLengthWithGap(), getMeanSpeed(), MSBaseVehicle::getVehicleType(), hasBlockedLeader(), jamThresholdForSpeed(), myCapacity, myEntryBlockTime, myJamThreshold, and myOccupancy.
Referenced by MELoop::changeSegment(), MELoop::checkCar(), initialise(), MSEdge::insertVehicle(), and MELoop::teleportVehicle().
Inserts (emits) vehicle into the segment.
[in] | veh | The vehicle to emit |
[in] | time | The emission time |
Definition at line 287 of file MESegment.cpp.
References MSGlobals::gCheckRoutes, MSBaseVehicle::getID(), hasSpaceFor(), MSBaseVehicle::hasValidRoute(), and receive().
Referenced by MSEdge::insertVehicle(), and METriggeredCalibrator::tryEmit().
|
inlinestatic |
whether the given segment is 0 or encodes vaporization
Definition at line 341 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.
[in] | veh | The vehicle in question |
Definition at line 425 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().
|
private |
compute jam threshold for the given speed and jam-threshold option
Definition at line 191 of file MESegment.cpp.
References DEFAULT_VEH_LENGHT_WITH_GAP, myLength, myTau_ff, STEPS2TIME, and tauWithVehLength().
Referenced by hasSpaceFor(), and recomputeJamThreshold().
|
private |
whether the given link may be passed because the option meso-junction-control.limited is set
Definition at line 441 of file MESegment.cpp.
References MSLane::getEdge(), MSLink::getLane(), MELoop::getSegmentForEdge(), MSGlobals::gMesoLimitedJunctionControl, MSGlobals::gMesoNet, myJamThreshold, and myOccupancy.
Referenced by getLinkPenalty(), and isOpen().
void MESegment::loadState | ( | std::vector< std::string > & | vehIDs, |
MSVehicleControl & | vc, | ||
const SUMOTime | blockTime, | ||
const 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.
[in] | vehIDs | The vehicle ids for the current que |
[in] | vc | The vehicle control to retrieve references vehicles from |
[in] | blockTime | The time the last vehicle left the que |
[in] | queIdx | The index of the current que |
What about throwing an IOError?
What about throwing an error if something else fails (a vehicle can not be referenced)?
Definition at line 651 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 getLastHeadwaySeconds(), and MSStateHandler::myStartElement().
|
private |
compute the new arrival time when switching speed
Definition at line 603 of file MESegment.cpp.
References MEVehicle::getLastEntryTime(), MEVehicle::getSpeed(), MAX2(), MIN2(), myLength, STEPS2TIME, and TIME2STEPS.
Referenced by setSpeedForQueue().
|
inline |
return the number of queues
Definition at line 133 of file MESegment.h.
References myCarQues.
Referenced by GUIEdge::getParameterWindow().
|
private |
Definition at line 473 of file MESegment.cpp.
References MSGlobals::gMesoOvertaking, myCapacity, myLength, myOccupancy, and RandHelper::rand().
Referenced by receive().
void MESegment::prepareDetectorForWriting | ( | MSMoveReminder & | data | ) |
Updates data of a detector for all vehicle queues.
[in] | data | The detector data to update |
Definition at line 246 of file MESegment.cpp.
References MSNet::getCurrentTimeStep(), MSNet::getInstance(), MAX2(), myCarQues, myTau_ff, and tauWithVehLength().
Referenced by METriggeredCalibrator::execute(), MSMeanData::init(), MSMeanData::resetOnly(), MSMeanData::writeEdge(), and MEInductLoop::writeXMLOutput().
void MESegment::receive | ( | MEVehicle * | veh, |
SUMOTime | time, | ||
bool | isDepart = false , |
||
bool | afterTeleport = false |
||
) |
Adds the vehicle to the segment, adapting its parameters.
[in] | veh | The vehicle in question |
[in] | time | the leave time |
[in] | isDepart | whether the vehicle just departed |
Definition at line 486 of file MESegment.cpp.
References MSBaseVehicle::activateReminders(), MELoop::addLeaderCar(), addReminders(), MSBaseVehicle::getEdge(), MEVehicle::getEventTime(), MSNet::getInstance(), MSVehicleType::getLengthWithGap(), getLink(), getLinkPenalty(), MEVehicle::getSpeed(), MEVehicle::getStoptime(), MSNet::getVehicleControl(), MSEdge::getVehicleMaxSpeed(), MSBaseVehicle::getVehicleType(), MSGlobals::gMesoNet, MEVehicle::hasArrived(), MSEdge::lock(), MAX2(), MESO_MIN_SPEED, MIN2(), MEVehicle::moveRoutePointer(), myBlockTimes, myCapacity, myCarQues, myEdge, myEntryBlockTime, myFollowerMap, myIndex, myLength, myOccupancy, myTau_ff, MSMoveReminder::NOTIFICATION_DEPARTED, MSMoveReminder::NOTIFICATION_JUNCTION, MSMoveReminder::NOTIFICATION_SEGMENT, MSBaseVehicle::onDepart(), overtake(), MELoop::removeLeaderCar(), MSVehicleControl::scheduleVehicleRemoval(), MEVehicle::setBlockTime(), MEVehicle::setEventTime(), MEVehicle::setLastEntryTime(), MEVehicle::setSegment(), MSBaseVehicle::succEdge(), SUMOTime_MAX, tauWithVehLength(), TIME2STEPS, MSEdge::unlock(), and updateDetectorsOnLeave().
Referenced by MELoop::changeSegment(), getMeanSpeed(), and initialise().
|
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 141 of file MESegment.cpp.
References DEFAULT_VEH_LENGHT_WITH_GAP, DO_NOT_PATCH_JAM_THRESHOLD, getMaxPenaltySeconds(), MSEdge::getSpeedLimit(), jamThresholdForSpeed(), MAX2(), myA, myB, myCapacity, myEdge, myHeadwayCapacity, myJamThreshold, myLength, myMinorPenalty, myTau_jf, myTau_jj, myTLSPenalty, NUMERICAL_EPS, STEPS2TIME, and tauWithVehLength().
Referenced by MESegment(), and setSpeed().
|
inline |
return the remaining physical space on this segment
Definition at line 355 of file MESegment.h.
References myCapacity, and myOccupancy.
Referenced by METriggeredCalibrator::remainingVehicleCapacity().
Removes the given car from the edge's que.
[in] | v | The vehicle to remove |
[in] | leaveTime | The time at which the vehicle is leaving the que |
[in] | next | The next segment for this vehicle |
Definition at line 348 of file MESegment.cpp.
References MSVehicleType::getLengthWithGap(), MEVehicle::getQueIndex(), MSBaseVehicle::getVehicleType(), MSEdge::lock(), MAX2(), myCarQues, myEdge, myOccupancy, MSEdge::unlock(), and updateDetectorsOnLeave().
Referenced by getMeanSpeed(), and send().
void MESegment::removeDetector | ( | MSMoveReminder * | data | ) |
Removes a data collector for a detector from this segment.
[in] | data | The data collector to remove |
Definition at line 215 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.
Definition at line 639 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 getLastHeadwaySeconds().
Removes the vehicle from the segment, adapting its parameters.
[in] | veh | The vehicle in question |
[in] | next | The subsequent segment for delay calculation |
[in] | time | the leave time |
Definition at line 454 of file MESegment.cpp.
References MELoop::addLeaderCar(), MEVehicle::getEventTime(), getLink(), MEVehicle::getQueIndex(), getTimeHeadway(), MSGlobals::gMesoNet, isInvalid(), MAX2(), myBlockTimes, myLastHeadway, removeCar(), and MEVehicle::setEventTime().
Referenced by MELoop::changeSegment(), getMeanSpeed(), and MELoop::teleportVehicle().
|
inline |
set the next time at which a vehicle my enter this segment
Definition at line 369 of file MESegment.h.
References myEntryBlockTime.
Referenced by MELoop::teleportVehicle().
|
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().
void MESegment::setSpeed | ( | double | newSpeed, |
SUMOTime | currentTime, | ||
double | jamThresh = DO_NOT_PATCH_JAM_THRESHOLD |
||
) |
reset mySpeed and patch the speed of all vehicles in it. Also set/recompute myJamThreshold
[in] | jamThresh | follows the semantic of option meso-jam-threshold |
Definition at line 612 of file MESegment.cpp.
References myBlockTimes, myCarQues, recomputeJamThreshold(), and setSpeedForQueue().
Referenced by METriggeredCalibrator::execute(), getEdge(), and MSLaneSpeedTrigger::processCommand().
|
private |
Definition at line 584 of file MESegment.cpp.
References MELoop::addLeaderCar(), MEVehicle::getEventTime(), getLink(), MSGlobals::gMesoNet, MAX2(), myTau_ff, newArrival(), MELoop::removeLeaderCar(), MEVehicle::setEventTime(), and MEVehicle::updateDetectors().
Referenced by setSpeed().
convert net time gap (leader back to follower front) to gross time gap (leader front to follower front)
Definition at line 437 of file MESegment.h.
References myTau_length.
Referenced by getMeanSpeed(), getTimeHeadway(), jamThresholdForSpeed(), prepareDetectorForWriting(), receive(), and recomputeJamThreshold().
|
private |
Updates data of all detectors for a leaving vehicle.
[in] | v | The vehicle to update values for |
[in] | currentTime | The leave time of the vehicle |
[in] | next | The next segment on this vehicles route |
Definition at line 230 of file MESegment.cpp.
References myNextSegment, myVaporizationTarget, MSMoveReminder::NOTIFICATION_ARRIVED, MSMoveReminder::NOTIFICATION_JUNCTION, MSMoveReminder::NOTIFICATION_SEGMENT, MSMoveReminder::NOTIFICATION_VAPORIZED, and MEVehicle::updateDetectors().
Referenced by receive(), and removeCar().
|
staticprivate |
whether the segment requires use of multiple queues
Definition at line 136 of file MESegment.cpp.
References MSEdge::getLanes(), and MSEdge::getNumSuccessors().
Referenced by MESegment().
bool MESegment::vaporizeAnyCar | ( | SUMOTime | currentTime | ) |
tries to remove any car from this segment
[in] | currentTime | the current time |
Definition at line 566 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 338 of file MESegment.cpp.
References myCarQues, and MSXMLRawOut::writeVehicle().
Referenced by getMeanSpeed(), and MSXMLRawOut::writeEdge().
|
static |
Definition at line 378 of file MESegment.h.
Referenced by getEdge(), and recomputeJamThreshold().
|
private |
slope and axis offset for the jam-jam headway function
Definition at line 460 of file MESegment.h.
Referenced by getTimeHeadway(), and recomputeJamThreshold().
|
private |
Definition at line 460 of file MESegment.h.
Referenced by getTimeHeadway(), and recomputeJamThreshold().
|
private |
The block times.
Definition at line 494 of file MESegment.h.
Referenced by getNextInsertionTime(), loadState(), MESegment(), receive(), saveState(), send(), and setSpeed().
|
private |
The number of lanes * the length.
Definition at line 467 of file MESegment.h.
Referenced by getRelativeJamThreshold(), getRelativeOccupancy(), hasSpaceFor(), loadState(), overtake(), receive(), recomputeJamThreshold(), and remainingVehicleCapacity().
|
private |
The car queues. Vehicles are inserted in the front and removed in the back.
Definition at line 488 of file MESegment.h.
Referenced by addDetector(), getCarNumber(), getEventTime(), getMeanSpeed(), getNextInsertionTime(), getQueue(), getVehicles(), hasBlockedLeader(), loadState(), MESegment(), numQueues(), prepareDetectorForWriting(), receive(), removeCar(), removeDetector(), saveState(), setSpeed(), vaporizeAnyCar(), and writeVehicles().
|
private |
The data collection for all kinds of detectors.
Definition at line 485 of file MESegment.h.
Referenced by addDetector(), addReminders(), and removeDetector().
|
staticprivate |
Definition at line 506 of file MESegment.h.
|
private |
The microsim edge this segment belongs to.
Definition at line 443 of file MESegment.h.
Referenced by getEdge(), getLink(), getMaxPenaltySeconds(), getMeanSpeed(), getNextInsertionTime(), receive(), recomputeJamThreshold(), and removeCar().
|
private |
Definition at line 499 of file MESegment.h.
Referenced by getEntryBlockTime(), getNextInsertionTime(), hasSpaceFor(), receive(), and setEntryBlockTime().
|
private |
The follower edge to que index mapping for multi queue segments.
Definition at line 491 of file MESegment.h.
Referenced by MESegment(), and receive().
|
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 464 of file MESegment.h.
Referenced by recomputeJamThreshold().
|
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().
|
private |
Running number of the segment in the edge.
Definition at line 452 of file MESegment.h.
Referenced by getIndex(), and receive().
|
private |
The space (in m) which needs to be occupied before the segment is considered jammed.
Definition at line 482 of file MESegment.h.
Referenced by free(), getRelativeJamThreshold(), hasSpaceFor(), limitedControlOverride(), and recomputeJamThreshold().
|
private |
Whether junction control is enabled.
Definition at line 473 of file MESegment.h.
Referenced by getLink().
|
private |
the last headway
Definition at line 502 of file MESegment.h.
Referenced by getLastHeadwaySeconds(), and send().
|
mutableprivate |
the time at which myMeanSpeed was last updated
Definition at line 513 of file MESegment.h.
Referenced by getMeanSpeed().
|
private |
The segment's length.
Definition at line 449 of file MESegment.h.
Referenced by getFlow(), getLength(), getNextInsertionTime(), jamThresholdForSpeed(), newArrival(), overtake(), receive(), and recomputeJamThreshold().
|
mutableprivate |
the mean speed on this segment. Updated at event time or on demand
Definition at line 510 of file MESegment.h.
Referenced by getMeanSpeed().
|
private |
Whether minor penalty is enabled.
Definition at line 479 of file MESegment.h.
Referenced by getLinkPenalty(), and recomputeJamThreshold().
|
private |
The next segment of this edge, 0 if this is the last segment of this edge.
Definition at line 446 of file MESegment.h.
Referenced by getNextSegment(), and updateDetectorsOnLeave().
|
private |
The occupied space (in m) on the segment.
Definition at line 470 of file MESegment.h.
Referenced by free(), getBruttoOccupancy(), getRelativeOccupancy(), hasSpaceFor(), limitedControlOverride(), loadState(), overtake(), receive(), remainingVehicleCapacity(), and removeCar().
|
private |
The time headway parameters, see the Eissfeldt thesis.
Definition at line 455 of file MESegment.h.
Referenced by getMeanSpeed(), getMinimumHeadwayTime(), getTimeHeadway(), jamThresholdForSpeed(), prepareDetectorForWriting(), receive(), and setSpeedForQueue().
|
private |
Definition at line 455 of file MESegment.h.
Referenced by getTimeHeadway().
|
private |
Definition at line 455 of file MESegment.h.
Referenced by getMeanSpeed(), getTimeHeadway(), and recomputeJamThreshold().
|
private |
Definition at line 455 of file MESegment.h.
Referenced by recomputeJamThreshold().
|
private |
Headway parameter for computing gross time headyway from net time headway, length and edge speed.
Definition at line 457 of file MESegment.h.
Referenced by tauWithVehLength().
|
private |
Whether tls penalty is enabled.
Definition at line 476 of file MESegment.h.
Referenced by getLinkPenalty(), getTLSCapacity(), isOpen(), and recomputeJamThreshold().
|
staticprivate |
Definition at line 507 of file MESegment.h.
Referenced by isInvalid(), updateDetectorsOnLeave(), and vaporizeAnyCar().