![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <NBAlgorithms_Ramps.h>
Static Public Member Functions | |
static void | computeRamps (NBNetBuilder &nb, OptionsCont &oc, bool mayAddOrRemove) |
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, double rampLength, bool dontSplit, bool addLanes, const std::set< NBNode *, ComparatorIdLess > &potOnRamps) |
Builds an off-ramp ending at the given node. More... | |
static void | buildOnRamp (NBNode *cur, NBNodeCont &nc, NBEdgeCont &ec, NBDistrictCont &dc, double rampLength, bool dontSplit, bool addLanes) |
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, double minHighwaySpeed, double 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, double minHighwaySpeed, double maxRampSpeed, const std::set< std::string > &noramps) |
Determines whether the given node may be an off-ramp end. More... | |
static bool | mayNeedOnRamp (NBNode *cur, double minHighwaySpeed, double maxRampSpeed, const std::set< std::string > &noramps, double minWeaveLength) |
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... | |
static void | patchRampGeometry (NBEdge *potRamp, NBEdge *first, NBEdge *potHighway, bool onRamp) |
shift ramp geometry to merge smoothly with the motorway More... | |
Definition at line 46 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 290 of file NBAlgorithms_Ramps.cpp.
References NBEdge::addLane2LaneConnections(), DEBUGCOND, NBEdge::getFromNode(), NBEdge::getGeometry(), NBEdge::getID(), Named::getID(), NBNode::getIncomingEdges(), NBEdge::getLoadedLength(), NBEdge::getNumLanes(), getOffRampEdges(), getOnRampEdges(), NBNode::getOutgoingEdges(), NBEdge::getStep(), NBEdge::getToNode(), NBEdge::incLaneNo(), NBNodeCont::insert(), NBEdge::invalidateConnections(), NBEdge::isTurningDirectionAt(), NBEdge::LANES2LANES_USER, PositionVector::length(), NBEdge::markOffRamp(), MIN2(), moveRampRight(), OFFRAMP_LOOKBACK, patchRampGeometry(), PositionVector::positionAtOffset(), NBEdgeCont::retrieve(), NBEdgeCont::splitAt(), NBEdge::VALIDATED, 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 185 of file NBAlgorithms_Ramps.cpp.
References ADDED_ON_RAMP_EDGE, NBEdge::addLane2LaneConnections(), DEBUGCOND, NBEdge::getGeometry(), NBEdge::getID(), Named::getID(), NBNode::getIncomingEdges(), NBEdge::getNumLanes(), getOnRampEdges(), NBNode::getOutgoingEdges(), NBEdge::getStep(), NBEdge::getToNode(), NBEdge::incLaneNo(), NBNodeCont::insert(), NBEdge::invalidateConnections(), NBEdge::isTurningDirectionAt(), NBEdge::LANES2LANES_USER, PositionVector::length(), MIN2(), moveRampRight(), patchRampGeometry(), PositionVector::positionAtOffset(), NBEdgeCont::retrieve(), NBEdge::setAcceleration(), NBEdgeCont::splitAt(), NBEdge::VALIDATED, 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 52 of file NBAlgorithms_Ramps.cpp.
References NBParkingCont::addEdges2Keep(), NBPTLineCont::addEdges2Keep(), NBPTStopCont::addEdges2Keep(), NBEdgeCont::begin(), NBNodeCont::begin(), buildOffRamp(), buildOnRamp(), NBEdgeCont::end(), NBNodeCont::end(), OptionsCont::getBool(), NBNetBuilder::getDistrictCont(), NBNetBuilder::getEdgeCont(), OptionsCont::getFloat(), NBEdge::getFromNode(), NBNode::getIncomingEdges(), NBNetBuilder::getNodeCont(), NBNode::getOutgoingEdges(), NBNetBuilder::getParkingCont(), NBNetBuilder::getPTLineCont(), NBNetBuilder::getPTStopCont(), NBEdgeCont::getRoundabouts(), OptionsCont::getStringVector(), NBEdge::getToNode(), OptionsCont::isSet(), mayNeedOffRamp(), mayNeedOnRamp(), NBEdgeCont::retrieve(), and WRITE_WARNING.
Referenced by NBNetBuilder::compute().
|
staticprivate |
Definition at line 433 of file NBAlgorithms_Ramps.cpp.
Definition at line 421 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 507 of file NBAlgorithms_Ramps.cpp.
References NBEdge::getAngleAtNode(), NBEdge::getFromNode(), NBEdge::getID(), NBEdge::getNumLanes(), NBEdge::getSpeed(), NBEdge::getToNode(), NBNode::getType(), hasWrongMode(), NBEdge::isMacroscopicConnector(), NBNode::isTrafficLight(), NBEdge::isTurningDirectionAt(), MAX3(), and NBHelpers::relAngle().
Referenced by mayNeedOffRamp(), and mayNeedOnRamp().
|
staticprivate |
Definition at line 469 of file NBAlgorithms_Ramps.cpp.
References DEBUGCOND, NBNode::getEdges(), NBNode::getIncomingEdges(), NBNode::getOutgoingEdges(), NBContHelper::nextCW(), and toString().
Referenced by buildOffRamp(), and mayNeedOffRamp().
|
staticprivate |
Definition at line 445 of file NBAlgorithms_Ramps.cpp.
References NBNode::getIncomingEdges(), and NBNode::getOutgoingEdges().
Referenced by buildOffRamp(), buildOnRamp(), and mayNeedOnRamp().
|
staticprivate |
whether the edge has a mode that does not indicate a ramp edge
Definition at line 573 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 173 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 |
[in] | minWeaveLength | The minimum length for weaving areas |
Definition at line 146 of file NBAlgorithms_Ramps.cpp.
References fulfillsRampConstraints(), NBNode::getIncomingEdges(), NBEdge::getLength(), getOnRampEdges(), NBNode::getOutgoingEdges(), and NBEdge::getToNode().
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 404 of file NBAlgorithms_Ramps.cpp.
References CENTER, NBEdge::getGeometry(), NBEdge::getID(), NBEdge::getLaneSpreadFunction(), NBEdge::getLaneWidth(), PositionVector::move2side(), NBEdge::setGeometry(), SUMO_const_laneWidth, NBEdge::UNSPECIFIED_WIDTH, and WRITE_WARNING.
Referenced by buildOffRamp(), and buildOnRamp().
|
staticprivate |
shift ramp geometry to merge smoothly with the motorway
Definition at line 588 of file NBAlgorithms_Ramps.cpp.
References CENTER, NBEdge::getFromNode(), NBEdge::getGeometry(), NBEdge::getLaneShape(), NBEdge::getLaneSpreadFunction(), NBEdge::getLaneWidth(), NBEdge::getNumLanes(), NBEdge::getToNode(), NBEdge::hasDefaultGeometryEndpointAtNode(), NBEdge::hasDefaultGeometryEndpoints(), MAX2(), MIN2(), PositionVector::move2side(), NBEdge::resetLaneShapes(), RIGHT, and NBEdge::setGeometry().
Referenced by buildOffRamp(), and buildOnRamp().
|
static |
suffix for newly generated on-ramp edges
Definition at line 55 of file NBAlgorithms_Ramps.h.
Referenced by buildOnRamp().