 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
16 #ifndef GNEAdditionalHandler_h
17 #define GNEAdditionalHandler_h
101 Position getLanePos(
const std::string& poiID,
const std::string& laneID,
double lanePos,
double lanePosLat);
133 const std::string& name,
const std::vector<std::string>& lines,
int personCapacity,
bool friendlyPosition,
bool blockMovement);
164 const std::string& name,
const std::vector<std::string>& lines,
bool friendlyPosition,
bool blockMovement);
184 const std::string& name,
double chargingPower,
double efficiency,
bool chargeInTransit,
SUMOTime chargeDelay,
bool friendlyPosition,
bool blockMovement);
204 const std::string& name,
bool friendlyPosition,
int roadSideCapacity,
bool onRoad,
double width,
const std::string& length,
double angle,
bool blockMovement);
236 const std::string& vehicleTypes,
const std::string& name,
bool friendlyPos,
bool blockMovement);
258 const std::string& vehicleTypes,
const std::string& name,
SUMOTime timeThreshold,
double speedThreshold,
double jamThreshold,
bool friendlyPos,
bool blockMovement);
280 const std::string& vehicleTypes,
const std::string& name,
SUMOTime timeThreshold,
double speedThreshold,
double jamThreshold,
bool friendlyPos,
bool blockMovement);
297 static GNEAdditional*
buildDetectorE3(
GNEViewNet* viewNet,
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);
339 static GNEAdditional*
buildDetectorE1Instant(
GNEViewNet* viewNet,
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);
400 const std::string& vehsPerHour,
const std::string& speed,
const RGBColor& color,
const std::string& departLane,
const std::string& departPos,
401 const std::string& departSpeed,
const std::string& arrivalLane,
const std::string& arrivalPos,
const std::string& arrivalSpeed,
402 const std::string& line,
int personNumber,
int containerNumber,
bool reroute,
const std::string& departPosLat,
417 static GNEAdditional*
buildRerouter(
GNEViewNet* viewNet,
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);
546 double getPosition(
double pos,
GNELane& lane,
bool friendlyPos,
const std::string& additionalID);
563 static bool fixE2DetectorPosition(
double& pos,
double& length,
const double laneLength,
const bool friendlyPos);
static GNEAdditional * buildVariableSpeedSignStep(GNEViewNet *viewNet, bool allowUndoRedo, GNEAdditional *VSSParent, double time, double speed)
Builds a VariableSpeedSign Step.
static bool parseAndBuildVaporizer(GNEViewNet *viewNet, bool allowUndoRedo, const SUMOSAXAttributes &attrs, HierarchyInsertedAdditionals *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
An Element which don't belongs to GNENet but has influency in the simulation.
static GNEAdditional * buildDetectorE1Instant(GNEViewNet *viewNet, 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)
An Element which don't belongs to GNENet but has influency in the simulation.
static GNEAdditional * buildVaporizer(GNEViewNet *viewNet, bool allowUndoRedo, GNEEdge *edge, SUMOTime start, SUMOTime endTime, const std::string &name, bool centerAfterCreation)
Builds a vaporizer (lane speed additional)
static bool parseAndBuildDetectorEntry(GNEViewNet *viewNet, bool allowUndoRedo, const SUMOSAXAttributes &attrs, HierarchyInsertedAdditionals *insertedAdditionals)
Parses his values and builds a Entry detector.
static bool parseAndBuildCalibrator(GNEViewNet *viewNet, bool allowUndoRedo, const SUMOSAXAttributes &attrs, HierarchyInsertedAdditionals *insertedAdditionals)
Parses his values and builds a mesoscopic or microscopic calibrator.
static bool parseAndBuildVariableSpeedSign(GNEViewNet *viewNet, bool allowUndoRedo, const SUMOSAXAttributes &attrs, HierarchyInsertedAdditionals *insertedAdditionals)
Parses his values and builds a Variable Speed Signal (GNEViewNet* viewNet, bool allowUndoRedo,...
static bool parseAndBuildDetectorExit(GNEViewNet *viewNet, bool allowUndoRedo, const SUMOSAXAttributes &attrs, HierarchyInsertedAdditionals *insertedAdditionals)
Parses his values and builds a Exit detector.
static GNEAdditional * buildCalibrator(GNEViewNet *viewNet, 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
static GNEAdditional * buildBusStop(GNEViewNet *viewNet, 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, bool friendlyPosition, bool blockMovement)
Builds a bus stop.
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
static GNEAdditional * buildMultiLaneDetectorE2(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &id, const std::vector< GNELane * > &lanes, double pos, double endPos, SUMOTime freq, 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)
GNEAdditionalHandler(const std::string &file, GNEViewNet *viewNet, GNEAdditional *additionalParent=nullptr)
Constructor.
static GNEAdditional * buildSingleLaneDetectorE2(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &id, GNELane *lane, double pos, double length, SUMOTime freq, 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)
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 parseAndBuildRerouterInterval(GNEViewNet *viewNet, bool allowUndoRedo, const SUMOSAXAttributes &attrs, HierarchyInsertedAdditionals *insertedAdditionals)
Parses his values and builds a Rerouter Interval.
static GNEAdditional * builDestProbReroute(GNEViewNet *viewNet, bool allowUndoRedo, GNEAdditional *rerouterIntervalParent, GNEEdge *newEdgeDestination, double probability)
static bool parseAndBuildRerouterParkingAreaReroute(GNEViewNet *viewNet, bool allowUndoRedo, const SUMOSAXAttributes &attrs, HierarchyInsertedAdditionals *insertedAdditionals)
Parses his values and builds a parkingAreaReroute.
static GNEAdditional * buildRouteProbReroute(GNEViewNet *viewNet, bool allowUndoRedo, GNEAdditional *rerouterIntervalParent, const std::string &newRouteId, double probability)
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 GNEAdditional * buildDetectorExit(GNEViewNet *viewNet, bool allowUndoRedo, GNEAdditional *E3Parent, GNELane *lane, double pos, bool friendlyPos, bool blockMovement)
Builds a exit detector (E3)
static GNEAdditional * buildClosingReroute(GNEViewNet *viewNet, bool allowUndoRedo, GNEAdditional *rerouterIntervalParent, GNEEdge *closedEdge, SVCPermissions permissions)
static bool parseAndBuildDetectorE1(GNEViewNet *viewNet, bool allowUndoRedo, const SUMOSAXAttributes &attrs, HierarchyInsertedAdditionals *insertedAdditionals)
Parses his values and builds a induction loop detector (GNEViewNet* viewNet, bool allowUndoRedo,...
SumoXMLTag
Numbers representing SUMO-XML - element names.
static GNEAdditional * buildParkingSpace(GNEViewNet *viewNet, bool allowUndoRedo, GNEAdditional *parkingAreaParent, Position pos, double width, double length, double angle, bool blockMovement)
Builds a Parking Space.
static bool parseAndBuildRerouterRouteProbReroute(GNEViewNet *viewNet, bool allowUndoRedo, const SUMOSAXAttributes &attrs, HierarchyInsertedAdditionals *insertedAdditionals)
Parses his values and builds a Route Prob Reroute.
A road/street connecting two junctions (netedit-version)
static bool buildAdditional(GNEViewNet *viewNet, bool allowUndoRedo, SumoXMLTag tag, const SUMOSAXAttributes &attrs, HierarchyInsertedAdditionals *insertedAdditionals)
Build additionals.
static bool parseAndBuildParkingSpace(GNEViewNet *viewNet, bool allowUndoRedo, const SUMOSAXAttributes &attrs, HierarchyInsertedAdditionals *insertedAdditionals)
Parses his values and builds a parking space.
static bool parseAndBuildContainerStop(GNEViewNet *viewNet, bool allowUndoRedo, const SUMOSAXAttributes &attrs, HierarchyInsertedAdditionals *insertedAdditionals)
Parses his values and builds a container stop.
static GNEAdditional * buildDetectorE1(GNEViewNet *viewNet, 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 parseAndBuildRerouterClosingLaneReroute(GNEViewNet *viewNet, bool allowUndoRedo, const SUMOSAXAttributes &attrs, HierarchyInsertedAdditionals *insertedAdditionals)
Parses his values and builds a Closing Lane reroute.
static GNEAdditional * buildDetectorEntry(GNEViewNet *viewNet, bool allowUndoRedo, GNEAdditional *E3Parent, GNELane *lane, double pos, bool friendlyPos, bool blockMovement)
Builds a entry detector (E3)
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
static bool parseAndBuildRerouter(GNEViewNet *viewNet, bool allowUndoRedo, const SUMOSAXAttributes &attrs, HierarchyInsertedAdditionals *insertedAdditionals)
Parses his values and builds a rerouter.
static bool parseAndBuildDetectorE3(GNEViewNet *viewNet, bool allowUndoRedo, const SUMOSAXAttributes &attrs, HierarchyInsertedAdditionals *insertedAdditionals)
Parses his values and builds a multi entry exit detector (GNEViewNet* viewNet, bool allowUndoRedo,...
static bool parseAndBuildChargingStation(GNEViewNet *viewNet, bool allowUndoRedo, const SUMOSAXAttributes &attrs, HierarchyInsertedAdditionals *insertedAdditionals)
Parses his values and builds a charging station.
static bool parseAndBuildTAZSink(GNEViewNet *viewNet, bool allowUndoRedo, const SUMOSAXAttributes &attrs, HierarchyInsertedAdditionals *insertedAdditionals)
Builds a TAZ Sink.
static GNEAdditional * buildRerouter(GNEViewNet *viewNet, 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 parseAndBuildCalibratorFlow(GNEViewNet *viewNet, bool allowUndoRedo, const SUMOSAXAttributes &attrs, HierarchyInsertedAdditionals *insertedAdditionals)
Parses flow values of Calibrators.
A point in 2D or 3D with translation and scaling methods.
GNEAdditional * getLastInsertedAdditional() const
return last additional inserted
static GNEAdditional * buildDetectorE3(GNEViewNet *viewNet, 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)
~GNEAdditionalHandler()
Destructor.
static GNEAdditional * buildTAZSource(GNEViewNet *viewNet, bool allowUndoRedo, GNEAdditional *TAZ, GNEEdge *edge, double departWeight)
Builds a TAZSource (Traffic Assignment Zone)
HierarchyInsertedAdditionals myHierarchyInsertedAdditionals
HierarchyInsertedAdditionals used for insert children.
static GNEAdditional * buildAccess(GNEViewNet *viewNet, bool allowUndoRedo, GNEAdditional *busStop, GNELane *lane, double pos, const std::string &length, bool friendlyPos, bool blockMovement)
Builds an Access.
Stack used to save the last inserted element.
std::vector< std::pair< SumoXMLTag, GNEAdditional * > > myInsertedElements
vector used as stack
Position getLanePos(const std::string &poiID, const std::string &laneID, double lanePos, double lanePosLat)
get lane position
GNEAdditionalHandler & operator=(const GNEAdditionalHandler &s)=delete
invalidate assignment operator
static bool parseAndBuildBusStop(GNEViewNet *viewNet, bool allowUndoRedo, const SUMOSAXAttributes &attrs, HierarchyInsertedAdditionals *insertedAdditionals)
Parses his values and builds a bus stop.
static GNEAdditional * builParkingAreaReroute(GNEViewNet *viewNet, bool allowUndoRedo, GNEAdditional *rerouterIntervalParent, GNEAdditional *newParkignArea, double probability, bool visible)
static GNEAdditional * buildRerouterInterval(GNEViewNet *viewNet, bool allowUndoRedo, GNEAdditional *rerouterParent, SUMOTime begin, SUMOTime end)
builds a rerouter interval
static bool parseAndBuildTAZSource(GNEViewNet *viewNet, bool allowUndoRedo, const SUMOSAXAttributes &attrs, HierarchyInsertedAdditionals *insertedAdditionals)
Builds a TAZ Source.
static bool parseAndBuildRerouterDestProbReroute(GNEViewNet *viewNet, bool allowUndoRedo, const SUMOSAXAttributes &attrs, HierarchyInsertedAdditionals *insertedAdditionals)
Parses his values and builds a Destiny Prob Reroute.
void myEndElement(int element)
Called when a closing tag occurs.
static bool parseAndBuildDetectorE2(GNEViewNet *viewNet, bool allowUndoRedo, const SUMOSAXAttributes &attrs, HierarchyInsertedAdditionals *insertedAdditionals)
Parses his values and builds a lane area detector (GNEViewNet* viewNet, bool allowUndoRedo,...
static GNEAdditional * buildParkingArea(GNEViewNet *viewNet, 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.
static bool parseAndBuildRerouterClosingReroute(GNEViewNet *viewNet, bool allowUndoRedo, const SUMOSAXAttributes &attrs, HierarchyInsertedAdditionals *insertedAdditionals)
Parses his values and builds a Closing Reroute.
static bool parseAndBuildVariableSpeedSignStep(GNEViewNet *viewNet, bool allowUndoRedo, const SUMOSAXAttributes &attrs, HierarchyInsertedAdditionals *insertedAdditionals)
Parses his values and builds a Variable Speed Signal Step.
The XML-Handler for network loading.
static GNEAdditional * buildChargingStation(GNEViewNet *viewNet, 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 popElement()
pop last inserted element (used only in function myEndElement)
static bool parseAndBuildParkingArea(GNEViewNet *viewNet, bool allowUndoRedo, const SUMOSAXAttributes &attrs, HierarchyInsertedAdditionals *insertedAdditionals)
Parses his values and builds a parking area.
static bool parseAndBuildTAZ(GNEViewNet *viewNet, bool allowUndoRedo, const SUMOSAXAttributes &attrs, HierarchyInsertedAdditionals *insertedAdditionals)
Builds a TAZ.
void commitElementInsertion(GNEAdditional *additionalCreated)
commit element insertion (used to save last correct created element)
static GNEAdditional * buildClosingLaneReroute(GNEViewNet *viewNet, bool allowUndoRedo, GNEAdditional *rerouterIntervalParent, GNELane *closedLane, SVCPermissions permissions)
static bool accessCanBeCreated(GNEAdditional *busStopParent, GNEEdge *edge)
check if a GNEAccess can be created in a certain Edge
static GNEAdditional * buildCalibratorFlow(GNEViewNet *viewNet, 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
Builds additional objects for GNENet (busStops, chargingStations, detectors, etc.....
static bool parseAndBuildDetectorE1Instant(GNEViewNet *viewNet, bool allowUndoRedo, const SUMOSAXAttributes &attrs, HierarchyInsertedAdditionals *insertedAdditionals)
Parses his values and builds a Instant induction loop detector (GNEViewNet* viewNet,...
void insertElement(SumoXMLTag tag)
insert new element (called only in function myStartElement)
void parseAndBuildPOI(const SUMOSAXAttributes &attrs)
Parses his values and builds a POI.
static GNEAdditional * buildRouteProbe(GNEViewNet *viewNet, 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 * buildVariableSpeedSign(GNEViewNet *viewNet, 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)
Encapsulated SAX-Attributes.
GNEViewNet * myViewNet
pointer to View's Net
static GNEAdditional * buildContainerStop(GNEViewNet *viewNet, 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.
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
static bool checkAndFixDetectorPosition(double &pos, const double laneLength, const bool friendlyPos)
check if the position of a detector over a lane is valid
void parseAndBuildPoly(const SUMOSAXAttributes &attrs)
Parses his values and builds a Poly.
static GNEAdditional * buildTAZSink(GNEViewNet *viewNet, bool allowUndoRedo, GNEAdditional *TAZ, GNEEdge *edge, double arrivalWeight)
Builds a TAZSink (Traffic Assignment Zone)
static bool parseAndBuildRouteProbe(GNEViewNet *viewNet, bool allowUndoRedo, const SUMOSAXAttributes &attrs, HierarchyInsertedAdditionals *insertedAdditionals)
Parses his values and builds routeProbe.
GNEAdditional * retrieveParentAdditional(GNEViewNet *viewNet, SumoXMLTag expectedTag) const
retrieve parent additional correspond to current status of myInsertedElements
void parseParameter(const SUMOSAXAttributes &attrs)
Parse parameter and insert it in the last created additional.
static bool parseAndBuildAccess(GNEViewNet *viewNet, bool allowUndoRedo, const SUMOSAXAttributes &attrs, HierarchyInsertedAdditionals *insertedAdditionals)
Parses values and adds access to the current bus stop.
static GNEAdditional * buildTAZ(GNEViewNet *viewNet, 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)