Eclipse SUMO - Simulation of Urban MObility
GNEAdditionalHandler.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2020 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials are made available under the
5 // terms of the Eclipse Public License 2.0 which is available at
6 // https://www.eclipse.org/legal/epl-2.0/
7 // This Source Code may also be made available under the following Secondary
8 // Licenses when the conditions for such availability set forth in the Eclipse
9 // Public License 2.0 are satisfied: GNU General Public License, version 2
10 // or later which is available at
11 // https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12 // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13 /****************************************************************************/
18 // Builds additional objects for netedit
19 /****************************************************************************/
20 #pragma once
21 #include <config.h>
22 
27 
28 
29 // ===========================================================================
30 // class declarations
31 // ===========================================================================
32 
33 class GNENet;
34 class GNEEdge;
35 class GNELane;
36 class GNEAdditional;
37 class GNEShape;
38 class GNETAZElement;
39 class GNEDemandElement;
40 
41 // ===========================================================================
42 // class definitions
43 // ===========================================================================
44 
48 public:
49 
52 
53  public:
55  void insertElement(SumoXMLTag tag);
56 
58  void commitAdditionalInsertion(GNEAdditional* additionalCreated);
59 
61  void commitShapeInsertion(GNEShape* shapeCreated);
62 
64  void commitTAZElementInsertion(GNETAZElement* TAZElementCreated);
65 
67  void popElement();
68 
70  GNEAdditional* getAdditionalParent(GNENet* net, SumoXMLTag expectedTag) const;
71 
73  GNEShape* getShapeParent(GNENet* net, SumoXMLTag expectedTag) const;
74 
76  GNETAZElement* getTAZElementParent(GNENet* net, SumoXMLTag expectedTag) const;
77 
80 
83 
86 
87  private:
89  struct StackElement {
92 
95 
98 
101 
104  };
105 
107  std::vector<StackElement> myInsertedElements;
108  };
109 
111  GNEAdditionalHandler(const std::string& file, GNENet* net, GNEAdditional* additionalParent = nullptr);
112 
115 
118 
124  void myStartElement(int element, const SUMOSAXAttributes& attrs);
125 
131  void myEndElement(int element);
132 
138  Position getLanePos(const std::string& poiID, const std::string& laneID, double lanePos, double lanePosLat);
140 
145 
153  static bool buildAdditional(GNENet* net, bool allowUndoRedo, SumoXMLTag tag, const SUMOSAXAttributes& attrs, LastInsertedElement* insertedAdditionals);
154 
169  static GNEAdditional* buildBusStop(GNENet* net, bool allowUndoRedo, const std::string& id, GNELane* lane,
170  const double startPos, const double endPos, const int parametersSet,
171  const std::string& name, const std::vector<std::string>& lines, int personCapacity, double parkingLength,
172  bool friendlyPosition, bool blockMovement);
173 
186  static GNEAdditional* buildAccess(GNENet* net, bool allowUndoRedo, GNEAdditional* busStop, GNELane* lane, double pos, const std::string& length, bool friendlyPos, bool blockMovement);
187 
202  static GNEAdditional* buildContainerStop(GNENet* net, bool allowUndoRedo, const std::string& id, GNELane* lane, const double startPos, const double endPos, const int parametersSet,
203  const std::string& name, const std::vector<std::string>& lines, bool friendlyPosition, bool blockMovement);
204 
222  static GNEAdditional* buildChargingStation(GNENet* net, bool allowUndoRedo, const std::string& id, GNELane* lane, const double startPos, const double endPos, const int parametersSet,
223  const std::string& name, double chargingPower, double efficiency, bool chargeInTransit, SUMOTime chargeDelay, bool friendlyPosition, bool blockMovement);
224 
242  static GNEAdditional* buildParkingArea(GNENet* net, bool allowUndoRedo, const std::string& id, GNELane* lane, const double startPos, const double endPos, const int parametersSet,
243  const std::string& name, bool friendlyPosition, int roadSideCapacity, bool onRoad, double width, const std::string& length, double angle, bool blockMovement);
244 
257  static GNEAdditional* buildParkingSpace(GNENet* net, bool allowUndoRedo, GNEAdditional* parkingAreaParent, Position pos, double width, double length, double angle, bool blockMovement);
258 
274  static GNEAdditional* buildDetectorE1(GNENet* net, bool allowUndoRedo, const std::string& id, GNELane* lane, double pos, SUMOTime freq, const std::string& filename,
275  const std::string& vehicleTypes, const std::string& name, bool friendlyPos, bool blockMovement);
276 
297  static GNEAdditional* buildSingleLaneDetectorE2(GNENet* net, bool allowUndoRedo, const std::string& id, GNELane* lane, double pos, double length, const std::string& freq, const std::string& trafficLight,
298  const std::string& filename, const std::string& vehicleTypes, const std::string& name, SUMOTime timeThreshold, double speedThreshold,
299  double jamThreshold, bool friendlyPos, bool blockMovement);
300 
321  static GNEAdditional* buildMultiLaneDetectorE2(GNENet* net, bool allowUndoRedo, const std::string& id, const std::vector<GNELane*>& lanes, double pos, double endPos, const std::string& freq, const std::string& trafficLight,
322  const std::string& filename, const std::string& vehicleTypes, const std::string& name, SUMOTime timeThreshold, double speedThreshold, double jamThreshold,
323  bool friendlyPos, bool blockMovement);
324 
340  static GNEAdditional* buildDetectorE3(GNENet* net, bool allowUndoRedo, const std::string& id, Position pos, SUMOTime freq, const std::string& filename, const std::string& vehicleTypes, const std::string& name, SUMOTime timeThreshold, double speedThreshold, bool blockMovement);
341 
353  static GNEAdditional* buildDetectorEntry(GNENet* net, bool allowUndoRedo, GNEAdditional* E3Parent, GNELane* lane, double pos, bool friendlyPos, bool blockMovement);
354 
366  static GNEAdditional* buildDetectorExit(GNENet* net, bool allowUndoRedo, GNEAdditional* E3Parent, GNELane* lane, double pos, bool friendlyPos, bool blockMovement);
367 
382  static GNEAdditional* buildDetectorE1Instant(GNENet* net, bool allowUndoRedo, const std::string& id, GNELane* lane, double pos, const std::string& filename, const std::string& vehicleTypes, const std::string& name, bool friendlyPos, bool blockMovement);
383 
398  static GNEAdditional* buildCalibrator(GNENet* net, bool allowUndoRedo, const std::string& id, GNELane* lane, double pos, const std::string& name, const std::string& outfile, SUMOTime freq, const std::string& routeprobe, bool centerAfterCreation);
399 
415  static GNEAdditional* buildCalibrator(GNENet* net, bool allowUndoRedo, const std::string& id, GNEEdge* edge, double pos, const std::string& name, const std::string& outfile, SUMOTime freq, const std::string& routeprobe, bool centerAfterCreation);
416 
442  static GNEAdditional* buildCalibratorFlow(GNENet* net, bool allowUndoRedo, GNEAdditional* calibratorParent, GNEDemandElement* route, GNEDemandElement* vType,
443  const std::string& vehsPerHour, const std::string& speed, const RGBColor& color, const std::string& departLane, const std::string& departPos,
444  const std::string& departSpeed, const std::string& arrivalLane, const std::string& arrivalPos, const std::string& arrivalSpeed,
445  const std::string& line, int personNumber, int containerNumber, bool reroute, const std::string& departPosLat,
446  const std::string& arrivalPosLat, SUMOTime begin, SUMOTime end);
447 
460  static GNEAdditional* buildRerouter(GNENet* net, bool allowUndoRedo, const std::string& id, Position pos, const std::vector<GNEEdge*>& edges, double prob, const std::string& name, const std::string& file, bool off, SUMOTime timeThreshold, const std::string& vTypes, bool blockMovement);
461 
470  static GNEAdditional* buildRerouterInterval(GNENet* net, bool allowUndoRedo, GNEAdditional* rerouterParent, SUMOTime begin, SUMOTime end);
471 
475  static GNEAdditional* buildClosingLaneReroute(GNENet* net, bool allowUndoRedo, GNEAdditional* rerouterIntervalParent, GNELane* closedLane, SVCPermissions permissions);
476 
480  static GNEAdditional* buildClosingReroute(GNENet* net, bool allowUndoRedo, GNEAdditional* rerouterIntervalParent, GNEEdge* closedEdge, SVCPermissions permissions);
481 
485  static GNEAdditional* builDestProbReroute(GNENet* net, bool allowUndoRedo, GNEAdditional* rerouterIntervalParent, GNEEdge* newEdgeDestination, double probability);
486 
490  static GNEAdditional* builParkingAreaReroute(GNENet* net, bool allowUndoRedo, GNEAdditional* rerouterIntervalParent, GNEAdditional* newParkignArea, double probability, bool visible);
491 
495  static GNEAdditional* buildRouteProbReroute(GNENet* net, bool allowUndoRedo, GNEAdditional* rerouterIntervalParent, const std::string& newRouteId, double probability);
496 
510  static GNEAdditional* buildRouteProbe(GNENet* net, bool allowUndoRedo, const std::string& id, GNEEdge* edge, const std::string& freq, const std::string& name, const std::string& file, SUMOTime begin, bool centerAfterCreation);
511 
522  static GNEAdditional* buildVariableSpeedSign(GNENet* net, bool allowUndoRedo, const std::string& id, Position pos, const std::vector<GNELane*>& destLanes, const std::string& name, bool blockMovement);
523 
533  static GNEAdditional* buildVariableSpeedSignStep(GNENet* net, bool allowUndoRedo, GNEAdditional* VSSParent, double time, double speed);
534 
546  static GNEAdditional* buildVaporizer(GNENet* net, bool allowUndoRedo, GNEEdge* edge, SUMOTime start, SUMOTime endTime, const std::string& name, bool centerAfterCreation);
547 
558  static GNETAZElement* buildTAZ(GNENet* net, bool allowUndoRedo, const std::string& id, const PositionVector& shape, const RGBColor& color, const std::vector<GNEEdge*>& edges, bool blockMovement);
559 
569  static GNETAZElement* buildTAZSource(GNENet* net, bool allowUndoRedo, GNETAZElement* TAZ, GNEEdge* edge, double departWeight);
570 
580  static GNETAZElement* buildTAZSink(GNENet* net, bool allowUndoRedo, GNETAZElement* TAZ, GNEEdge* edge, double arrivalWeight);
581 
589  double getPosition(double pos, GNELane& lane, bool friendlyPos, const std::string& additionalID);
590 
597  static bool checkAndFixDetectorPosition(double& pos, const double laneLength, const bool friendlyPos);
598 
606  static bool fixE2DetectorPosition(double& pos, double& length, const double laneLength, const bool friendlyPos);
607 
609  static bool accessCanBeCreated(GNEAdditional* busStopParent, GNEEdge* edge);
610 
612  static bool checkOverlappingRerouterIntervals(GNEAdditional* rerouter, SUMOTime newBegin, SUMOTime newEnd);
613 
614 protected:
620 
623  static bool parseAndBuildVaporizer(GNENet* net, bool allowUndoRedo, const SUMOSAXAttributes& attrs, LastInsertedElement* insertedAdditionals);
624 
628  static bool parseAndBuildTAZ(GNENet* net, bool allowUndoRedo, const SUMOSAXAttributes& attrs, LastInsertedElement* insertedAdditionals);
629 
633  static bool parseAndBuildTAZSource(GNENet* net, bool allowUndoRedo, const SUMOSAXAttributes& attrs, LastInsertedElement* insertedAdditionals);
634 
638  static bool parseAndBuildTAZSink(GNENet* net, bool allowUndoRedo, const SUMOSAXAttributes& attrs, LastInsertedElement* insertedAdditionals);
639 
643  static bool parseAndBuildVariableSpeedSign(GNENet* net, bool allowUndoRedo, const SUMOSAXAttributes& attrs, LastInsertedElement* insertedAdditionals);
644 
648  static bool parseAndBuildVariableSpeedSignStep(GNENet* net, bool allowUndoRedo, const SUMOSAXAttributes& attrs, LastInsertedElement* insertedAdditionals);
649 
653  static bool parseAndBuildRerouter(GNENet* net, bool allowUndoRedo, const SUMOSAXAttributes& attrs, LastInsertedElement* insertedAdditionals);
654 
658  static bool parseAndBuildRerouterInterval(GNENet* net, bool allowUndoRedo, const SUMOSAXAttributes& attrs, LastInsertedElement* insertedAdditionals);
659 
663  static bool parseAndBuildRerouterClosingLaneReroute(GNENet* net, bool allowUndoRedo, const SUMOSAXAttributes& attrs, LastInsertedElement* insertedAdditionals);
664 
668  static bool parseAndBuildRerouterClosingReroute(GNENet* net, bool allowUndoRedo, const SUMOSAXAttributes& attrs, LastInsertedElement* insertedAdditionals);
669 
673  static bool parseAndBuildRerouterDestProbReroute(GNENet* net, bool allowUndoRedo, const SUMOSAXAttributes& attrs, LastInsertedElement* insertedAdditionals);
674 
678  static bool parseAndBuildRerouterParkingAreaReroute(GNENet* net, bool allowUndoRedo, const SUMOSAXAttributes& attrs, LastInsertedElement* insertedAdditionals);
679 
683  static bool parseAndBuildRerouterRouteProbReroute(GNENet* net, bool allowUndoRedo, const SUMOSAXAttributes& attrs, LastInsertedElement* insertedAdditionals);
684 
688  static bool parseAndBuildBusStop(GNENet* net, bool allowUndoRedo, const SUMOSAXAttributes& attrs, LastInsertedElement* insertedAdditionals);
689 
693  static bool parseAndBuildAccess(GNENet* net, bool allowUndoRedo, const SUMOSAXAttributes& attrs, LastInsertedElement* insertedAdditionals);
694 
698  static bool parseAndBuildContainerStop(GNENet* net, bool allowUndoRedo, const SUMOSAXAttributes& attrs, LastInsertedElement* insertedAdditionals);
699 
703  static bool parseAndBuildChargingStation(GNENet* net, bool allowUndoRedo, const SUMOSAXAttributes& attrs, LastInsertedElement* insertedAdditionals);
704 
708  static bool parseAndBuildParkingArea(GNENet* net, bool allowUndoRedo, const SUMOSAXAttributes& attrs, LastInsertedElement* insertedAdditionals);
709 
714  static bool parseAndBuildParkingSpace(GNENet* net, bool allowUndoRedo, const SUMOSAXAttributes& attrs, LastInsertedElement* insertedAdditionals);
715 
720  static bool parseAndBuildCalibrator(GNENet* net, bool allowUndoRedo, const SUMOSAXAttributes& attrs, LastInsertedElement* insertedAdditionals);
721 
725  static bool parseAndBuildDetectorE1(GNENet* net, bool allowUndoRedo, const SUMOSAXAttributes& attrs, LastInsertedElement* insertedAdditionals);
726 
730  static bool parseAndBuildDetectorE2(GNENet* net, bool allowUndoRedo, const SUMOSAXAttributes& attrs, LastInsertedElement* insertedAdditionals);
731 
735  static bool parseAndBuildDetectorE3(GNENet* net, bool allowUndoRedo, const SUMOSAXAttributes& attrs, LastInsertedElement* insertedAdditionals);
736 
740  static bool parseAndBuildDetectorEntry(GNENet* net, bool allowUndoRedo, const SUMOSAXAttributes& attrs, LastInsertedElement* insertedAdditionals);
741 
745  static bool parseAndBuildDetectorExit(GNENet* net, bool allowUndoRedo, const SUMOSAXAttributes& attrs, LastInsertedElement* insertedAdditionals);
746 
750  static bool parseAndBuildDetectorE1Instant(GNENet* net, bool allowUndoRedo, const SUMOSAXAttributes& attrs, LastInsertedElement* insertedAdditionals);
751 
755  static bool parseAndBuildRouteProbe(GNENet* net, bool allowUndoRedo, const SUMOSAXAttributes& attrs, LastInsertedElement* insertedAdditionals);
756 
760  static bool parseAndBuildCalibratorFlow(GNENet* net, bool allowUndoRedo, const SUMOSAXAttributes& attrs, LastInsertedElement* insertedAdditionals);
761 
763 
764 private:
768  void parseAndBuildPoly(const SUMOSAXAttributes& attrs);
769 
773  void parseAndBuildPOI(const SUMOSAXAttributes& attrs);
774 
778  void parseParameter(const SUMOSAXAttributes& attrs);
779 
782 
785 
788 
791 };
792 
793 
long long int SUMOTime
Definition: SUMOTime.h:31
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
SumoXMLTag
Numbers representing SUMO-XML - element names.
Stack used to save the last inserted element.
std::vector< StackElement > myInsertedElements
vector used as stack
GNEShape * getLastInsertedShape() const
return last inserted shape
GNETAZElement * getTAZElementParent(GNENet *net, SumoXMLTag expectedTag) const
retrieve parent TAZElement correspond to current status of myInsertedElements
void commitTAZElementInsertion(GNETAZElement *TAZElementCreated)
commit TAZElement element insertion (used to save last correct created element)
GNETAZElement * getLastInsertedTAZElement() const
return last inserted TAZElement
GNEAdditional * getLastInsertedAdditional() const
return last inserted additional
void commitAdditionalInsertion(GNEAdditional *additionalCreated)
commit additional element insertion (used to save last correct created element)
void commitShapeInsertion(GNEShape *shapeCreated)
commit shape element insertion (used to save last correct created element)
void popElement()
pop last inserted element (used only in function myEndElement)
GNEShape * getShapeParent(GNENet *net, SumoXMLTag expectedTag) const
retrieve parent shape correspond to current status of myInsertedElements
void insertElement(SumoXMLTag tag)
insert new element (called only in function myStartElement)
GNEAdditional * getAdditionalParent(GNENet *net, SumoXMLTag expectedTag) const
retrieve parent additional correspond to current status of myInsertedElements
Builds additional objects for GNENet (busStops, chargingStations, detectors, etc.....
static bool checkOverlappingRerouterIntervals(GNEAdditional *rerouter, SUMOTime newBegin, SUMOTime newEnd)
check if an overlapping is produced in rerouter if a interval with certain begin and end is inserted
static bool checkAndFixDetectorPosition(double &pos, const double laneLength, const bool friendlyPos)
check if the position of a detector over a lane is valid
static bool parseAndBuildTAZSource(GNENet *net, bool allowUndoRedo, const SUMOSAXAttributes &attrs, LastInsertedElement *insertedAdditionals)
Builds a TAZ Source.
static bool parseAndBuildRerouterClosingLaneReroute(GNENet *net, bool allowUndoRedo, const SUMOSAXAttributes &attrs, LastInsertedElement *insertedAdditionals)
Parses his values and builds a Closing Lane reroute.
static bool parseAndBuildTAZSink(GNENet *net, bool allowUndoRedo, const SUMOSAXAttributes &attrs, LastInsertedElement *insertedAdditionals)
Builds a TAZ Sink.
static GNEAdditional * buildMultiLaneDetectorE2(GNENet *net, bool allowUndoRedo, const std::string &id, const std::vector< GNELane * > &lanes, double pos, double endPos, const std::string &freq, const std::string &trafficLight, const std::string &filename, const std::string &vehicleTypes, const std::string &name, SUMOTime timeThreshold, double speedThreshold, double jamThreshold, bool friendlyPos, bool blockMovement)
Builds a multi-lane Area Detector (E2)
static GNEAdditional * buildChargingStation(GNENet *net, bool allowUndoRedo, const std::string &id, GNELane *lane, const double startPos, const double endPos, const int parametersSet, const std::string &name, double chargingPower, double efficiency, bool chargeInTransit, SUMOTime chargeDelay, bool friendlyPosition, bool blockMovement)
Builds a charging Station.
void parseAndBuildPoly(const SUMOSAXAttributes &attrs)
Parses his values and builds a Poly.
static GNEAdditional * buildVaporizer(GNENet *net, bool allowUndoRedo, GNEEdge *edge, SUMOTime start, SUMOTime endTime, const std::string &name, bool centerAfterCreation)
Builds a vaporizer (lane speed additional)
static bool parseAndBuildBusStop(GNENet *net, bool allowUndoRedo, const SUMOSAXAttributes &attrs, LastInsertedElement *insertedAdditionals)
Parses his values and builds a bus stop.
static bool parseAndBuildDetectorExit(GNENet *net, bool allowUndoRedo, const SUMOSAXAttributes &attrs, LastInsertedElement *insertedAdditionals)
Parses his values and builds a Exit detector.
static GNEAdditional * buildBusStop(GNENet *net, bool allowUndoRedo, const std::string &id, GNELane *lane, const double startPos, const double endPos, const int parametersSet, const std::string &name, const std::vector< std::string > &lines, int personCapacity, double parkingLength, bool friendlyPosition, bool blockMovement)
Builds a bus stop.
static GNEAdditional * buildClosingLaneReroute(GNENet *net, bool allowUndoRedo, GNEAdditional *rerouterIntervalParent, GNELane *closedLane, SVCPermissions permissions)
static bool parseAndBuildParkingSpace(GNENet *net, bool allowUndoRedo, const SUMOSAXAttributes &attrs, LastInsertedElement *insertedAdditionals)
Parses his values and builds a parking space.
static GNEAdditional * buildVariableSpeedSign(GNENet *net, bool allowUndoRedo, const std::string &id, Position pos, const std::vector< GNELane * > &destLanes, const std::string &name, bool blockMovement)
Builds a VariableSpeedSign (lane speed additional)
static bool buildAdditional(GNENet *net, bool allowUndoRedo, SumoXMLTag tag, const SUMOSAXAttributes &attrs, LastInsertedElement *insertedAdditionals)
Build additionals.
static bool parseAndBuildRerouter(GNENet *net, bool allowUndoRedo, const SUMOSAXAttributes &attrs, LastInsertedElement *insertedAdditionals)
Parses his values and builds a rerouter.
static GNEAdditional * builParkingAreaReroute(GNENet *net, bool allowUndoRedo, GNEAdditional *rerouterIntervalParent, GNEAdditional *newParkignArea, double probability, bool visible)
static bool accessCanBeCreated(GNEAdditional *busStopParent, GNEEdge *edge)
check if a GNEAccess can be created in a certain Edge
static bool parseAndBuildCalibratorFlow(GNENet *net, bool allowUndoRedo, const SUMOSAXAttributes &attrs, LastInsertedElement *insertedAdditionals)
Parses flow values of Calibrators.
static bool parseAndBuildRerouterClosingReroute(GNENet *net, bool allowUndoRedo, const SUMOSAXAttributes &attrs, LastInsertedElement *insertedAdditionals)
Parses his values and builds a Closing Reroute.
static GNEAdditional * buildDetectorE1(GNENet *net, bool allowUndoRedo, const std::string &id, GNELane *lane, double pos, SUMOTime freq, const std::string &filename, const std::string &vehicleTypes, const std::string &name, bool friendlyPos, bool blockMovement)
Builds a induction loop detector (E1)
static bool parseAndBuildChargingStation(GNENet *net, bool allowUndoRedo, const SUMOSAXAttributes &attrs, LastInsertedElement *insertedAdditionals)
Parses his values and builds a charging station.
static GNEAdditional * builDestProbReroute(GNENet *net, bool allowUndoRedo, GNEAdditional *rerouterIntervalParent, GNEEdge *newEdgeDestination, double probability)
static GNEAdditional * buildClosingReroute(GNENet *net, bool allowUndoRedo, GNEAdditional *rerouterIntervalParent, GNEEdge *closedEdge, SVCPermissions permissions)
static GNETAZElement * buildTAZSink(GNENet *net, bool allowUndoRedo, GNETAZElement *TAZ, GNEEdge *edge, double arrivalWeight)
Builds a TAZSink (Traffic Assignment Zone)
static GNEAdditional * buildDetectorE3(GNENet *net, bool allowUndoRedo, const std::string &id, Position pos, SUMOTime freq, const std::string &filename, const std::string &vehicleTypes, const std::string &name, SUMOTime timeThreshold, double speedThreshold, bool blockMovement)
Builds a multi entry exit detector (E3)
static bool parseAndBuildVaporizer(GNENet *net, bool allowUndoRedo, const SUMOSAXAttributes &attrs, LastInsertedElement *insertedAdditionals)
Builds a Vaporizer.
static bool fixE2DetectorPosition(double &pos, double &length, const double laneLength, const bool friendlyPos)
check if the position of a detector over a lane is valid
double getPosition(double pos, GNELane &lane, bool friendlyPos, const std::string &additionalID)
extracts the position, checks whether it shall be mirrored and checks whether it is within the lane.
static bool parseAndBuildRerouterParkingAreaReroute(GNENet *net, bool allowUndoRedo, const SUMOSAXAttributes &attrs, LastInsertedElement *insertedAdditionals)
Parses his values and builds a parkingAreaReroute.
static bool parseAndBuildCalibrator(GNENet *net, bool allowUndoRedo, const SUMOSAXAttributes &attrs, LastInsertedElement *insertedAdditionals)
Parses his values and builds a mesoscopic or microscopic calibrator.
static bool parseAndBuildTAZ(GNENet *net, bool allowUndoRedo, const SUMOSAXAttributes &attrs, LastInsertedElement *insertedAdditionals)
Builds a TAZ.
LastInsertedElement * myLastInsertedElement
LastInsertedElement used for insert children.
static GNETAZElement * buildTAZSource(GNENet *net, bool allowUndoRedo, GNETAZElement *TAZ, GNEEdge *edge, double departWeight)
Builds a TAZSource (Traffic Assignment Zone)
static bool parseAndBuildRouteProbe(GNENet *net, bool allowUndoRedo, const SUMOSAXAttributes &attrs, LastInsertedElement *insertedAdditionals)
Parses his values and builds routeProbe.
static bool parseAndBuildDetectorE1(GNENet *net, bool allowUndoRedo, const SUMOSAXAttributes &attrs, LastInsertedElement *insertedAdditionals)
Parses his values and builds a induction loop detector (GNENet *net, bool allowUndoRedo,...
static GNEAdditional * buildSingleLaneDetectorE2(GNENet *net, bool allowUndoRedo, const std::string &id, GNELane *lane, double pos, double length, const std::string &freq, const std::string &trafficLight, const std::string &filename, const std::string &vehicleTypes, const std::string &name, SUMOTime timeThreshold, double speedThreshold, double jamThreshold, bool friendlyPos, bool blockMovement)
Builds a single-lane Area Detector (E2)
static GNEAdditional * buildParkingArea(GNENet *net, bool allowUndoRedo, const std::string &id, GNELane *lane, const double startPos, const double endPos, const int parametersSet, const std::string &name, bool friendlyPosition, int roadSideCapacity, bool onRoad, double width, const std::string &length, double angle, bool blockMovement)
Builds a Parking Area.
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
static bool parseAndBuildRerouterInterval(GNENet *net, bool allowUndoRedo, const SUMOSAXAttributes &attrs, LastInsertedElement *insertedAdditionals)
Parses his values and builds a Rerouter Interval.
static GNEAdditional * buildRouteProbe(GNENet *net, bool allowUndoRedo, const std::string &id, GNEEdge *edge, const std::string &freq, const std::string &name, const std::string &file, SUMOTime begin, bool centerAfterCreation)
builds a Route probe
static GNEAdditional * buildDetectorEntry(GNENet *net, bool allowUndoRedo, GNEAdditional *E3Parent, GNELane *lane, double pos, bool friendlyPos, bool blockMovement)
Builds a entry detector (E3)
GNEAdditionalHandler(const std::string &file, GNENet *net, GNEAdditional *additionalParent=nullptr)
Constructor.
static bool parseAndBuildDetectorE1Instant(GNENet *net, bool allowUndoRedo, const SUMOSAXAttributes &attrs, LastInsertedElement *insertedAdditionals)
Parses his values and builds a Instant induction loop detector (GNENet *net, bool allowUndoRedo,...
GNEAdditionalHandler(const GNEAdditionalHandler &s)=delete
invalidate copy constructor
static bool parseAndBuildParkingArea(GNENet *net, bool allowUndoRedo, const SUMOSAXAttributes &attrs, LastInsertedElement *insertedAdditionals)
Parses his values and builds a parking area.
static GNEAdditional * buildVariableSpeedSignStep(GNENet *net, bool allowUndoRedo, GNEAdditional *VSSParent, double time, double speed)
Builds a VariableSpeedSign Step.
static GNEAdditional * buildCalibrator(GNENet *net, bool allowUndoRedo, const std::string &id, GNELane *lane, double pos, const std::string &name, const std::string &outfile, SUMOTime freq, const std::string &routeprobe, bool centerAfterCreation)
builds a microscopic calibrator over a lane
void myEndElement(int element)
Called when a closing tag occurs.
static GNETAZElement * buildTAZ(GNENet *net, bool allowUndoRedo, const std::string &id, const PositionVector &shape, const RGBColor &color, const std::vector< GNEEdge * > &edges, bool blockMovement)
Builds a TAZ (Traffic Assignment Zone)
static bool parseAndBuildDetectorE3(GNENet *net, bool allowUndoRedo, const SUMOSAXAttributes &attrs, LastInsertedElement *insertedAdditionals)
Parses his values and builds a multi entry exit detector (GNENet *net, bool allowUndoRedo,...
static GNEAdditional * buildRerouter(GNENet *net, bool allowUndoRedo, const std::string &id, Position pos, const std::vector< GNEEdge * > &edges, double prob, const std::string &name, const std::string &file, bool off, SUMOTime timeThreshold, const std::string &vTypes, bool blockMovement)
builds a rerouter
static bool parseAndBuildVariableSpeedSign(GNENet *net, bool allowUndoRedo, const SUMOSAXAttributes &attrs, LastInsertedElement *insertedAdditionals)
Parses his values and builds a Variable Speed Signal (GNENet *net, bool allowUndoRedo,...
GNEAdditionalHandler & operator=(const GNEAdditionalHandler &s)=delete
invalidate assignment operator
static GNEAdditional * buildDetectorExit(GNENet *net, bool allowUndoRedo, GNEAdditional *E3Parent, GNELane *lane, double pos, bool friendlyPos, bool blockMovement)
Builds a exit detector (E3)
GNENet * myNet
pointer to net
static bool parseAndBuildDetectorE2(GNENet *net, bool allowUndoRedo, const SUMOSAXAttributes &attrs, LastInsertedElement *insertedAdditionals)
Parses his values and builds a lane area detector (GNENet *net, bool allowUndoRedo,...
void parseAndBuildPOI(const SUMOSAXAttributes &attrs)
Parses his values and builds a POI.
static GNEAdditional * buildParkingSpace(GNENet *net, bool allowUndoRedo, GNEAdditional *parkingAreaParent, Position pos, double width, double length, double angle, bool blockMovement)
Builds a Parking Space.
static bool parseAndBuildContainerStop(GNENet *net, bool allowUndoRedo, const SUMOSAXAttributes &attrs, LastInsertedElement *insertedAdditionals)
Parses his values and builds a container stop.
static GNEAdditional * buildRouteProbReroute(GNENet *net, bool allowUndoRedo, GNEAdditional *rerouterIntervalParent, const std::string &newRouteId, double probability)
static GNEAdditional * buildContainerStop(GNENet *net, bool allowUndoRedo, const std::string &id, GNELane *lane, const double startPos, const double endPos, const int parametersSet, const std::string &name, const std::vector< std::string > &lines, bool friendlyPosition, bool blockMovement)
Builds a container stop.
void parseParameter(const SUMOSAXAttributes &attrs)
Parse parameter and insert it in the last created additional.
static GNEAdditional * buildRerouterInterval(GNENet *net, bool allowUndoRedo, GNEAdditional *rerouterParent, SUMOTime begin, SUMOTime end)
builds a rerouter interval
static GNEAdditional * buildDetectorE1Instant(GNENet *net, bool allowUndoRedo, const std::string &id, GNELane *lane, double pos, const std::string &filename, const std::string &vehicleTypes, const std::string &name, bool friendlyPos, bool blockMovement)
Builds a Instant Induction Loop Detector (E1Instant)
static GNEAdditional * buildAccess(GNENet *net, bool allowUndoRedo, GNEAdditional *busStop, GNELane *lane, double pos, const std::string &length, bool friendlyPos, bool blockMovement)
Builds an Access.
static bool parseAndBuildVariableSpeedSignStep(GNENet *net, bool allowUndoRedo, const SUMOSAXAttributes &attrs, LastInsertedElement *insertedAdditionals)
Parses his values and builds a Variable Speed Signal Step.
static GNEAdditional * buildCalibratorFlow(GNENet *net, bool allowUndoRedo, GNEAdditional *calibratorParent, GNEDemandElement *route, GNEDemandElement *vType, const std::string &vehsPerHour, const std::string &speed, const RGBColor &color, const std::string &departLane, const std::string &departPos, const std::string &departSpeed, const std::string &arrivalLane, const std::string &arrivalPos, const std::string &arrivalSpeed, const std::string &line, int personNumber, int containerNumber, bool reroute, const std::string &departPosLat, const std::string &arrivalPosLat, SUMOTime begin, SUMOTime end)
builds a calibrator flow
static bool parseAndBuildRerouterRouteProbReroute(GNENet *net, bool allowUndoRedo, const SUMOSAXAttributes &attrs, LastInsertedElement *insertedAdditionals)
Parses his values and builds a Route Prob Reroute.
static bool parseAndBuildRerouterDestProbReroute(GNENet *net, bool allowUndoRedo, const SUMOSAXAttributes &attrs, LastInsertedElement *insertedAdditionals)
Parses his values and builds a Destiny Prob Reroute.
static bool parseAndBuildAccess(GNENet *net, bool allowUndoRedo, const SUMOSAXAttributes &attrs, LastInsertedElement *insertedAdditionals)
Parses values and adds access to the current bus stop.
Position getLanePos(const std::string &poiID, const std::string &laneID, double lanePos, double lanePosLat)
get lane position
static bool parseAndBuildDetectorEntry(GNENet *net, bool allowUndoRedo, const SUMOSAXAttributes &attrs, LastInsertedElement *insertedAdditionals)
Parses his values and builds a Entry detector.
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEAdditional.h:47
An Element which don't belongs to GNENet but has influency in the simulation.
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:49
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:45
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:40
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNETAZElement.h:45
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:36
A list of positions.
Encapsulated SAX-Attributes.
The XML-Handler for network loading.
Definition: ShapeHandler.h:47