![]() |
SUMO - Simulation of Urban MObility
|
#include <NBAlgorithms_Ramps.h>
Static Public Member Functions | |
static void | computeRamps (NBNetBuilder &nb, OptionsCont &oc) |
Computes highway on-/off-ramps (if wished) More... | |
Static Public Attributes | |
static const std::string | ADDED_ON_RAMP_EDGE |
suffix for newly generated on-ramp edges More... | |
Static Private Member Functions | |
static void | buildOffRamp (NBNode *cur, NBNodeCont &nc, NBEdgeCont &ec, NBDistrictCont &dc, SUMOReal rampLength, bool dontSplit) |
Builds an off-ramp ending at the given node. More... | |
static void | buildOnRamp (NBNode *cur, NBNodeCont &nc, NBEdgeCont &ec, NBDistrictCont &dc, SUMOReal rampLength, bool dontSplit) |
Builds an on-ramp starting at the given node. More... | |
static bool | determinedByLaneNumber (NBEdge **potHighway, NBEdge **potRamp) |
static bool | determinedBySpeed (NBEdge **potHighway, NBEdge **potRamp) |
static bool | fulfillsRampConstraints (NBEdge *potHighway, NBEdge *potRamp, NBEdge *other, SUMOReal minHighwaySpeed, SUMOReal maxRampSpeed, const std::set< std::string > &noramps) |
Checks whether an on-/off-ramp can be bult here. More... | |
static void | getOffRampEdges (NBNode *n, NBEdge **potHighway, NBEdge **potRamp, NBEdge **other) |
static void | getOnRampEdges (NBNode *n, NBEdge **potHighway, NBEdge **potRamp, NBEdge **other) |
static bool | hasWrongMode (NBEdge *edge) |
whether the edge has a mode that does not indicate a ramp edge More... | |
static bool | mayNeedOffRamp (NBNode *cur, SUMOReal minHighwaySpeed, SUMOReal maxRampSpeed, const std::set< std::string > &noramps) |
Determines whether the given node may be an off-ramp end. More... | |
static bool | mayNeedOnRamp (NBNode *cur, SUMOReal minHighwaySpeed, SUMOReal maxRampSpeed, const std::set< std::string > &noramps) |
Determines whether the given node may be an on-ramp begin. More... | |
static void | moveRampRight (NBEdge *ramp, int addedLanes) |
Moves the ramp to the right, as new lanes were added. More... | |
Definition at line 56 of file NBAlgorithms_Ramps.h.
|
staticprivate |
Builds an off-ramp ending at the given node.
[in] | cur | The node at which the off-ramp shall end |
[in] | nc | The container of nodes |
[in] | ec | The container of edges |
[in] | dc | The container of districts |
[in] | rampLength | The wished ramp length |
[in] | dontSplit | Whether no edges shall be split |
Definition at line 249 of file NBAlgorithms_Ramps.cpp.
References NBEdge::addLane2LaneConnections(), NBEdge::getFromNode(), NBEdge::getGeometry(), Named::getID(), NBNode::getIncomingEdges(), NBEdge::getLaneShape(), NBEdge::getNumLanes(), getOffRampEdges(), NBEdge::getStep(), NBEdge::incLaneNo(), NBNodeCont::insert(), NBEdge::invalidateConnections(), NBEdge::isTurningDirectionAt(), NBEdge::L2L_VALIDATED, NBEdge::LANES2LANES_USER, PositionVector::length(), MIN2(), moveRampRight(), POSITION_EPS, PositionVector::positionAtOffset(), NBEdgeCont::retrieve(), NBEdge::setGeometry(), NBEdgeCont::splitAt(), SUMOReal, WRITE_ERROR, and WRITE_WARNING.
Referenced by computeRamps().
|
staticprivate |
Builds an on-ramp starting at the given node.
[in] | cur | The node at which the on-ramp shall begin |
[in] | nc | The container of nodes |
[in] | ec | The container of edges |
[in] | dc | The container of districts |
[in] | rampLength | The wished ramp length |
[in] | dontSplit | Whether no edges shall be split |
Definition at line 160 of file NBAlgorithms_Ramps.cpp.
References ADDED_ON_RAMP_EDGE, NBEdge::addLane2LaneConnections(), NBEdge::getGeometry(), Named::getID(), NBEdge::getLaneShape(), NBEdge::getNumLanes(), getOnRampEdges(), NBNode::getOutgoingEdges(), NBEdge::getStep(), NBEdge::getToNode(), NBEdge::incLaneNo(), NBNodeCont::insert(), NBEdge::invalidateConnections(), NBEdge::isTurningDirectionAt(), NBEdge::L2L_VALIDATED, NBEdge::LANES2LANES_USER, PositionVector::length(), MIN2(), moveRampRight(), POSITION_EPS, PositionVector::positionAtOffset(), NBEdgeCont::retrieve(), NBEdge::setGeometry(), NBEdgeCont::splitAt(), SUMOReal, WRITE_ERROR, and WRITE_WARNING.
Referenced by computeRamps().
|
static |
Computes highway on-/off-ramps (if wished)
Definition at line 60 of file NBAlgorithms_Ramps.cpp.
References NBNodeCont::begin(), buildOffRamp(), buildOnRamp(), NBNodeCont::end(), OptionsCont::getBool(), NBNetBuilder::getDistrictCont(), NBNetBuilder::getEdgeCont(), OptionsCont::getFloat(), NBEdge::getFromNode(), NBNode::getIncomingEdges(), NBNetBuilder::getNodeCont(), NBNode::getOutgoingEdges(), NBEdgeCont::getRoundabouts(), OptionsCont::getStringVector(), NBEdge::getToNode(), OptionsCont::isSet(), mayNeedOffRamp(), mayNeedOnRamp(), NBEdgeCont::retrieve(), SUMOReal, and WRITE_WARNING.
Referenced by NBNetBuilder::compute().
|
staticprivate |
Definition at line 368 of file NBAlgorithms_Ramps.cpp.
Definition at line 356 of file NBAlgorithms_Ramps.cpp.
|
staticprivate |
Checks whether an on-/off-ramp can be bult here.
[in] | potHighway | The highway part to check |
[in] | potRamp | The ramp part to check |
[in] | other | The successor/predecessor edge |
[in] | minHighwaySpeed | The minimum speed limit a highway must have for being a highway |
[in] | maxRampSpeed | The maximum speed limit a ramp must have for being a ramp |
[in] | noramps | Edges that shall not be treated as ramps |
Definition at line 434 of file NBAlgorithms_Ramps.cpp.
References NBEdge::getFromNode(), Named::getID(), NBEdge::getNumLanes(), NBEdge::getSpeed(), NBEdge::getToNode(), hasWrongMode(), NBEdge::isMacroscopicConnector(), NBEdge::isTurningDirectionAt(), MAX3(), and SUMOReal.
Referenced by mayNeedOffRamp(), and mayNeedOnRamp().
|
staticprivate |
Definition at line 407 of file NBAlgorithms_Ramps.cpp.
References NBNode::getEdges(), NBNode::getIncomingEdges(), NBNode::getOutgoingEdges(), and NBContHelper::nextCW().
Referenced by buildOffRamp(), and mayNeedOffRamp().
|
staticprivate |
Definition at line 380 of file NBAlgorithms_Ramps.cpp.
References NBNode::getEdges(), NBNode::getIncomingEdges(), NBNode::getOutgoingEdges(), and NBContHelper::nextCW().
Referenced by buildOnRamp(), and mayNeedOnRamp().
|
staticprivate |
whether the edge has a mode that does not indicate a ramp edge
Definition at line 485 of file NBAlgorithms_Ramps.cpp.
References NBEdge::getNumLanes(), NBEdge::getPermissions(), SVC_BICYCLE, SVC_PASSENGER, and SVC_PEDESTRIAN.
Referenced by fulfillsRampConstraints().
|
staticprivate |
Determines whether the given node may be an off-ramp end.
[in] | cur | The node to check |
[in] | minHighwaySpeed | The minimum speed limit a highway must have for being a highway |
[in] | maxRampSpeed | The maximum speed limit a ramp must have for being a ramp |
[in] | noramps | Edges that shall not be treated as ramps |
Definition at line 148 of file NBAlgorithms_Ramps.cpp.
References fulfillsRampConstraints(), NBNode::getIncomingEdges(), getOffRampEdges(), and NBNode::getOutgoingEdges().
Referenced by computeRamps().
|
staticprivate |
Determines whether the given node may be an on-ramp begin.
[in] | cur | The node to check |
[in] | minHighwaySpeed | The minimum speed limit a highway must have for being a highway |
[in] | maxRampSpeed | The maximum speed limit a ramp must have for being a ramp |
[in] | noramps | Edges that shall not be treated as ramps |
Definition at line 136 of file NBAlgorithms_Ramps.cpp.
References fulfillsRampConstraints(), NBNode::getIncomingEdges(), getOnRampEdges(), and NBNode::getOutgoingEdges().
Referenced by computeRamps().
|
staticprivate |
Moves the ramp to the right, as new lanes were added.
[in] | ramp | The ramp to move |
[in] | addedLanes | The number of added lanes |
Definition at line 339 of file NBAlgorithms_Ramps.cpp.
References NBEdge::getGeometry(), Named::getID(), NBEdge::getLaneSpreadFunction(), NBEdge::getLaneWidth(), LANESPREAD_CENTER, PositionVector::move2side(), NBEdge::setGeometry(), SUMO_const_laneWidth, SUMOReal, NBEdge::UNSPECIFIED_WIDTH, and WRITE_WARNING.
Referenced by buildOffRamp(), and buildOnRamp().
|
static |
suffix for newly generated on-ramp edges
Definition at line 65 of file NBAlgorithms_Ramps.h.
Referenced by buildOnRamp().