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, std::set< NBEdge * > &incremented) |
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, std::set< NBEdge * > &incremented) |
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) |
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 | mayNeedOffRamp (NBNode *cur, SUMOReal minHighwaySpeed, SUMOReal maxRampSpeed) |
Determines whether the given node may be an off-ramp end. More... | |
static bool | mayNeedOnRamp (NBNode *cur, SUMOReal minHighwaySpeed, SUMOReal maxRampSpeed) |
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 |
in,filled] | incremented The list of edges which lane number was already incremented |
Definition at line 235 of file NBAlgorithms_Ramps.cpp.
References NBEdge::addLane2LaneConnections(), NBEdge::getFromNode(), NBEdge::getGeometry(), Named::getID(), NBNode::getIncomingEdges(), NBEdge::getLaneShape(), NBEdge::getLength(), NBEdge::getNumLanes(), getOffRampEdges(), NBEdge::incLaneNo(), NBNodeCont::insert(), NBEdge::invalidateConnections(), NBEdge::isTurningDirectionAt(), NBEdge::L2L_VALIDATED, PositionVector::length(), MIN2(), moveRampRight(), PositionVector::pop_front(), POSITION_EPS, PositionVector::positionAtOffset(), PositionVector::push_front(), 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 |
in,filled] | incremented The list of edges which lane number was already incremented |
Definition at line 144 of file NBAlgorithms_Ramps.cpp.
References ADDED_ON_RAMP_EDGE, NBEdge::addLane2LaneConnections(), NBEdge::getGeometry(), Named::getID(), NBEdge::getLaneShape(), NBEdge::getLength(), NBEdge::getNumLanes(), getOnRampEdges(), NBNode::getOutgoingEdges(), NBEdge::getToNode(), NBEdge::incLaneNo(), NBNodeCont::insert(), NBEdge::invalidateConnections(), NBEdge::isTurningDirectionAt(), NBEdge::L2L_VALIDATED, PositionVector::length(), MIN2(), moveRampRight(), POSITION_EPS, PositionVector::positionAtOffset(), PositionVector::push_back(), NBEdgeCont::retrieve(), NBEdge::setGeometry(), NBEdgeCont::splitAt(), SUMOReal, WRITE_ERROR, and WRITE_WARNING.
Referenced by computeRamps().
|
static |
Computes highway on-/off-ramps (if wished)
in,changed] | nb The network builder which contains the current network representation | |
[in] | oc | The options container |
Definition at line 59 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(), OptionsCont::getStringVector(), NBEdge::getToNode(), OptionsCont::isSet(), mayNeedOffRamp(), mayNeedOnRamp(), NBEdgeCont::retrieve(), SUMOReal, and WRITE_WARNING.
Referenced by NBNetBuilder::compute().
|
staticprivate |
Definition at line 354 of file NBAlgorithms_Ramps.cpp.
Definition at line 342 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 |
Definition at line 420 of file NBAlgorithms_Ramps.cpp.
References NBEdge::getFromNode(), NBEdge::getNumLanes(), NBEdge::getPermissions(), NBEdge::getSpeed(), NBEdge::getToNode(), NBEdge::isMacroscopicConnector(), isRailway(), NBEdge::isTurningDirectionAt(), MAX3(), and SUMOReal.
Referenced by mayNeedOffRamp(), and mayNeedOnRamp().
|
staticprivate |
Definition at line 393 of file NBAlgorithms_Ramps.cpp.
References NBNode::getEdges(), NBNode::getIncomingEdges(), NBNode::getOutgoingEdges(), and NBContHelper::nextCW().
Referenced by buildOffRamp(), and mayNeedOffRamp().
|
staticprivate |
Definition at line 366 of file NBAlgorithms_Ramps.cpp.
References NBNode::getEdges(), NBNode::getIncomingEdges(), NBNode::getOutgoingEdges(), and NBContHelper::nextCW().
Referenced by buildOnRamp(), and mayNeedOnRamp().
|
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 |
Definition at line 132 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 |
Definition at line 120 of file NBAlgorithms_Ramps.cpp.
References fulfillsRampConstraints(), NBNode::getIncomingEdges(), getOnRampEdges(), and NBNode::getOutgoingEdges().
Referenced by computeRamps().
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 326 of file NBAlgorithms_Ramps.cpp.
References NBEdge::getGeometry(), Named::getID(), NBEdge::getLaneSpreadFunction(), LANESPREAD_CENTER, PositionVector::move2side(), NBEdge::setGeometry(), SUMO_const_halfLaneAndOffset, SUMO_const_laneWidthAndOffset, SUMOReal, 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().