Eclipse SUMO - Simulation of Urban MObility
|
class used to calculate paths in nets More...
#include <GNEPathManager.h>
Public Member Functions | |
bool | busStopConnected (const GNEAdditional *busStop, const GNEEdge *edge) const |
check if exist a path between the given busStop and edge (Either a valid lane or an acces) for pedestrians | |
std::vector< GNEEdge * > | calculateDijkstraPath (const SUMOVehicleClass vClass, const std::vector< GNEEdge * > &edges) const |
calculate Dijkstra path between a list of edges (for example, from-via-to edges) | |
std::vector< GNEEdge * > | calculateDijkstraPath (const SUMOVehicleClass vClass, GNEEdge *fromEdge, GNEEdge *toEdge) const |
calculate Dijkstra path between one edge | |
std::vector< GNEEdge * > | calculateDijkstraPath (const SUMOVehicleClass vClass, GNEEdge *fromEdge, GNEJunction *toJunction) const |
calculate Dijkstra path between from edge and to junction | |
std::vector< GNEEdge * > | calculateDijkstraPath (const SUMOVehicleClass vClass, GNEJunction *fromJunction, GNEEdge *toEdge) const |
calculate Dijkstra path between from junction and to edge | |
std::vector< GNEEdge * > | calculateDijkstraPath (const SUMOVehicleClass vClass, GNEJunction *fromJunction, GNEJunction *toJunction) const |
calculate Dijkstra path between two Junctions | |
void | calculateReachability (const SUMOVehicleClass vClass, GNEEdge *originEdge) |
calculate reachability for given edge | |
bool | consecutiveEdgesConnected (const SUMOVehicleClass vClass, const GNEEdge *from, const GNEEdge *to) const |
check if exist a path between the two given consecutive edges for the given VClass | |
void | invalidatePathCalculator () |
invalidate pathCalculator | |
bool | isPathCalculatorUpdated () const |
check if pathCalculator is updated | |
PathCalculator (const GNENet *net) | |
constructor | |
void | updatePathCalculator () |
update DijkstraRouter (needed a good calculation of dijkstra path after modifying network) | |
~PathCalculator () | |
destructor | |
Private Member Functions | |
std::vector< GNEEdge * > | optimizeJunctionPath (const std::vector< GNEEdge * > &edges) const |
optimize junction path | |
Private Attributes | |
SUMOAbstractRouter< NBRouterEdge, NBVehicle > * | myDijkstraRouter |
SUMO Abstract myDijkstraRouter. | |
const GNENet * | myNet |
pointer to net | |
bool | myPathCalculatorUpdated |
flag for checking if path calculator is updated | |
class used to calculate paths in nets
Definition at line 208 of file GNEPathManager.h.
GNEPathManager::PathCalculator::PathCalculator | ( | const GNENet * | net | ) |
constructor
Definition at line 236 of file GNEPathManager.cpp.
References NBEdgeCont::getAllRouterEdges(), NBNetBuilder::getEdgeCont(), GNENet::getNetBuilder(), NBRouterEdge::getTravelTimeStatic(), myDijkstraRouter, and myNet.
GNEPathManager::PathCalculator::~PathCalculator | ( | ) |
destructor
Definition at line 247 of file GNEPathManager.cpp.
bool GNEPathManager::PathCalculator::busStopConnected | ( | const GNEAdditional * | busStop, |
const GNEEdge * | edge | ||
) | const |
check if exist a path between the given busStop and edge (Either a valid lane or an acces) for pedestrians
Definition at line 478 of file GNEPathManager.cpp.
References GNEHierarchicalElement::getChildAdditionals(), GNEEdge::getLanes(), NBEdge::getLaneStruct(), GNEEdge::getNBEdge(), GNEHierarchicalElement::getParentLanes(), GNETagProperties::getTag(), GNEAttributeCarrier::getTagProperty(), NBEdge::Lane::permissions, SUMO_TAG_ACCESS, SUMO_TAG_BUS_STOP, and SVC_PEDESTRIAN.
std::vector< GNEEdge * > GNEPathManager::PathCalculator::calculateDijkstraPath | ( | const SUMOVehicleClass | vClass, |
const std::vector< GNEEdge * > & | edges | ||
) | const |
calculate Dijkstra path between a list of edges (for example, from-via-to edges)
Definition at line 267 of file GNEPathManager.cpp.
References GNENet::getAttributeCarriers(), and GNENetHelper::AttributeCarriers::retrieveEdge().
Referenced by GNEDemandElement::buildMenuCommandRouteLength(), GNEPathManager::calculatePath(), GNEPathManager::calculatePath(), GNEPathManager::calculatePath(), GNEPathManager::calculatePath(), GNEPathManager::calculatePath(), GNERouteHandler::canReverse(), GNERouteHandler::canReverse(), GNEVehicle::computePathElement(), GNEVehicle::isDemandElementValid(), GNEPathCreator::Path::Path(), GNEPathCreator::Path::Path(), GNEPlanCreator::PlanPath::PlanPath(), GNEPlanCreator::PlanPath::PlanPath(), GNEPlanCreator::PlanPath::PlanPath(), GNERouteHandler::transformToRouteFlow(), and GNERouteHandler::transformToVehicle().
std::vector< GNEEdge * > GNEPathManager::PathCalculator::calculateDijkstraPath | ( | const SUMOVehicleClass | vClass, |
GNEEdge * | fromEdge, | ||
GNEEdge * | toEdge | ||
) | const |
calculate Dijkstra path between one edge
Definition at line 332 of file GNEPathManager.cpp.
std::vector< GNEEdge * > GNEPathManager::PathCalculator::calculateDijkstraPath | ( | const SUMOVehicleClass | vClass, |
GNEEdge * | fromEdge, | ||
GNEJunction * | toJunction | ||
) | const |
calculate Dijkstra path between from edge and to junction
Definition at line 338 of file GNEPathManager.cpp.
References GNEJunction::getGNEIncomingEdges().
std::vector< GNEEdge * > GNEPathManager::PathCalculator::calculateDijkstraPath | ( | const SUMOVehicleClass | vClass, |
GNEJunction * | fromJunction, | ||
GNEEdge * | toEdge | ||
) | const |
calculate Dijkstra path between from junction and to edge
Definition at line 355 of file GNEPathManager.cpp.
References GNEJunction::getGNEOutgoingEdges().
std::vector< GNEEdge * > GNEPathManager::PathCalculator::calculateDijkstraPath | ( | const SUMOVehicleClass | vClass, |
GNEJunction * | fromJunction, | ||
GNEJunction * | toJunction | ||
) | const |
calculate Dijkstra path between two Junctions
Definition at line 372 of file GNEPathManager.cpp.
References GNEJunction::getGNEIncomingEdges(), and GNEJunction::getGNEOutgoingEdges().
void GNEPathManager::PathCalculator::calculateReachability | ( | const SUMOVehicleClass | vClass, |
GNEEdge * | originEdge | ||
) |
calculate reachability for given edge
Definition at line 392 of file GNEPathManager.cpp.
References GNENet::getAttributeCarriers(), GNENetHelper::AttributeCarriers::getEdges(), GNEJunction::getGNEOutgoingEdges(), GNEEdge::getLanes(), NBEdge::getLaneStruct(), NBEdge::getLength(), GNEEdge::getNBEdge(), GNEAttributeCarrier::getNet(), NBEdge::getSpeed(), GNEEdge::getToJunction(), SUMOVTypeParameter::VClassDefaultValues::maxSpeed, MIN2(), NBEdge::Lane::permissions, and GNECandidateElement::setReachability().
Referenced by GNEViewNet::onCmdLaneReachability(), GNEPathCreator::setPossibleCandidates(), and GNEPathCreator::setSpecialCandidates().
bool GNEPathManager::PathCalculator::consecutiveEdgesConnected | ( | const SUMOVehicleClass | vClass, |
const GNEEdge * | from, | ||
const GNEEdge * | to | ||
) | const |
check if exist a path between the two given consecutive edges for the given VClass
Definition at line 442 of file GNEPathManager.cpp.
References GNEEdge::getGNEConnections(), GNEEdge::getLanes(), NBEdge::getLaneStruct(), GNEEdge::getNBEdge(), NBEdge::Lane::permissions, and SVC_PEDESTRIAN.
Referenced by GNEVehicle::getDemandElementProblem().
void GNEPathManager::PathCalculator::invalidatePathCalculator | ( | ) |
invalidate pathCalculator
Definition at line 519 of file GNEPathManager.cpp.
Referenced by GNEConnection::setAttribute(), GNECrossing::setAttribute(), GNEEdge::setAttribute(), GNEJunction::setAttribute(), and GNELane::setAttribute().
bool GNEPathManager::PathCalculator::isPathCalculatorUpdated | ( | ) | const |
check if pathCalculator is updated
Definition at line 513 of file GNEPathManager.cpp.
Referenced by GNENet::computeDemandElements(), GNEApplicationWindow::onCmdComputePathManager(), and GNEApplicationWindow::onUpdComputePathManager().
|
private |
optimize junction path
Definition at line 525 of file GNEPathManager.cpp.
void GNEPathManager::PathCalculator::updatePathCalculator | ( | ) |
update DijkstraRouter (needed a good calculation of dijkstra path after modifying network)
Definition at line 253 of file GNEPathManager.cpp.
References NBRouterEdge::getTravelTimeStatic().
Referenced by GNENet::computeDemandElements(), and GNEApplicationWindow::onCmdComputePathManager().
|
private |
SUMO Abstract myDijkstraRouter.
Definition at line 260 of file GNEPathManager.h.
Referenced by PathCalculator().
|
private |
|
private |
flag for checking if path calculator is updated
Definition at line 257 of file GNEPathManager.h.