SUMO - Simulation of Urban MObility
MSJunction Class Reference

The base class for an intersection. More...

#include <MSJunction.h>

Inheritance diagram for MSJunction:
Inheritance graph
Collaboration diagram for MSJunction:
Collaboration graph

Public Member Functions

void addIncoming (MSEdge *edge)
 
void addOutgoing (MSEdge *edge)
 
void addTo (const StoringVisitor &cont) const
 Adds this object to the given container. More...
 
virtual const std::vector< MSLane * > & getFoeInternalLanes (const MSLink *const ) const
 
virtual const std::vector< MSLink * > & getFoeLinks (const MSLink *const ) const
 
const std::string & getID () const
 Returns the id. More...
 
const ConstMSEdgeVectorgetIncoming () const
 
const ConstMSEdgeVectorgetOutgoing () const
 
const PositiongetPosition () const
 
const PositionVectorgetShape () const
 Returns this junction's shape. More...
 
SumoXMLNodeType getType () const
 return the type of this Junction More...
 
bool isLeader (const MSVehicle *ego, const MSVehicle *foe)
 
 MSJunction (const std::string &id, SumoXMLNodeType type, const Position &position, const PositionVector &shape)
 Constructor. More...
 
void passedJunction (const MSVehicle *vehicle)
 erase vehicle from myLinkLeaders More...
 
virtual void postloadInit ()
 
void setID (const std::string &newID)
 resets the id More...
 
virtual ~MSJunction ()
 Destructor. 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...
 

Protected Types

typedef std::map< std::string, MSJunction * > DictType
 definition of the static dictionary type More...
 
typedef std::map< const MSVehicle *, std::set< const MSVehicle * > > LeaderMap
 map from leader vehicle to follower vehicles More...
 

Protected Attributes

std::vector< MSLane * > myEmptyLanes
 
std::vector< MSLink * > myEmptyLinks
 
std::string myID
 The name of the object. More...
 
ConstMSEdgeVector myIncoming
 incoming edges More...
 
LeaderMap myLinkLeaders
 
ConstMSEdgeVector myOutgoing
 outgoing edges More...
 
Position myPosition
 The position of the junction. More...
 
PositionVector myShape
 The shape of the junction. More...
 
SumoXMLNodeType myType
 Tye type of this junction. More...
 

Private Member Functions

 MSJunction (const MSJunction &)
 Invalidated copy constructor. More...
 
MSJunctionoperator= (const MSJunction &)
 Invalidated assignment operator. More...
 

Detailed Description

The base class for an intersection.

Definition at line 61 of file MSJunction.h.

Member Typedef Documentation

typedef std::map<std::string, MSJunction* > MSJunction::DictType
protected

definition of the static dictionary type

Definition at line 150 of file MSJunction.h.

typedef std::map<const MSVehicle*, std::set<const MSVehicle*> > MSJunction::LeaderMap
protected

map from leader vehicle to follower vehicles

Definition at line 153 of file MSJunction.h.

Constructor & Destructor Documentation

MSJunction::MSJunction ( const std::string &  id,
SumoXMLNodeType  type,
const Position position,
const PositionVector shape 
)

Constructor.

Parameters
[in]idThe id of the junction
[in]positionThe position of the junction
[in]shapeThe shape of the junction

Definition at line 54 of file MSJunction.cpp.

MSJunction::~MSJunction ( )
virtual

Destructor.

Definition at line 63 of file MSJunction.cpp.

MSJunction::MSJunction ( const MSJunction )
private

Invalidated copy constructor.

Member Function Documentation

void MSJunction::addIncoming ( MSEdge edge)
inline

Definition at line 110 of file MSJunction.h.

References myIncoming.

Referenced by NLHandler::myEndElement().

void MSJunction::addOutgoing ( MSEdge edge)
inline

Definition at line 114 of file MSJunction.h.

References myOutgoing.

Referenced by NLHandler::myEndElement().

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().

virtual const std::vector<MSLane*>& MSJunction::getFoeInternalLanes ( const MSLink const) const
inlinevirtual

