SUMO - Simulation of Urban MObility
|
A netgen-representation of a node. More...
#include <NGNode.h>
Public Member Functions | |
void | addLink (NGEdge *link) |
Adds the given link to the internal list. More... | |
void | addTo (const StoringVisitor &cont) const |
Adds this object to the given container. More... | |
NBNode * | buildNBNode (NBNetBuilder &nb) const |
Builds and returns this node's netbuild-representation. More... | |
bool | connected (NGNode *node) const |
Returns whether the other node is connected. More... | |
const std::string & | getID () const |
Returns the id. More... | |
SUMOReal | getMaxNeighbours () |
Returns this node's maximum neighbour number. More... | |
const Position & | getPosition () const |
Returns this node's position. More... | |
NGNode (const std::string &id) | |
Constructor. More... | |
NGNode (const std::string &id, int xPos, int yPos) | |
Constructor. More... | |
NGNode (const std::string &id, int xID, int yID, bool amCenter) | |
Constructor. More... | |
void | removeLink (NGEdge *link) |
Removes the given link. More... | |
bool | samePos (int xPos, int yPos) const |
Returns whether the node has the given position. More... | |
void | setID (const std::string &newID) |
resets the id More... | |
void | setMaxNeighbours (SUMOReal value) |
Sets this node's maximum neighbour number. More... | |
void | setX (SUMOReal x) |
Sets a new value for x-position. More... | |
void | setY (SUMOReal y) |
Sets a new value for y-position. More... | |
~NGNode () | |
Destructor. More... | |
Protected Attributes | |
std::string | myID |
The name of the object. More... | |
Private Attributes | |
NGEdgeList | LinkList |
List of connected links. More... | |
bool | myAmCenter |
Information whether this is the center of a cpider-net. More... | |
SUMOReal | myMaxNeighbours |
The maximum number of neighbours. More... | |
Position | myPosition |
The position of the node. More... | |
int | xID |
Integer x-position (x-id) More... | |
int | yID |
Integer y-position (y-id) More... | |
Friends | |
class | NGRandomNetBuilder |
NGNode::NGNode | ( | const std::string & | id | ) |
Constructor.
[in] | id | The id of the node |
[in] | xPos | The x-position of the node |
[in] | yPos | The y-position of the node |
Definition at line 61 of file NGNode.cpp.
Constructor.
[in] | id | The id of the node |
[in] | xPos | The x-position of the node |
[in] | yPos | The y-position of the node |
[in] | amCenter | Information whether this is the center-node of a spider-net |
Definition at line 65 of file NGNode.cpp.
NGNode::~NGNode | ( | ) |
void NGNode::addLink | ( | NGEdge * | link | ) |
Adds the given link to the internal list.
[in] | link | The link to add |
Definition at line 115 of file NGNode.cpp.
References LinkList.
Referenced by NGEdge::NGEdge().
|
inlineinherited |
Adds this object to the given container.
in,filled] | cont The container to add this item to |
Definition at line 114 of file Named.h.
References Named::StoringVisitor::add().
NBNode * NGNode::buildNBNode | ( | NBNetBuilder & | nb | ) | const |
Builds and returns this node's netbuild-representation.
The position of the node is transformed to cartesian using GeoConvHelper::x2cartesian, first. If this node is the center node of a spider net, a node of the type NBNode::NODETYPE_NOJUNCTION is returned. Otherwise, a plain node is built and it is checked whether the options indicate building one of the tls node-types. In this case, a logic is built and stored. A ProcessError is thrown if this fails (should never happen, in fact).
[in] | nb | The netbuilder to retrieve the tls-container from |
ProcessError | If the built tls logic could not be added (should never happen) |
There is no interaction with explicit node setting options? Where is this done?
Check whether throwing an exception is really necessary, here
Definition at line 79 of file NGNode.cpp.
References StringBijection< T >::get(), OptionsCont::getOptions(), GeoConvHelper::getProcessing(), OptionsCont::getString(), NBNetBuilder::getTLLogicCont(), NBTrafficLightLogicCont::insert(), OptionsCont::isSet(), myAmCenter, Named::myID, myPosition, NODETYPE_NOJUNCTION, NODETYPE_PRIORITY, NODETYPE_TRAFFIC_LIGHT, NODETYPE_TRAFFIC_LIGHT_NOJUNCTION, SUMOXMLDefinitions::NodeTypes, SUMOXMLDefinitions::TrafficLightTypes, and GeoConvHelper::x2cartesian().
Returns whether the other node is connected.
[in] | node | The link to check whether it is connected |
Definition at line 127 of file NGNode.cpp.
References LinkList.
Referenced by NGRandomNetBuilder::findPossibleOuterNodes().
|
inlineinherited |
Returns the id.
Definition at line 60 of file Named.h.
References Named::myID.
Referenced by NIImporter_SUMO::_loadNetwork(), Named::StoringVisitor::add(), TraCIServerAPI_Lane::StoringVisitor::add(), MSDetectorControl::add(), RORouteDef::addAlternative(), MSNet::addBusStop(), NBLoadedSUMOTLDef::addConnection(), NLHandler::addConnection(), RODFDetectorCon::addDetector(), RONet::addEdge(), ROJTREdge::addFollowerProbability(), MSTLLogicControl::TLSLogicVariants::addLogic(), RONet::addNode(), NIImporter_SUMO::addPhase(), RONet::addRouteDef(), NBDistrict::addSink(), NBDistrict::addSource(), NBTrafficLightLogic::addStep(), MSRouteHandler::addStop(), NIXMLTrafficLightsHandler::addTlConnection(), NIVissimDisturbance::addToNode(), MSVehicle::addTraciStop(), MSVehicleTransfer::addVeh(), GUITrafficLightLogicWrapper::begin2TrackPhases(), MSPerson::MSPersonStage_Driving::beginEventOutput(), MSPerson::MSPersonStage_Waiting::beginEventOutput(), NIVisumTL::build(), RODFNet::buildApproachList(), MS_E2_ZS_CollectorOverLanes::buildCollector(), NIImporter_VISUM::buildDistrictNode(), NIVissimConnection::buildEdgeConnections(), RODFNet::buildEdgeFlowMap(), NBEdge::buildInnerEdges(), NGEdge::buildNBEdge(), NIVissimEdge::buildNBEdge(), NBRampsComputer::buildOffRamp(), NBRampsComputer::buildOnRamp(), MSSimpleTrafficLightLogic::changeStepAndDuration(), NBEdge::checkGeometry(), MSVehicleTransfer::checkInsertions(), ODDistrictHandler::closeDistrict(), NLHandler::closeEdge(), RORouteHandler::closeRouteDistribution(), RORouteHandler::closeVehicle(), NBTrafficLightDefinition::collectAllLinks(), NBTrafficLightDefinition::collectEdges(), ROJTRRouter::compute(), NBTrafficLightDefinition::compute(), NBNode::computeInternalLaneShape(), NBEdge::computeLaneShapes(), NBNode::computeLogic(), NBNode::computeNodeShape(), RODFNet::computeRoutesFor(), NBTrafficLightLogicCont::computeSingleLogic(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NGNet::connect(), NBEdge::connections_sorter(), MSAbstractLaneChangeModel::continueLaneChangeManeuver(), NLDetectorBuilder::convUncontE2PosLength(), GUINet::createTLWrapper(), MSLane::detectCollisions(), NIVissimDistrictConnection::dict_BuildDistricts(), MSPerson::MSPersonStage_Driving::endEventOutput(), MSPerson::MSPersonStage_Waiting::endEventOutput(), MSE3Collector::enter(), MSCalibrator::execute(), Command_SaveTLSState::execute(), Command_SaveTLSSwitchStates::execute(), Command_SaveTLSSwitches::execute(), MSVTypeProbe::execute(), MSVehicle::executeMove(), MSLane::executeMovements(), NBNodeCont::extract(), NBTrafficLightLogicCont::extract(), NBEdgeCont::extract(), RODFDetectorCon::getAggFlowFor(), RODFDetectorCon::getAnyDetectorForEdge(), MSNet::getBusStopID(), RODFNet::getDetectorEdge(), MS_E2_ZS_CollectorOverLanes::getLanePredeccessorLanes(), AGStreet::getName(), NIImporter_VISUM::getNamedEdgeContinuating(), GUIVehicle::getParameterWindow(), GUITrafficLightLogicWrapper::getPopUpMenu(), NLTriggerBuilder::getPosition(), NLDetectorBuilder::getPositionChecking(), NBNode::getPossiblySplittedIncoming(), NBNode::getPossiblySplittedOutgoing(), NIImporter_VISUM::getReversedContinuating(), RODFDetectorCon::guessEmptyFlows(), GUITLLogicPhasesTrackerWindow::GUITLLogicPhasesTrackerWindow(), NBEdgeCont::ignoreFilterMatch(), MSActuatedTrafficLightLogic::init(), MSAgentbasedTrafficLightLogic::init(), NIImporter_SUMO::initTrafficLightLogic(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NBDistrictCont::insert(), NBTrafficLightLogicCont::insert(), NBNodeCont::insert(), NBEdgeCont::insert(), NBNode::invalidateTLS(), MSTLLogicControl::isActive(), RODFNet::isDestination(), RODFNet::isFalseSource(), RODFNet::isSource(), NBEdgeCont::joinSameNodeConnectingEdges(), MSE3Collector::leave(), NIImporter_OpenDrive::loadNetwork(), NBRampsComputer::moveRampRight(), MSCalibrator::MSCalibrator(), MSPerson::MSPersonStage_Waiting::MSPersonStage_Waiting(), MSVehicle::MSVehicle(), NBOwnTLDef::myCompute(), NBLoadedTLDef::myCompute(), NIXMLTrafficLightsHandler::myEndElement(), NIXMLEdgesHandler::myEndElement(), NIImporter_SUMO::myEndElement(), NIXMLConnectionsHandler::myStartElement(), MSLaneSpeedTrigger::myStartElement(), MSTriggeredRerouter::myStartElement(), NBConnection::NBConnection(), NBRequest::NBRequest(), MSDevice_BTreceiver::notifyEnter(), MSDevice_Tripinfo::notifyEnter(), MSDevice_BTsender::notifyEnter(), MSDevice_Example::notifyEnter(), MSCalibrator::VehicleRemover::notifyEnter(), MSDevice_Tripinfo::notifyLeave(), MSDevice_Person::notifyLeave(), MSDevice_Example::notifyLeave(), MSDevice_BTreceiver::notifyLeave(), MSDevice_BTsender::notifyLeave(), MSDevice_Example::notifyMove(), MSDevice_BTreceiver::notifyMove(), MSDevice_BTsender::notifyMove(), GUIViewTraffic::onGamingClick(), RORouteHandler::openRoute(), Named::ComparatorIdLess::operator()(), NBTurningDirectionsComputer::combination_by_angle_sorter::operator()(), RODFNet::idComp::operator()(), NBOwnTLDef::edge_by_incoming_priority_sorter::operator()(), NBNetBuilder::by_id_sorter::operator()(), NBContHelper::same_connection_edge_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(), MSLCM_JE2013::patchSpeed(), NBLoadedTLDef::SignalGroup::patchTYellow(), AGStreet::print(), TraCIServerAPI_TLS::processGet(), TraCIServerAPI_InductionLoop::processGet(), TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_Lane::processGet(), TraCIServerAPI_Vehicle::processSet(), NWWriter_SUMO::prohibitionConnection(), NBEdgeCont::recheckPostProcessConnections(), NBLoadedTLDef::SignalGroup::remapIncoming(), NBLoadedTLDef::SignalGroup::remapOutgoing(), NBLoadedSUMOTLDef::removeConnection(), MSCalibrator::removePending(), NBNode::removeSelfLoops(), NBEdgeCont::removeUnwishedEdges(), NBNodeCont::removeUnwishedNodes(), NBNodeCont::rename(), NBEdgeCont::rename(), NBConnection::replaceFrom(), MSBaseVehicle::replaceRouteEdges(), NBConnection::replaceTo(), NIImporter_DlrNavteq::TrafficlightsHandler::report(), NIXMLTrafficLightsHandler::retrieveLaneIndex(), RODFNet::revalidateFlows(), PCPolyContainer::save(), RONet::saveAndRemoveRoutesUntil(), MSBaseVehicle::saveState(), NBNodeCont::setAsTLControlled(), NBEdge::setControllingTLInformation(), NIXMLEdgesHandler::setNodes(), NBOwnTLDef::setTLControllingInformation(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBEdgeCont::splitAt(), MSLane::succLinkSec(), GUITrafficLightLogicWrapper::switchTLSLogic(), MSDevice_BTreceiver::BTreceiverUpdate::updateVisibility(), TraCIServerAPI_Vehicle::vtdMap_matchingEdgeLane(), TraCIServerAPI_Vehicle::vtdMap_matchingRoutePosition(), MSLCM_JE2013::wantsChange(), 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(), 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(), MSRouteProbe::writeXMLOutput(), and MSE2Collector::writeXMLOutput().
|
inline |
Returns this node's maximum neighbour number.
Definition at line 103 of file NGNode.h.
References myMaxNeighbours.
Referenced by NGRandomNetBuilder::createNet(), NGRandomNetBuilder::createNewNode(), and NGRandomNetBuilder::findPossibleOuterNodes().
|
inline |
Returns this node's position.
Definition at line 94 of file NGNode.h.
References myPosition.
Referenced by NGRandomNetBuilder::canConnect(), NGRandomNetBuilder::checkAngles(), and NGRandomNetBuilder::createNewNode().
void NGNode::removeLink | ( | NGEdge * | link | ) |
Removes the given link.
The given pointer is compared to those in the list. A matching pointer is removed, not other same connections.
[in] | link | The link to remove |
Definition at line 121 of file NGNode.cpp.
References LinkList.
Referenced by NGEdge::~NGEdge().
|
inlineinherited |
resets the id
[in] | newID | The new id of this object |
Definition at line 68 of file Named.h.
References Named::myID.
Referenced by NBNodeCont::rename(), and NBEdgeCont::rename().
|
inline |
Sets this node's maximum neighbour number.
[in] | value | The new maximum neighbour number of the node |
Definition at line 112 of file NGNode.h.
References myMaxNeighbours.
Referenced by NGRandomNetBuilder::createNet(), and NGRandomNetBuilder::createNewNode().
|
inline |
Sets a new value for x-position.
[in] | value | The new x-position of this node |
Definition at line 121 of file NGNode.h.
References myPosition, Position::set(), and Position::y().
Referenced by NGNet::createChequerBoard(), NGRandomNetBuilder::createNet(), NGRandomNetBuilder::createNewNode(), and NGNet::createSpiderWeb().
|
inline |
Sets a new value for y-position.
[in] | value | The new y-position of this node |
Definition at line 130 of file NGNode.h.
References myPosition, Position::set(), and Position::x().
Referenced by NGNet::createChequerBoard(), NGRandomNetBuilder::createNet(), NGRandomNetBuilder::createNewNode(), and NGNet::createSpiderWeb().
|
friend |
|
private |
List of connected links.
Definition at line 198 of file NGNode.h.
Referenced by addLink(), NGRandomNetBuilder::checkAngles(), connected(), NGRandomNetBuilder::createNet(), NGRandomNetBuilder::createNewNode(), NGRandomNetBuilder::findPossibleOuterNodes(), removeLink(), and ~NGNode().
|
private |
Information whether this is the center of a cpider-net.
Definition at line 207 of file NGNode.h.
Referenced by buildNBNode().
|
protectedinherited |
The name of the object.
Definition at line 121 of file Named.h.
Referenced by GUI_E2_ZS_CollectorOverLanes::buildCollector(), RODFDetector::buildDestinationDistribution(), NGEdge::buildNBEdge(), buildNBNode(), MSCalibrator::execute(), Named::getID(), NBEdge::getLaneID(), NBEdge::getLaneIDInsecure(), ROEdge::getStoredEffort(), ROEdge::getTravelTime(), MSActuatedTrafficLightLogic::init(), MSAgentbasedTrafficLightLogic::init(), MSCalibrator::init(), NBEdge::init(), MSCalibrator::myStartElement(), MSCalibrator::VehicleRemover::notifyEnter(), RORouteDef::preComputeCurrentRoute(), NBEdge::reinitNodes(), MSRoute::release(), RORouteDef::repairCurrentRoute(), Named::setID(), NBEdge::splitGeometry(), RODFDetector::writeEmitterDefinition(), MSXMLRawOut::writeLane(), NBNode::writeLogic(), RODFDetector::writeSingleSpeedTrigger(), MSCalibrator::writeXMLOutput(), MSE3Collector::writeXMLOutput(), and MSMeanData::writeXMLOutput().
|
private |
The maximum number of neighbours.
Definition at line 204 of file NGNode.h.
Referenced by getMaxNeighbours(), and setMaxNeighbours().
|
private |
The position of the node.
Definition at line 201 of file NGNode.h.
Referenced by buildNBNode(), getPosition(), setX(), and setY().