19 #ifndef GNEAdditionalHandler_h 20 #define GNEAdditionalHandler_h 252 static bool buildBusStop(
GNEViewNet* viewNet,
bool allowUndoRedo,
const std::string&
id,
GNELane* lane,
double startPos,
double endPos,
const std::string& name,
const std::vector<std::string>& lines,
bool friendlyPosition);
267 static bool buildContainerStop(
GNEViewNet* viewNet,
bool allowUndoRedo,
const std::string&
id,
GNELane* lane,
double startPos,
double endPos,
const std::string& name,
const std::vector<std::string>& lines,
bool friendlyPosition);
285 static bool buildChargingStation(
GNEViewNet* viewNet,
bool allowUndoRedo,
const std::string&
id,
GNELane* lane,
double startPos,
double endPos,
const std::string& name,
double chargingPower,
double efficiency,
bool chargeInTransit,
double chargeDelay,
bool friendlyPosition);
300 static bool buildDetectorE1(
GNEViewNet* viewNet,
bool allowUndoRedo,
const std::string&
id,
GNELane* lane,
double pos,
double freq,
const std::string& filename,
const std::string& vehicleTypes,
bool friendlyPos);
319 static bool buildDetectorE2(
GNEViewNet* viewNet,
bool allowUndoRedo,
const std::string&
id,
GNELane* lane,
double pos,
double length,
double freq,
const std::string& filename,
320 bool cont,
const double timeThreshold,
double speedThreshold,
double jamThreshold,
bool friendlyPos);
334 static bool buildDetectorE3(
GNEViewNet* viewNet,
bool allowUndoRedo,
const std::string&
id,
Position pos,
double freq,
const std::string& filename,
const double timeThreshold,
double speedThreshold);
372 static bool buildCalibrator(
GNEViewNet* viewNet,
bool allowUndoRedo,
const std::string&
id,
GNELane* lane,
double pos,
const std::string& outfile,
double freq);
386 static bool buildCalibrator(
GNEViewNet* viewNet,
bool allowUndoRedo,
const std::string&
id,
GNEEdge* edge,
double pos,
const std::string& outfile,
double freq);
397 double accel,
double decel,
double sigma,
double tau,
double length,
double minGap,
double maxSpeed,
398 double speedFactor,
double speedDev,
const RGBColor& color,
SUMOVehicleClass vClass,
const std::string& emissionClass,
399 SUMOVehicleShape shape,
double width,
const std::string& filename,
double impatience,
const std::string& laneChangeModel,
400 const std::string& carFollowModel,
int personCapacity,
int containerCapacity,
double boardingDuration,
401 double loadingDuration,
const std::string& latAlignment,
double minGapLat,
double maxSpeedLat);
408 const std::string& departSpeed,
const std::string& arrivalLane,
const std::string& arrivalPos,
const std::string& arrivalSpeed,
409 const std::string& line,
int personNumber,
int containerNumber,
bool reroute,
const std::string& departPosLat,
410 const std::string& arrivalPosLat,
double begin,
double end,
double vehsPerHour,
double period,
double probability,
int number,
int flowType);
422 static bool buildRerouter(
GNEViewNet* viewNet,
bool allowUndoRedo,
const std::string&
id,
Position pos,
const std::vector<GNEEdge*>& edges,
double prob,
const std::string& file,
bool off,
double timeThreshold);
465 static bool buildRouteProbe(
GNEViewNet* viewNet,
bool allowUndoRedo,
const std::string&
id,
GNEEdge* edge,
double freq,
const std::string& file,
double begin);
515 double getPosition(
double pos,
GNELane& lane,
bool friendlyPos,
const std::string& additionalID);
525 static bool fixStoppinPlacePosition(
double& startPos,
double& endPos,
const double laneLength,
const double minLength,
const bool friendlyPos);
SumoXMLTag
Numbers representing SUMO-XML - element names.
int getTypeOfFlowDistribution(std::string flowID, double vehsPerHour, double period, double probability)
get a error message, if configuration of flow distribution is invalid
void parseAndBuildRerouterRouteProbReroute(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a Route Prob Reroute.
void parseAndBuildDetectorE1(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a induction loop detector (E1)
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
static bool buildVariableSpeedSign(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &id, Position pos, const std::vector< GNELane *> &destLanes, const std::string &file)
Builds a VariableSpeedSign (lane speed trigger)
void parseAndBuildChargingStation(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a charging station.
const std::string & getFileName() const
returns the current file name
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
static bool builDestProbReroute(GNEViewNet *viewNet, bool allowUndoRedo, GNERerouterInterval *rerouterIntervalParent, GNEEdge *newEdgeDestination, double probability)
bool myUndoAdditionals
flag to check if created additionals must be undo and redo
static bool buildAdditional(GNEViewNet *viewNet, bool allowUndoRedo, SumoXMLTag tag, std::map< SumoXMLAttr, std::string > values)
Build additionals.
static bool checkAndFixDetectorPositionPosition(double &pos, const double laneLength, const bool friendlyPos)
check if the position of a detector over a lane is valid
static bool buildClosingLaneReroute(GNEViewNet *viewNet, bool allowUndoRedo, GNERerouterInterval *rerouterIntervalParent, GNELane *closedLane, SVCPermissions allowedVehicles, SVCPermissions disallowedVehicles)
void parseAndBuildDetectorExit(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a Exit detector.
A NBNetBuilder extended by visualisation and editing capabilities.
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
static bool buildClosingReroute(GNEViewNet *viewNet, bool allowUndoRedo, GNERerouterInterval *rerouterIntervalParent, GNEEdge *closedEdge, SVCPermissions allowedVehicles, SVCPermissions disallowedVehicles)
static bool buildVaporizer(GNEViewNet *viewNet, bool allowUndoRedo, GNEEdge *edge, double startTime, double end)
Builds a vaporizer (lane speed trigger)
SAX-handler base for SUMO-files.
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...
Builds trigger objects for GNENet (busStops, chargingStations, detectors, etc..)
static bool buildDetectorEntry(GNEViewNet *viewNet, bool allowUndoRedo, GNEDetectorE3 *E3Parent, GNELane *lane, double pos, bool friendlyPos)
Builds a entry detector (E3)
void parseAndBuildVariableSpeedSign(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a Variable Speed Signal (lane speed trigger)
void parseAndBuildDetectorE2(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a lane area detector (E2)
~GNEAdditionalHandler()
Destructor.
void parseAndBuildCalibratorVehicleType(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses vehicle type values of Calibrators.
static bool buildRouteProbReroute(GNEViewNet *viewNet, bool allowUndoRedo, GNERerouterInterval *rerouterIntervalParent, const std::string &newRouteId, double probability)
void parseAndBuildRerouterInterval(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a Rerouter Interval.
Encapsulated SAX-Attributes.
A point in 2D or 3D with translation and scaling methods.
static bool buildRouteProbe(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &id, GNEEdge *edge, double freq, const std::string &file, double begin)
builds a Route probe
GNEAdditionalHandler(const std::string &file, GNEViewNet *viewNet, bool undoAdditionals=true)
Constructor.
void parseAndBuildRerouter(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a rerouter.
void parseAndBuildCalibratorRoute(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses route values of Calibrators.
static bool buildCalibratorRoute(GNEViewNet *viewNet, bool allowUndoRedo, GNECalibrator *calibratorParent, const std::string &routeID, const std::vector< GNEEdge *> &edges, const RGBColor &color)
std::string myLastInsertedAdditionalParent
ID of last inserted Additional parent (needed for additionasl that own a child)
static bool buildCalibratorVehicleType(GNEViewNet *viewNet, bool allowUndoRedo, GNECalibrator *calibratorParent, std::string vehicleTypeID, double accel, double decel, double sigma, double tau, double length, double minGap, double maxSpeed, double speedFactor, double speedDev, const RGBColor &color, SUMOVehicleClass vClass, const std::string &emissionClass, SUMOVehicleShape shape, double width, const std::string &filename, double impatience, const std::string &laneChangeModel, const std::string &carFollowModel, int personCapacity, int containerCapacity, double boardingDuration, double loadingDuration, const std::string &latAlignment, double minGapLat, double maxSpeedLat)
static bool buildDetectorE2(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &id, GNELane *lane, double pos, double length, double freq, const std::string &filename, bool cont, const double timeThreshold, double speedThreshold, double jamThreshold, bool friendlyPos)
Builds a lane Area Detector (E2)
static bool buildChargingStation(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &id, GNELane *lane, double startPos, double endPos, const std::string &name, double chargingPower, double efficiency, bool chargeInTransit, double chargeDelay, bool friendlyPosition)
Builds a charging Station.
GNEViewNet * myViewNet
pointer to View's Net
void parseAndBuildDetectorE3(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a multi entry exit detector (E3)
static bool buildCalibrator(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &id, GNELane *lane, double pos, const std::string &outfile, double freq)
builds a microscopic calibrator over a lane
void parseAndBuildRouteProbe(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds routeProbe.
static bool buildVariableSpeedSignStep(GNEViewNet *viewNet, bool allowUndoRedo, GNEVariableSpeedSign *VSSParent, double time, double speed)
Builds a VariableSpeedSign Step.
void parseAndBuildRerouterDestProbReroute(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a Destiny Prob Reroute.
A road/street connecting two junctions (netedit-version)
void parseAndBuildCalibrator(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a mesoscopic or microscopic calibrator.
void parseAndBuildVariableSpeedSignStep(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a Variable Speed Signal Step.
static bool buildContainerStop(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &id, GNELane *lane, double startPos, double endPos, const std::string &name, const std::vector< std::string > &lines, bool friendlyPosition)
Builds a container stop.
void parseAndBuildBusStop(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a bus stop.
void parseAndBuildContainerStop(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a container stop.
SUMOVehicleShape
Definition of vehicle classes to differ between different appearences.
static bool fixE2DetectorPositionPosition(double &pos, double &length, const double laneLength, const bool friendlyPos)
check if the position of a detector over a lane is valid
void parseAndBuildCalibratorFlow(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses flow values of Calibrators.
void parseAndBuildVaporizer(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Builds a vaporization.
static bool buildRerouter(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &id, Position pos, const std::vector< GNEEdge *> &edges, double prob, const std::string &file, bool off, double timeThreshold)
builds a rerouter
void parseAndBuildRerouterClosingLaneReroute(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a Closing Lane reroute.
static bool buildDetectorE3(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &id, Position pos, double freq, const std::string &filename, const double timeThreshold, double speedThreshold)
Builds a multi entry exit detector (E3)
static bool buildBusStop(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &id, GNELane *lane, double startPos, double endPos, const std::string &name, const std::vector< std::string > &lines, bool friendlyPosition)
Builds a bus stop.
static bool fixStoppinPlacePosition(double &startPos, double &endPos, const double laneLength, const double minLength, const bool friendlyPos)
check if the position of an stoppingPlace over a lane is valid
void parseAndBuildDetectorEntry(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a Entry detector.
static bool buildDetectorExit(GNEViewNet *viewNet, bool allowUndoRedo, GNEDetectorE3 *E3Parent, GNELane *lane, double pos, bool friendlyPos)
Builds a exit detector (E3)
static bool buildCalibratorFlow(GNEViewNet *viewNet, bool allowUndoRedo, GNECalibrator *calibratorParent, const std::string &flowID, GNECalibratorRoute *route, GNECalibratorVehicleType *vtype, 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, double begin, double end, double vehsPerHour, double period, double probability, int number, int flowType)
static bool buildDetectorE1(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &id, GNELane *lane, double pos, double freq, const std::string &filename, const std::string &vehicleTypes, bool friendlyPos)
Builds a induction loop detector (E1)
static bool buildRerouterInterval(GNEViewNet *viewNet, bool allowUndoRedo, GNERerouter *rerouterParent, double begin, double end)
builds a rerouter interval
void parseAndBuildRerouterClosingReroute(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a Closing Reroute.