Reimplemented in MSRightOfWayJunction.

Definition at line 98 of file MSJunction.h.

References myEmptyLanes.

virtual const std::vector<MSLink*>& MSJunction::getFoeLinks ( const MSLink const) const
inlinevirtual

Reimplemented in MSRightOfWayJunction.

Definition at line 94 of file MSJunction.h.

References myEmptyLinks.

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(), 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(), 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(), 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(), NBNode::buildWalkingAreas(), MSBaseVehicle::calculateArrivalParams(), MSSimpleTrafficLightLogic::changeStepAndDuration(), NBEdge::checkGeometry(), MSVehicleTransfer::checkInsertions(), ODDistrictHandler::closeDistrict(), NLHandler::closeEdge(), RORouteHandler::closeRouteDistribution(), RORouteHandler::closeVehicle(), NBTrafficLightDefinition::collectAllLinks(), NBLoadedSUMOTLDef::collectEdges(), NBTrafficLightDefinition::collectEdges(), 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(), GUINet::createTLWrapper(), NIVissimDistrictConnection::dict_BuildDistricts(), MSContainer::MSContainerStage_Driving::endEventOutput(), MSContainer::MSContainerStage_Waiting::endEventOutput(), MSPerson::MSPersonStage_Driving::endEventOutput(), MSPerson::MSPersonStage_Waiting::endEventOutput(), MSE3Collector::enter(), 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(), NBRampsComputer::fulfillsRampConstraints(), RODFDetectorCon::getAggFlowFor(), RODFDetectorCon::getAnyDetectorForEdge(), MSNet::getBusStopID(), MSNet::getChargingStationID(), NBEdge::getConnection(), MSNet::getContainerStopID(), NBEdge::getCrossingAngle(), GNEEdge::getDest(), RODFNet::getDetectorEdge(), MSMeanData::getEdgeID(), PedestrianEdge< E, L, N >::getEffort(), NBEdge::getFirstNonPedestrianLane(), MS_E2_ZS_CollectorOverLanes::getLanePredeccessorLanes(), MSTLLogicControl::TLSLogicVariants::getLogicInstantiatingOff(), NIImporter_VISUM::getNamedEdgeContinuating(), MSPerson::getNextEdge(), MSPModel_Striping::getNextLane(), GUIInstantInductLoop::MyWrapper::getParameterWindow(), GUI_E2_ZS_Collector::MyWrapper::getParameterWindow(), GUIVehicle::getParameterWindow(), GUIInductLoop::MyWrapper::getParameterWindow(), 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(), MSRailSignal::init(), MSActuatedTrafficLightLogic::init(), MSTrafficLightLogic::init(), PedestrianEdge< E, L, N >::initPedestrianNetwork(), NIImporter_SUMO::initTrafficLightLogic(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NBDistrictCont::insert(), NBNodeCont::insert(), NBTrafficLightLogicCont::insert(), NBEdgeCont::insert(), MSEdge::insertVehicle(), GNEJunction::invalidateTLS(), NBNode::invalidateTLS(), MSTLLogicControl::isActive(), RODFNet::isDestination(), RODFNet::isFalseSource(), RODFNet::isSource(), NBNodeCont::joinJunctions(), NBEdgeCont::joinSameNodeConnectingEdges(), MSE3Collector::leave(), MSDevice_BTreceiver::BTreceiverUpdate::leaveRange(), NIImporter_OpenDrive::loadNetwork(), ODDistrictCont::makeDistricts(), 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_BTsender::notifyEnter(), MSDevice_BTreceiver::notifyEnter(), MSDevice_Example::notifyEnter(), MSDevice_Tripinfo::notifyEnter(), MSTriggeredRerouter::notifyEnter(), MSDevice_Container::notifyLeave(), MSDevice_Person::notifyLeave(), MSE3Collector::MSE3EntryReminder::notifyLeave(), MSDevice_Example::notifyLeave(), MSDevice_Tripinfo::notifyLeave(), MSDevice_BTsender::notifyLeave(), MSDevice_BTreceiver::notifyLeave(), MSDevice_Example::notifyMove(), MSDevice_BTsender::notifyMove(), MSDevice_BTreceiver::notifyMove(), MSMeanData::MeanDataValues::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()(), MSEdge::by_id_sorter::operator()(), NBNode::nodes_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_InductionLoop::processGet(), TraCIServerAPI_ArealDetector::processGet(), TraCIServerAPI_TLS::processGet(), TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_Person::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(), 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(), NBOwnTLDef::setTLControllingInformation(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBTrafficLightLogicCont::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBEdgeCont::splitAt(), MSLane::succLinkSec(), GUITrafficLightLogicWrapper::switchTLSLogic(), GNETLSEditor::updateDescription(), MSDevice_BTreceiver::BTreceiverUpdate::updateVisibility(), TraCIServerAPI_Vehicle::vtdMap(), TraCIServerAPI_Vehicle::vtdMap_matchingRoutePosition(), 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(), 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.

const ConstMSEdgeVector& MSJunction::getIncoming ( ) const
inline

Definition at line 102 of file MSJunction.h.

References myIncoming.

Referenced by GUIJunctionWrapper::GUIJunctionWrapper().

const ConstMSEdgeVector& MSJunction::getOutgoing ( ) const
inline

Definition at line 106 of file MSJunction.h.

References myOutgoing.

Referenced by GUIJunctionWrapper::GUIJunctionWrapper().

const PositionVector& MSJunction::getShape ( ) const
inline

Returns this junction's shape.

Returns
The shape of this junction

Definition at line 90 of file MSJunction.h.

References myShape.

Referenced by GUIJunctionWrapper::drawGL(), GUIJunctionWrapper::GUIJunctionWrapper(), and TraCIServerAPI_Junction::processGet().

SumoXMLNodeType MSJunction::getType ( ) const
inline

return the type of this Junction

Definition at line 119 of file MSJunction.h.

References isLeader(), myType, and passedJunction().

Referenced by GUIJunctionWrapper::getColorValue(), and MSRailSignal::init().

bool MSJunction::isLeader ( const MSVehicle ego,
const MSVehicle foe 
)
MSJunction& MSJunction::operator= ( const MSJunction )
private

Invalidated assignment operator.

void MSJunction::passedJunction ( const MSVehicle vehicle)

erase vehicle from myLinkLeaders

Definition at line 77 of file MSJunction.cpp.

References myLinkLeaders.

Referenced by getType(), and MSLink::passedJunction().

void MSJunction::postloadInit ( )
virtual

performs some initialisation after the loading (e.g., link map computation)

Reimplemented in MSRightOfWayJunction, MSNoLogicJunction, and MSLogicJunction.

Definition at line 73 of file MSJunction.cpp.

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().

Field Documentation

std::vector<MSLane*> MSJunction::myEmptyLanes
protected

Definition at line 141 of file MSJunction.h.

Referenced by getFoeInternalLanes().

std::vector<MSLink*> MSJunction::myEmptyLinks
protected

Definition at line 140 of file MSJunction.h.

Referenced by getFoeLinks().

ConstMSEdgeVector MSJunction::myIncoming
protected

incoming edges

Definition at line 145 of file MSJunction.h.

Referenced by addIncoming(), and getIncoming().

LeaderMap MSJunction::myLinkLeaders
protected

Definition at line 154 of file MSJunction.h.

Referenced by isLeader(), and passedJunction().

ConstMSEdgeVector MSJunction::myOutgoing
protected

outgoing edges

Definition at line 147 of file MSJunction.h.

Referenced by addOutgoing(), and getOutgoing().

Position MSJunction::myPosition
protected

The position of the junction.

Definition at line 135 of file MSJunction.h.

Referenced by getPosition().

PositionVector MSJunction::myShape
protected

The shape of the junction.

Definition at line 138 of file MSJunction.h.

Referenced by getShape().

SumoXMLNodeType MSJunction::myType
protected

Tye type of this junction.

Definition at line 132 of file MSJunction.h.

Referenced by getType().


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