80 if (additional->getTagProperty()->isStoppingPlace()) {
81 stoppingPlaces.push_back(additional);
84 return stoppingPlaces;
92 if (additional->getTagProperty()->isTAZElement()) {
93 TAZs.push_back(additional);
156 std::vector<std::string> solution;
163 solution.push_back(edge->getID());
165 if (edge == currentElement) {
166 solution.push_back(newNextElement->
getID());
175 solution.push_back(lane->getID());
177 if (lane == currentElement) {
178 solution.push_back(newNextElement->
getID());
183 solution.erase(std::unique(solution.begin(), solution.end()), solution.end());
192 std::vector<std::pair<std::pair<double, double>,
GNEAdditional*> > sortedChildren;
195 sortedChildren.push_back(std::make_pair(std::make_pair(0., 0.), meanData));
197 if (meanData->getTagProperty()->hasAttribute(
SUMO_ATTR_TIME) && GNEAttributeCarrier::canParse<double>(meanData->getAttribute(
SUMO_ATTR_TIME))) {
199 }
else if (meanData->getTagProperty()->hasAttribute(
SUMO_ATTR_BEGIN) && GNEAttributeCarrier::canParse<double>(meanData->getAttribute(
SUMO_ATTR_BEGIN))) {
200 sortedChildren.back().first.first = meanData->getAttributeDouble(
SUMO_ATTR_BEGIN);
203 if (meanData->getTagProperty()->hasAttribute(
SUMO_ATTR_END) && GNEAttributeCarrier::canParse<double>(meanData->getAttribute(
SUMO_ATTR_END))) {
204 sortedChildren.back().first.second = meanData->getAttributeDouble(
SUMO_ATTR_END);
206 sortedChildren.back().first.second = sortedChildren.back().first.first;
210 std::sort(sortedChildren.begin(), sortedChildren.end());
213 if (sortedChildren.size() <= 1) {
217 for (
int i = 0; i < (int)sortedChildren.size() - 1; i++) {
218 if (sortedChildren.at(i).first.second > sortedChildren.at(i + 1).first.first) {
225 throw ProcessError(
TL(
"Some child meanData were lost during sorting"));
std::set< ChildType > GNEHierarchicalContainerChildrenSet
std::vector< ChildType > GNEHierarchicalContainerChildren
std::vector< ParentType > GNEHierarchicalContainerParents
@ SUMO_TAG_LANE
begin/end of the description of a single lane
@ SUMO_TAG_EDGE
begin/end of the description of an edge
@ SUMO_ATTR_BEGIN
weights: time range begin
@ SUMO_ATTR_END
weights: time range end
@ SUMO_ATTR_TIME
trigger: the time of the step
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
virtual double getAttributeDouble(SumoXMLAttr key) const =0
const std::string getID() const
get ID (all Attribute Carriers have one)
const GNETagProperties * getTagProperty() const
get tagProperty associated with this Attribute Carrier
A road/street connecting two junctions (netedit-version)
const GNEHierarchicalContainerChildren< GNEEdge * > & getChildEdges() const
get child edges
GNEHierarchicalStructureChildren myHierarchicalStructureChildren
hierarchical structure with children
const GNEHierarchicalContainerParents< GNEAdditional * > & getParentAdditionals() const
get parent additionals
const GNEHierarchicalContainerParents< GNEDemandElement * > & getParentDemandElements() const
get parent demand elements
const GNEHierarchicalContainerParents< GNEEdge * > & getParentEdges() const
get parent edges
const GNEHierarchicalContainerChildren< GNEGenericData * > & getChildGenericDatas() const
return child generic data elements
GNEHierarchicalElement()
default Constructor
const GNEHierarchicalContainerChildren< GNELane * > & getChildLanes() const
get child lanes
const GNEHierarchicalContainerParents< GNEGenericData * > & getParentGenericDatas() const
get parent demand elements
~GNEHierarchicalElement()
Destructor.
const GNEHierarchicalContainerChildren< GNEAdditional * > & getChildAdditionals() const
return child additionals
bool checkChildAdditionalsOverlapping() const
check if children are overlapped (Used by Rerouters)
const GNEHierarchicalContainerChildrenSet< GNETAZSourceSink * > & getChildTAZSourceSinks() const
return child TAZSourceSinks (Set)
bool checkChildDemandElementsOverlapping() const
check if child demand elements are overlapped
const GNEHierarchicalContainerChildren< GNEJunction * > & getChildJunctions() const
get child junctions
GNEHierarchicalStructureParents myHierarchicalStructureParents
hierarchical structure with parents
const GNEHierarchicalContainerParents< GNEJunction * > & getParentJunctions() const
get parent junctions
const GNEHierarchicalContainerParents< GNELane * > & getParentLanes() const
get parent lanes
const GNEHierarchicalStructureParents getParents() const
get parents(used in GNE_Change)
const GNEHierarchicalContainerParents< GNEAdditional * > getParentStoppingPlaces() const
get parent stoppingPlaces (used by plans)
const GNEHierarchicalContainerChildren< GNEDemandElement * > & getChildDemandElements() const
return child demand elements
std::string getNewListOfParents(const GNENetworkElement *currentElement, const GNENetworkElement *newNextElement) const
if use edge/parent lanes as a list of consecutive elements, obtain a list of IDs of elements after in...
void clearParents()
clear hierarchical structure parents (used in GNE_Change)
const GNEHierarchicalContainerParents< GNEAdditional * > getParentTAZs() const
get parent TAZs (used by plans)
const GNEHierarchicalContainerChildren< ChildType > & get() const
get children
const GNEHierarchicalContainerChildrenSet< ChildType > & getSet() const
get children (set)
Hierarchical structure used for keep parents.
void clear()
clear container
const GNEHierarchicalContainerParents< ParentType > & get() const
get parents
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property