/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.3// This program and the accompanying materials are made available under the4// terms of the Eclipse Public License 2.0 which is available at5// https://www.eclipse.org/legal/epl-2.0/6// This Source Code may also be made available under the following Secondary7// Licenses when the conditions for such availability set forth in the Eclipse8// Public License 2.0 are satisfied: GNU General Public License, version 29// or later which is available at10// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html11// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later12/****************************************************************************/13/// @file AdditionalHandler.h14/// @author Pablo Alvarez Lopez15/// @date Jun 202116///17// The XML-Handler for additionals loading18/****************************************************************************/19#pragma once20#include <config.h>2122#include "CommonHandler.h"2324// ===========================================================================25// class definitions26// ===========================================================================2728class AdditionalHandler : public CommonHandler {2930public:31/**@brief Constructor32* @param[in] filename Name of the parsed file33*/34AdditionalHandler(const std::string& filename);3536/// @brief Destructor37virtual ~AdditionalHandler();3839/// @brief begin parse attributes40bool beginParseAttributes(SumoXMLTag tag, const SUMOSAXAttributes& attrs);4142/// @brief end parse attributes43void endParseAttributes();4445/// @brief parse SumoBaseObject (it's called recursivelly)46void parseSumoBaseObject(CommonXMLStructure::SumoBaseObject* obj);4748/// @brief run post parser tasks49virtual bool postParserTasks() = 0;5051/// @name build functions52/// @{53/**@brief Builds a bus stop54* @param[in] sumoBaseObject sumo base object used for build55* @param[in] id The id of the bus stop56* @param[in] laneID The lane the bus stop is placed on57* @param[in] startPos Begin position of the bus stop on the lane58* @param[in] endPos End position of the bus stop on the lane59* @param[in] name Name of busStop60* @param[in] lines Names of the bus lines that halt on this bus stop61* @param[in] personCapacity larger numbers of persons trying to enter will create an upstream jam on the sidewalk.62* @param[in] parkingLength parking length63* @param[in[ color busStop color64* @param[in] friendlyPos enable or disable friendly position65* @param[in] angle busStop's angle66* @param[in] parameters generic parameters67*/68virtual bool buildBusStop(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& id, const std::string& laneID,69const double startPos, const double endPos, const std::string& name, const std::vector<std::string>& lines,70const int personCapacity, const double parkingLength, const RGBColor& color, const bool friendlyPosition,71const double angle, const Parameterised::Map& parameters) = 0;7273/**@brief Builds a train stop74* @param[in] sumoBaseObject sumo base object used for build75* @param[in] id The id of the train stop76* @param[in] laneID The lane the train stop is placed on77* @param[in] startPos Begin position of the train stop on the lane78* @param[in] endPos End position of the train stop on the lane79* @param[in] name Name of trainStop80* @param[in] lines Names of the train lines that halt on this train stop81* @param[in] personCapacity larger numbers of persons trying to enter will create an upstream jam on the sidewalk.82* @param[in] parkingLength parking length83* @param[in[ color trainStop color84* @param[in] friendlyPos enable or disable friendly position85* @param[in] angle trainStop's angle86* @param[in] parameters generic parameters87*/88virtual bool buildTrainStop(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& id, const std::string& laneID,89const double startPos, const double endPos, const std::string& name, const std::vector<std::string>& lines,90const int personCapacity, const double parkingLength, const RGBColor& color, const bool friendlyPosition,91const double angle, const Parameterised::Map& parameters) = 0;9293/**@brief Builds an Access94* @param[in] sumoBaseObject sumo base object used for build95* @param[in] busStop GNEAdditional of this Access belongs96* @param[in] laneID The lane the Access is placed on97* @param[in] pos position of the Access on the lane98* @param[in[ length length of the Access99* @param[in] friendlyPos enable or disable friendly position100* @param[in] parameters generic parameters101*/102virtual bool buildAccess(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& laneID, const std::string& pos,103const double length, const bool friendlyPos, const Parameterised::Map& parameters) = 0;104105/**@brief Builds a container stop106* @param[in] sumoBaseObject sumo base object used for build107* @param[in] id The id of the container stop108* @param[in] laneID The lane the container stop is placed on109* @param[in] startPos Begin position of the container stop on the lane110* @param[in] endPos End position of the container stop on the lane111* @param[in] name Name of container stop112* @param[in] lines Names of the bus lines that halt on this container stop113* @param[in] containerCapacity larger numbers of containers114* @param[in] parkingLength parking length115* @param[in[ color containerStop color116* @param[in] friendlyPos enable or disable friendly position117* @param[in] angle containerStop's angle118* @param[in] parameters generic parameters119*/120virtual bool buildContainerStop(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& id, const std::string& laneID,121const double startPos, const double endPos, const std::string& name, const std::vector<std::string>& lines,122const int containerCapacity, const double parkingLength, const RGBColor& color, const bool friendlyPosition,123const double angle, const Parameterised::Map& parameters) = 0;124125/**@brief Builds a charging Station126* @param[in] sumoBaseObject sumo base object used for build127* @param[in] id The id of the charging Station128* @param[in] laneID The lane the charging Station is placed on129* @param[in] startPos Begin position of the charging Station on the lane130* @param[in] endPos End position of the charging Station on the lane131* @param[in] name Name of charging station132* @param[in] chargingPower power charged in every timeStep133* @param[in] efficiency efficiency of the charge134* @param[in] chargeInTransit enable or disable charge in transit135* @param[in] chargeDelay delay in the charge136* @param[in] chargeType charge type (normal, electric or fuel)137* @param[in] waitingTime waiting time until start charging138* @param[in] friendlyPos enable or disable friendly position139* @param[in] parkingAreaID the parking area the charging sttaion is located on140* @param[in] parameters generic parameters141*/142virtual bool buildChargingStation(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& id, const std::string& laneID,143const double startPos, const double endPos, const std::string& name, const double chargingPower,144const double efficiency, const bool chargeInTransit, const SUMOTime chargeDelay, const std::string& chargeType,145const SUMOTime waitingTime, const bool friendlyPosition, const std::string& parkingAreaID,146const Parameterised::Map& parameters) = 0;147148/**@brief Builds a Parking Area149* @param[in] sumoBaseObject sumo base object used for build150* @param[in] id The id of the Parking >Area151* @param[in] laneID The lane the Parking Area is placed on152* @param[in] startPos Begin position of the Parking Area on the lane153* @param[in] endPos End position of the Parking Area on the lane154* @param[in] departPos lane position in that vehicle must depart when leaves parkingArea155* @param[in] name Name of Parking Area156* @param[in] friendlyPos enable or disable friendly position157* @param[in] roadSideCapacity road side capacity of ParkingArea158* @param[in] width ParkingArea's width159* @param[in] length ParkingArea's length160* @param[in] angle ParkingArea's angle161* @param[in] lefthand enable or disable lefthand162* @param[in] parameters generic parameters163*/164virtual bool buildParkingArea(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& id, const std::string& laneID,165const double startPos, const double endPos, const std::string& departPos, const std::string& name,166const std::vector<std::string>& lines, const bool friendlyPosition, const int roadSideCapacity, const bool onRoad,167const double width, const double length, const double angle, const bool lefthand, const Parameterised::Map& parameters) = 0;168169/**@brief Builds a Parking Space170* @param[in] sumoBaseObject sumo base object used for build171* @param[in] x Position X172* @param[in] y Position Y173* @param[in] z Position Z174* @param[in] name Name of Parking Area175* @param[in] width ParkingArea's width176* @param[in] length ParkingArea's length177* @param[in] angle ParkingArea's angle178* @param[in] slope ParkingArea's slope (of this space)179* @param[in] parameters generic parameters180*/181virtual bool buildParkingSpace(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const double x, const double y, const double z,182const std::string& name, const std::string& width, const std::string& length, const std::string& angle,183const double slope, const Parameterised::Map& parameters) = 0;184185/**@brief Builds a induction loop detector (E1)186* @param[in] sumoBaseObject sumo base object used for build187* @param[in] id The id of the detector188* @param[in] laneID The lane the detector is placed on189* @param[in] pos position of the detector on the lane190* @param[in] period the aggregation period the values the detector collects shall be summed up.191* @param[in] filename The path to the output file.192* @param[in] vtypes list of vehicle types to be reported193* @param[in] nextEdges list of edge ids that must all be part of the future route of the vehicle to qualify for detection194* @param[in] detectPersons detect persons instead of vehicles (pedestrians or passengers)195* @param[in] name E1 detector name196* @param[in] friendlyPos enable or disable friendly position197* @param[in] parameters generic parameters198*/199virtual bool buildE1Detector(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& id, const std::string& laneID,200const double position, const SUMOTime period, const std::string& file, const std::vector<std::string>& vehicleTypes,201const std::vector<std::string>& nextEdges, const std::string& detectPersons, const std::string& name,202const bool friendlyPos, const Parameterised::Map& parameters) = 0;203204/**@brief Builds a single-lane Area Detector (E2)205* @param[in] sumoBaseObject sumo base object used for build206* @param[in] id The id of the detector207* @param[in] laneID The lane the detector is placed on208* @param[in] pos position of the detector on the lane209* @param[in[ length length of the detector210* @param[in] period the aggregation period the values the detector collects shall be summed up.211* @param[in] trafficLight The traffic light that triggers aggregation when switching.212* @param[in] filename The path to the output file.213* @param[in] vtypes list of vehicle types to be reported214* @param[in] nextEdges list of edge ids that must all be part of the future route of the vehicle to qualify for detection215* @param[in] detectPersons detect persons instead of vehicles (pedestrians or passengers)216* @param[in] name E2 detector name217* @param[in] timeThreshold The time-based threshold that describes how much time has to pass until a vehicle is recognized as halting218* @param[in] speedThreshold The speed-based threshold that describes how slow a vehicle has to be to be recognized as halting219* @param[in] jamThreshold The minimum distance to the next standing vehicle in order to make this vehicle count as a participant to the jam220* @param[in] friendlyPos enable or disable friendly position221* @param[in] show detector in sumo-gui222* @param[in] parameters generic parameters223*/224virtual bool buildSingleLaneDetectorE2(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& id, const std::string& laneID,225const double pos, const double length, const SUMOTime period, const std::string& trafficLight, const std::string& filename,226const std::vector<std::string>& vehicleTypes, const std::vector<std::string>& nextEdges, const std::string& detectPersons,227const std::string& name, const SUMOTime timeThreshold, const double speedThreshold, const double jamThreshold,228const bool friendlyPos, const bool show, const Parameterised::Map& parameters) = 0;229230/**@brief Builds a multi-lane Area Detector (E2)231* @param[in] sumoBaseObject sumo base object used for build232* @param[in] id The id of the detector233* @param[in] laneIDs The lanes the detector is placed on234* @param[in] pos position of the detector on the first lane235* @param[in] endPos position of the detector on the last lane236* @param[in] period the aggregation period the values the detector collects shall be summed up.237* @param[in] trafficLight The traffic light that triggers aggregation when switching.238* @param[in] filename The path to the output file.239* @param[in] vtypes list of vehicle types to be reported240* @param[in] nextEdges list of edge ids that must all be part of the future route of the vehicle to qualify for detection241* @param[in] detectPersons detect persons instead of vehicles (pedestrians or passengers)242* @param[in] name E2 detector name243* @param[in] timeThreshold The time-based threshold that describes how much time has to pass until a vehicle is recognized as halting244* @param[in] speedThreshold The speed-based threshold that describes how slow a vehicle has to be to be recognized as halting245* @param[in] jamThreshold The minimum distance to the next standing vehicle in order to make this vehicle count as a participant to the jam246* @param[in] friendlyPos enable or disable friendly position247* @param[in] show detector in sumo-gui248* @param[in] parameters generic parameters249*/250virtual bool buildMultiLaneDetectorE2(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& id, const std::vector<std::string>& laneIDs,251const double pos, const double endPos, const SUMOTime period, const std::string& trafficLight, const std::string& filename,252const std::vector<std::string>& vehicleTypes, const std::vector<std::string>& nextEdges, const std::string& detectPersons,253const std::string& name, const SUMOTime timeThreshold, const double speedThreshold, const double jamThreshold,254const bool friendlyPos, const bool show, const Parameterised::Map& parameters) = 0;255256/**@brief Builds a multi entry exit detector (E3)257* @param[in] sumoBaseObject sumo base object used for build258* @param[in] id The id of the detector259* @param[in] pos position of the detector in the map260* @param[in] period the aggregation period the values the detector collects shall be summed up.261* @param[in] filename The path to the output file.262* @param[in] vtypes list of vehicle types to be reported263* @param[in] nextEdges list of edge ids that must all be part of the future route of the vehicle to qualify for detection264* @param[in] detectPersons detect persons instead of vehicles (pedestrians or passengers)265* @param[in] name E2 detector name266* @param[in] timeThreshold The time-based threshold that describes how much time has to pass until a vehicle is recognized as halting267* @param[in] speedThreshold The speed-based threshold that describes how slow a vehicle has to be to be recognized as halting268* @param[in] openEntry enable or disable open Entry269* @param[in] expectedArrival Whether no warning should be issued when a vehicle arrives within the detector area270* @param[in] parameters generic parameters271*/272virtual bool buildDetectorE3(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& id, const Position& pos, const SUMOTime period,273const std::string& filename, const std::vector<std::string>& vehicleTypes, const std::vector<std::string>& nextEdges,274const std::string& detectPersons, const std::string& name, const SUMOTime timeThreshold, const double speedThreshold,275const bool openEntry, const bool expectedArrival, const Parameterised::Map& parameters) = 0;276277/**@brief Builds a entry detector (E3)278* @param[in] sumoBaseObject sumo base object used for build279* @param[in] laneID The lane in which the entry detector is placed on280* @param[in] pos position of the entry detector on the lane281* @param[in] friendlyPos enable or disable friendly position282* @param[in] parameters generic parameters283*/284virtual bool buildDetectorEntry(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& laneID, const double pos, const bool friendlyPos,285const Parameterised::Map& parameters) = 0;286287/**@brief Builds a exit detector (E3)288* @param[in] sumoBaseObject sumo base object used for build289* @param[in] laneID The lane in which the exit detector is placed on290* @param[in] pos position of the exit detector on the lane291* @param[in] friendlyPos enable or disable friendly position292* @param[in] parameters generic parameters293*/294virtual bool buildDetectorExit(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& laneID, const double pos, const bool friendlyPos,295const Parameterised::Map& parameters) = 0;296297/**@brief Builds a Instant Induction Loop Detector (E1Instant)298* @param[in] sumoBaseObject sumo base object used for build299* @param[in] id The id of the detector300* @param[in] laneID The lane the detector is placed on301* @param[in] pos position of the detector on the lane302* @param[in] filename The path to the output file.303* @param[in] name E2 detector name304* @param[in] vtypes list of vehicle types to be reported305* @param[in] nextEdges list of edge ids that must all be part of the future route of the vehicle to qualify for detection306* @param[in] detectPersons detect persons instead of vehicles (pedestrians or passengers)307* @param[in] friendlyPos enable or disable friendly position308* @param[in] parameters generic parameters309*/310virtual bool buildDetectorE1Instant(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& id, const std::string& laneID,311const double pos, const std::string& filename, const std::vector<std::string>& vehicleTypes,312const std::vector<std::string>& nextEdges, const std::string& detectPersons, const std::string& name,313const bool friendlyPos, const Parameterised::Map& parameters) = 0;314315/**@brief builds a microscopic calibrator over a lane316* @param[in] id The id of the calibrator317* @param[in] laneID The lane the calibrator is placed at318* @param[in] pos The position on the edge the calibrator lies at319* @param[in] name Calibrator name320* @param[in] outfile te file in which write results321* @param[in] jamThreshold A threshold value to detect and clear unexpected jamming322* @param[in] vTypes space separated list of vehicle type ids to consider323* @param[in] parameters generic parameters324*/325virtual bool buildLaneCalibrator(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& id, const std::string& laneID,326const double pos, const std::string& name, const std::string& outfile, const SUMOTime period, const std::string& routeprobe,327const double jamThreshold, const std::vector<std::string>& vTypes, const Parameterised::Map& parameters) = 0;328329/**@brief builds a microscopic calibrator over an edge330* @param[in] sumoBaseObject sumo base object used for build331* @param[in] id The id of the calibrator332* @param[in] edgeID The edge the calibrator is placed at333* @param[in] pos The position on the edge the calibrator lies at334* @param[in] name Calibrator name335* @param[in] outfile te file in which write results336* @param[in] centerAfterCreation center camera after creation337* @param[in] routeProbe route probe vinculated with this calibrator338* @param[in] jamThreshold A threshold value to detect and clear unexpected jamming339* @param[in] vTypes space separated list of vehicle type ids to consider340* @param[in] parameters generic parameters341*/342virtual bool buildEdgeCalibrator(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& id, const std::string& edgeID,343const double pos, const std::string& name, const std::string& outfile, const SUMOTime period, const std::string& routeprobe,344const double jamThreshold, const std::vector<std::string>& vTypes, const Parameterised::Map& parameters) = 0;345346/**@brief builds a calibrator flow347* @param[in] sumoBaseObject sumo base object used for build348* @param[in] vehicleParameter calibratorFlow parameter349*/350virtual bool buildCalibratorFlow(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const SUMOVehicleParameter& vehicleParameter) = 0;351352/**@brief builds a rerouter353* @param[in] sumoBaseObject sumo base object used for build354* @param[in] id The id of the rerouter355* @param[in] pos position of the rerouter in the map356* @param[in] edgeIDs The edges the rerouter is placed at357* @param[in] prob The probability the rerouter reoutes vehicles with358* @param[in] name Calibrator name359* @param[in] parameters generic parameters360*/361virtual bool buildRerouter(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& id, const Position& pos,362const std::vector<std::string>& edgeIDs, const double prob, const std::string& name, const bool off, const bool optional,363const SUMOTime timeThreshold, const std::vector<std::string>& vTypes, const Parameterised::Map& parameters) = 0;364365/**@brief builds a rerouter interval366* @param[in] sumoBaseObject sumo base object used for build367* @param[in] begin begin of interval368* @param[in] end end of interval369*/370virtual bool buildRerouterInterval(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const SUMOTime begin, const SUMOTime end) = 0;371372/**@brief builds a closing lane reroute373* @param[in] sumoBaseObject sumo base object used for build374* @param[in] closedLane closed lane375* @param[in] permissions vClasses disallowed for the lane376*/377virtual bool buildClosingLaneReroute(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& closedLane, SVCPermissions permissions) = 0;378379/**@brief builds a closing edge reroute380* @param[in] sumoBaseObject sumo base object used for build381* @param[in] closedEdgeID closed edge382* @param[in] permissions vClasses disallowed for the lane383*/384virtual bool buildClosingReroute(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& closedEdgeID, SVCPermissions permissions) = 0;385386/**@brief builds a dest prob reroute387* @param[in] sumoBaseObject sumo base object used for build388* @param[in] newEdgeDestinationID new edge destination ID389* @param[in] probability rerouting probability390*/391virtual bool buildDestProbReroute(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& newEdgeDestinationID, const double probability) = 0;392393/**@brief builds a parking area reroute394* @param[in] sumoBaseObject sumo base object used for build395* @param[in] newParkignAreaID new parkingArea ID396* @param[in] probability rerouting probability397*/398virtual bool buildParkingAreaReroute(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& newParkignAreaID, const double probability, const bool visible) = 0;399400/**@brief builds a route prob reroute401* @param[in] sumoBaseObject sumo base object used for build402* @param[in] newRouteID new route ID403* @param[in] probability rerouting probability404*/405virtual bool buildRouteProbReroute(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& newRouteID, const double probability) = 0;406407/**@brief builds a Route probe408* @param[in] sumoBaseObject sumo base object used for build409* @param[in] id The id of the routeprobe410* @param[in] edgeID The edges the routeprobe is placed at411* @param[in] period the aggregation period the values the routeprobe collects shall be summed up.412* @param[in] name Calibrator name413* @param[in] file The file to read the routeprobe definitions from414* @param[in] begin The time at which to start generating output415* @param[in] vtypes list of vehicle types to be affected416* @param[in] parameters generic parameters417*/418virtual bool buildRouteProbe(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& id, const std::string& edgeID, const SUMOTime period,419const std::string& name, const std::string& file, const SUMOTime begin, const std::vector<std::string>& vTypes,420const Parameterised::Map& parameters) = 0;421422/**@brief Builds a VariableSpeedSign (lane speed additional)423* @param[in] sumoBaseObject sumo base object used for build424* @param[in] id The id of the lane speed additional425* @param[in] destLanes List of lanes affected by this speed additional426* @param[in] name VSS name427* @param[in] vtypes list of vehicle types to be affected428* @param[in] parameters generic parameters429*/430virtual bool buildVariableSpeedSign(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& id, const Position& pos,431const std::vector<std::string>& laneIDs, const std::string& name, const std::vector<std::string>& vTypes,432const Parameterised::Map& parameters) = 0;433434/**@brief Builds a VariableSpeedSign Step435* @param[in] sumoBaseObject sumo base object used for build436* @param[in] time step's time437* @param[in] speed new step's speed438*/439virtual bool buildVariableSpeedSignStep(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const SUMOTime time, const double speed) = 0;440441/**@brief Builds a vaporizer (lane speed additional)442* @param[in] sumoBaseObject sumo base object used for build443* @param[in] edgeID edge in which this vaporizer is placed444* @param[in] from time in which this vaporizer start445* @param[in] endTime time in which this vaporizer ends446* @param[in] name Vaporizer name447* @param[in] parameters generic parameters448*/449virtual bool buildVaporizer(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& edgeID, const SUMOTime from,450const SUMOTime endTime, const std::string& name, const Parameterised::Map& parameters) = 0;451452/**@brief Builds a TAZ (Traffic Assignment Zone)453* @param[in] sumoBaseObject sumo base object used for build454* @param[in] id TAZ ID455* @param[in] shape TAZ shape456* @param[in] center shape center457* @param[in] fill Whether the TAZ shall be filled458* @param[in] edgeIDs list of edges (note: This will create GNETAZSourceSinks/Sinks with default values)459* @param[in] name Vaporizer name460* @param[in] parameters generic parameters461*/462virtual bool buildTAZ(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& id, const PositionVector& shape,463const Position& center, const bool fill, const RGBColor& color, const std::vector<std::string>& edgeIDs,464const std::string& name, const Parameterised::Map& parameters) = 0;465466/**@brief Builds a TAZSource (Traffic Assignment Zone)467* @param[in] sumoBaseObject sumo base object used for build468* @param[in] TAZ Traffic Assignment Zone in which this TAZSource is palced469* @param[in] edgeID edge in which TAZSource is placed470* @param[in] departWeight depart weight of TAZSource471*/472virtual bool buildTAZSource(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& edgeID, const double departWeight) = 0;473474/**@brief Builds a TAZSink (Traffic Assignment Zone)475* @param[in] net net in which element will be inserted476* @param[in] allowUndoRedo enable or disable remove created additional with ctrl + Z / ctrl + Y477* @param[in] TAZ Traffic Assignment Zone in which this TAZSink is palced478* @param[in] edgeID edge in which TAZSink is placed479* @param[in] arrivalWeight arrival weight of TAZSink480*/481virtual bool buildTAZSink(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& edgeID, const double arrivalWeight) = 0;482483/**@brief build traction substation484* @param[in] id Traction substation ID485* @param[in] pos Position of traction substation in view (optional)486* @param[in] voltage Voltage of at connection point for the overhead wire487* @param[in] currentLimit Current limit of the feeder line488* @param[in] parameters generic parameters489*/490virtual bool buildTractionSubstation(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& id, const Position& pos,491const double voltage, const double currentLimit, const Parameterised::Map& parameters) = 0;492493/**@brief build overhead wire494* @param[in] id Overhead wire ID495* @param[in] lane Lane over which the segment is placed496* @param[in] substationId Substation to which the circuit is connected497* @param[in] laneIDs list of consecutive lanes of the circuit498* @param[in] startPos Starting position in the specified lane499* @param[in] endPos Ending position in the specified lane500* @param[in] friendlyPos enable or disable friendly position501* @param[in] forbiddenInnerLanes Inner lanes, where placing of overhead wire is restricted502* @param[in] parameters generic parameters503*/504virtual bool buildOverheadWire(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& id, const std::string& substationId,505const std::vector<std::string>& laneIDs, const double startPos, const double endPos, const bool friendlyPos,506const std::vector<std::string>& forbiddenInnerLanes, const Parameterised::Map& parameters) = 0;507508/**@brief build overhead wire clamp509* @param[in] id Overhead wire clamp ID510* @param[in] overheadWireIDStartClamp ID of the overhead wire segment, to the start of which the overhead wire clamp is connected511* @param[in] laneIDStartClamp ID of the overhead wire segment lane of overheadWireIDStartClamp512* @param[in] overheadWireIDEndClamp ID of the overhead wire segment, to the end of which the overhead wire clamp is connected513* @param[in] laneIDEndClamp ID of the overhead wire segment lane of overheadWireIDEndClamp514* @param[in] parameters generic parameters515*/516virtual bool buildOverheadWireClamp(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& id, const std::string& overheadWireIDStartClamp,517const std::string& laneIDStartClamp, const std::string& overheadWireIDEndClamp, const std::string& laneIDEndClamp,518const Parameterised::Map& parameters) = 0;519520/**@brief Builds a polygon using the given values521* @param[in] sumoBaseObject sumo base object used for build522* @param[in] id The name of the polygon523* @param[in] type The (abstract) type of the polygon524* @param[in] color The color of the polygon525* @param[in] layer The layer of the polygon526* @param[in] angle The rotation of the polygon527* @param[in] imgFile The raster image of the polygon528* @param[in] shape The shape of the polygon529* @param[in] geo specify if shape was loaded as GEO coordinate530* @param[in] fill Whether the polygon shall be filled531* @param[in] lineWidth Line width when drawing unfilled polygon532* @param[in] name polygon name533* @param[in] parameters generic parameters534*/535virtual bool buildPolygon(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& id, const std::string& type,536const RGBColor& color, const double layer, const double angle, const std::string& imgFile, const PositionVector& shape,537const bool geo, const bool fill, const double lineWidth, const std::string& name, const Parameterised::Map& parameters) = 0;538539/**@brief Builds a POI using the given values540* @param[in] sumoBaseObject sumo base object used for build541* @param[in] id The name of the POI542* @param[in] type The (abstract) type of the POI543* @param[in] color The color of the POI544* @param[in] x POI's x position545* @param[in] y POI's y position546* @param[in] icon The icon of the POI547* @param[in] layer The layer of the POI548* @param[in] angle The rotation of the POI549* @param[in] imgFile The raster image of the POI550* @param[in] width The width of the POI image551* @param[in] height The height of the POI image552* @param[in] name POI name553* @param[in] parameters generic parameters554*/555virtual bool buildPOI(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& id, const std::string& type,556const RGBColor& color, const double x, const double y, const std::string& icon, const double layer,557const double angle, const std::string& imgFile, const double width, const double height, const std::string& name,558const Parameterised::Map& parameters) = 0;559560/**@brief Builds a POI over lane using the given values561* @param[in] sumoBaseObject sumo base object used for build562* @param[in] id The name of the POI563* @param[in] type The (abstract) type of the POI564* @param[in] color The color of the POI565* @param[in] laneID The Lane in which this POI is placed566* @param[in] posOverLane The position over Lane567* @param[in] friendlyPos enable or disable friendly position568* @param[in] posLat The position lateral over Lane569* @param[in] icon The icon of the POI570* @param[in] layer The layer of the POI571* @param[in] angle The rotation of the POI572* @param[in] imgFile The raster image of the POI573* @param[in] width The width of the POI image574* @param[in] height The height of the POI image575* @param[in] name POI name576* @param[in] parameters generic parameters577*/578virtual bool buildPOILane(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& id, const std::string& type, const RGBColor& color,579const std::string& laneID, const double posOverLane, const bool friendlyPosition, const double posLat, const std::string& icon,580const double layer, const double angle, const std::string& imgFile, const double width, const double height, const std::string& name,581const Parameterised::Map& parameters) = 0;582583/**@brief Builds a POI in GEO coordinaten using the given values584* @param[in] sumoBaseObject sumo base object used for build585* @param[in] id The name of the POI586* @param[in] type The (abstract) type of the POI587* @param[in] color The color of the POI588* @param[in] lon POI's longitud589* @param[in] lat POI's latitud590* @param[in] icon The icon of the POI591* @param[in] layer The layer of the POI592* @param[in] angle The rotation of the POI593* @param[in] imgFile The raster image of the POI594* @param[in] width The width of the POI image595* @param[in] height The height of the POI image596* @param[in] name POI name597* @param[in] parameters generic parameters598*/599virtual bool buildPOIGeo(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& id, const std::string& type,600const RGBColor& color, const double lon, const double lat, const std::string& icon, const double layer,601const double angle, const std::string& imgFile, const double width, const double height, const std::string& name,602const Parameterised::Map& parameters) = 0;603604/**@brief Builds a JuPedSim walkable area using the given values605* @param[in] sumoBaseObject sumo base object used for build606* @param[in] id The name of the walkable area607* @param[in] shape The shape of the walkable area608* @param[in] geo specify if shape was loaded as GEO609* @param[in] name walkable area name610* @param[in] parameters generic parameters611*/612virtual bool buildJpsWalkableArea(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& id, const PositionVector& shape,613bool geo, const std::string& name, const Parameterised::Map& parameters) = 0;614615/**@brief Builds a JuPedSim obstacle using the given values616* @param[in] sumoBaseObject sumo base object used for build617* @param[in] id The name of the obstacle618* @param[in] shape The shape of the obstacle619* @param[in] geo specify if shape was loaded as GEO620* @param[in] name obstacle name621* @param[in] parameters generic parameters622*/623virtual bool buildJpsObstacle(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& id, const PositionVector& shape,624bool geo, const std::string& name, const Parameterised::Map& parameters) = 0;625626/// @}627628private:629/// @name parse additional attributes630/// @{631/// @brief parse busStop attributes632void parseBusStopAttributes(const SUMOSAXAttributes& attrs);633634/// @brief parse trainStop attributes635void parseTrainStopAttributes(const SUMOSAXAttributes& attrs);636637/// @brief parse access attributes638void parseAccessAttributes(const SUMOSAXAttributes& attrs);639640/// @brief parse containerStop attributes641void parseContainerStopAttributes(const SUMOSAXAttributes& attrs);642643/// @brief parse chargingStation attributes644void parseChargingStationAttributes(const SUMOSAXAttributes& attrs);645646/// @brief parse parking area attributes647void parseParkingAreaAttributes(const SUMOSAXAttributes& attrs);648649/// @brief parse parking space attributes650void parseParkingSpaceAttributes(const SUMOSAXAttributes& attrs);651652/// @brief parse E1 attributes653void parseE1Attributes(const SUMOSAXAttributes& attrs);654655/// @brief parse E2 attributes656void parseE2Attributes(const SUMOSAXAttributes& attrs);657658/// @brief parse E3 attributes659void parseE3Attributes(const SUMOSAXAttributes& attrs);660661/// @brief parse entry attributes662void parseEntryAttributes(const SUMOSAXAttributes& attrs);663664/// @brief parse exist attributes665void parseExitAttributes(const SUMOSAXAttributes& attrs);666667/// @brief parse E1 instant attributes668void parseE1InstantAttributes(const SUMOSAXAttributes& attrs);669670/// @brief parse TAZ attributes671void parseTAZAttributes(const SUMOSAXAttributes& attrs);672673/// @brief parse TAZ source attributes674void parseTAZSourceAttributes(const SUMOSAXAttributes& attrs);675676/// @brief parse TAZ sink attributes677void parseTAZSinkAttributes(const SUMOSAXAttributes& attrs);678679/// @brief parse variable speed sign attributes680void parseVariableSpeedSignAttributes(const SUMOSAXAttributes& attrs);681682/// @brief parse variable speed sign step attributes683void parseVariableSpeedSignStepAttributes(const SUMOSAXAttributes& attrs);684685/// @brief parse calibrator attributes686void parseCalibratorAttributes(const SUMOSAXAttributes& attrs);687688/// @brief parse calibrator flow attributes689void parseCalibratorFlowAttributes(const SUMOSAXAttributes& attrs);690691/// @brief parse rerouter attributes692void parseRerouterAttributes(const SUMOSAXAttributes& attrs);693694/// @brief parse rerouter interval attributes695void parseRerouterIntervalAttributes(const SUMOSAXAttributes& attrs);696697/// @brief parse closing lane reroute attributes698void parseClosingLaneRerouteAttributes(const SUMOSAXAttributes& attrs);699700/// @brief parse closing reroute attributes701void parseClosingRerouteAttributes(const SUMOSAXAttributes& attrs);702703/// @brief parse dest prob reroute attributes704void parseDestProbRerouteAttributes(const SUMOSAXAttributes& attrs);705706/// @brief parse parking area reroute attributes707void parseParkingAreaRerouteAttributes(const SUMOSAXAttributes& attrs);708709/// @brief parse route prob reroute attributes710void parseRouteProbRerouteAttributes(const SUMOSAXAttributes& attrs);711712/// @brief parse route probe attributes713void parseRouteProbeAttributes(const SUMOSAXAttributes& attrs);714715/// @brief parse vaporizer attributes716void parseVaporizerAttributes(const SUMOSAXAttributes& attrs);717718/// @brief parse traction substation719void parseTractionSubstation(const SUMOSAXAttributes& attrs);720721/// @brief parse overhead wire segment722void parseOverheadWire(const SUMOSAXAttributes& attrs);723724/// @brief parse overhead wire clamp725void parseOverheadWireClamp(const SUMOSAXAttributes& attrs);726727// @brief parse poly attributes728void parsePolyAttributes(const SUMOSAXAttributes& attrs);729730/// @brief parse POI attributes731void parsePOIAttributes(const SUMOSAXAttributes& attrs);732733/// @brief parse juPedSim walkable area attributes734void parseJpsWalkableAreaAttributes(const SUMOSAXAttributes& attrs);735736/// @brief parse juPedSim obstacle attributes737void parseJpsObstacleAttributes(const SUMOSAXAttributes& attrs);738739/// @}740741/// @brief check calibrator flow parents742bool checkCalibratorFlowParents();743744/// @brief check detect persons745bool checkDetectPersons(const SumoXMLTag currentTag, const std::string& id, const std::string& detectPersons);746747/// @brief invalidate default onstructor748AdditionalHandler() = delete;749750/// @brief invalidate copy constructor751AdditionalHandler(const AdditionalHandler& s) = delete;752753/// @brief invalidate assignment operator754AdditionalHandler& operator=(const AdditionalHandler& s) = delete;755};756757758