Eclipse SUMO - Simulation of Urban MObility
|
Builds trigger objects for guisim. More...
#include <GUITriggerBuilder.h>
Public Member Functions | |
void | buildVaporizer (const SUMOSAXAttributes &attrs) |
Builds a vaporization. | |
GUITriggerBuilder () | |
Constructor. | |
void | setHandler (NLHandler *handler) |
Sets the parent handler to use for nested parsing. | |
~GUITriggerBuilder () | |
Destructor. | |
parsing methods | |
These methods parse the attributes for each of the described trigger and call the according methods to build the trigger | |
void | parseAndBuildLaneSpeedTrigger (MSNet &net, const SUMOSAXAttributes &attrs, const std::string &base) |
Parses his values and builds a lane speed trigger. | |
void | parseAndBuildRerouter (MSNet &net, const SUMOSAXAttributes &attrs) |
Parses his values and builds a rerouter. | |
void | parseAndBuildStoppingPlace (MSNet &net, const SUMOSAXAttributes &attrs, const SumoXMLTag element) |
Parses the values and builds a stopping places for busses, trains or container vehicles. | |
void | addLotEntry (double x, double y, double z, double width, double length, double angle, double slope) |
Add a lot entry to current parking area. | |
void | addAccess (MSNet &net, const SUMOSAXAttributes &attrs) |
Parses the values and adds an access point to the currently parsed stopping place. | |
void | parseAndBeginParkingArea (MSNet &net, const SUMOSAXAttributes &attrs) |
Parses his values and builds a parking area. | |
void | parseAndAddLotEntry (const SUMOSAXAttributes &attrs) |
Parses his values and adds a lot entry to current parking area. | |
void | parseAndBuildChargingStation (MSNet &net, const SUMOSAXAttributes &attrs) |
Parses his values and builds a charging station. | |
void | parseAndBuildOverheadWireSegment (MSNet &net, const SUMOSAXAttributes &attrs) |
Parses its values and builds an overhead wire segment. | |
void | parseAndBuildOverheadWireSection (MSNet &net, const SUMOSAXAttributes &attrs) |
Parses its values and builds an overhead wire section. | |
void | parseAndBuildTractionSubstation (MSNet &net, const SUMOSAXAttributes &attrs) |
Parses its values and builds a traction substation. | |
void | parseAndBuildOverheadWireClamp (MSNet &net, const SUMOSAXAttributes &attrs) |
Parses its values and builds an overhead wire clamp. | |
void | parseAndBuildCalibrator (MSNet &net, const SUMOSAXAttributes &attrs, const std::string &base) |
Parses his values and builds a mesoscopic or microscopic calibrator. | |
void | updateParkingAreaDefaultCapacity () |
updates the parkingArea default capacity | |
MSStoppingPlace * | getCurrentStop () |
Protected Member Functions | |
void | endParkingArea () override |
End a parking area (it must be added to the SUMORTree after all parking spaces are loaded. | |
void | endStoppingPlace () override |
End a stopping place. | |
building methods | |
Override NLTriggerBuilder-methods for building guisim-objects
| |
MSLaneSpeedTrigger * | buildLaneSpeedTrigger (MSNet &net, const std::string &id, const std::vector< MSLane * > &destLanes, const std::string &file) override |
Builds a lane speed trigger. | |
MSTriggeredRerouter * | buildRerouter (MSNet &net, const std::string &id, MSEdgeVector &edges, double prob, bool off, bool optional, SUMOTime timeThreshold, const std::string &vTypes, const Position &pos, const double radius) override |
builds an rerouter | |
void | buildStoppingPlace (MSNet &net, std::string id, std::vector< std::string > lines, MSLane *lane, double frompos, double topos, const SumoXMLTag element, std::string string, int personCapacity, double parkingLength, RGBColor &color) override |
Builds a bus stop. | |
void | beginParkingArea (MSNet &net, const std::string &id, const std::vector< std::string > &lines, const std::vector< std::string > &badges, MSLane *lane, double frompos, double topos, unsigned int capacity, double width, double length, double angle, const std::string &name, bool onRoad, const std::string &departPos, bool lefthand) override |
Builds a parking area. | |
void | buildChargingStation (MSNet &net, const std::string &id, MSLane *lane, double frompos, double topos, const std::string &name, double chargingPower, double efficiency, bool chargeInTransit, SUMOTime chargeDelay, std::string chargeType, SUMOTime waitingTime, MSParkingArea *parkingArea) override |
Builds a charging station. | |
void | buildOverheadWireSegment (MSNet &net, const std::string &id, MSLane *lane, double frompos, double topos, bool voltageSource) override |
Builds an overhead wire segment. | |
void | buildOverheadWireClamp (MSNet &net, const std::string &id, MSLane *lane_start, MSLane *lane_end) override |
Builds an overhead wire clamp. | |
building methods | |
Called with parsed values, these methods build the trigger. These methods should be overriden for the gui loader in order to build visualizable versions of the triggers. In most cases, these methods only call the constructor. | |
void | buildInnerOverheadWireSegments (MSNet &net, const MSLane *connection, const MSLane *frontConnection, const MSLane *behindConnection) |
Builds an overhead wire inner segments. | |
void | buildTractionSubstation (MSNet &net, std::string id, double voltage, double currentLimit) |
Builds a traction substation. | |
virtual MSCalibrator * | buildCalibrator (const std::string &id, MSEdge *edge, MSLane *lane, MSJunction *node, double pos, const std::string &file, const std::string &outfile, const SUMOTime freq, const MSRouteProbe *probe, const double invalidJamThreshold, const std::string &vTypes, const bool local) |
builds a microscopic calibrator | |
virtual METriggeredCalibrator * | buildMECalibrator (const std::string &id, MSEdge *edge, double pos, const std::string &file, const std::string &outfile, const SUMOTime freq, MSRouteProbe *probe, const double invalidJamThreshold, const std::string &vTypes) |
builds a mesoscopic calibrator | |
helper method for obtaining and checking values | |
std::string | getFileName (const SUMOSAXAttributes &attrs, const std::string &base, const bool allowEmpty=false) |
Helper method to obtain the filename. | |
MSLane * | getLane (const SUMOSAXAttributes &attrs, const std::string &tt, const std::string &tid) |
Returns the lane defined by attribute "lane". | |
MSParkingArea * | getParkingArea (const SUMOSAXAttributes &attrs, const std::string &tt, const std::string &tid) |
Returns the parking area defined by attribute "parkingArea". | |
double | getPosition (const SUMOSAXAttributes &attrs, MSLane *lane, const std::string &tt, const std::string &tid, MSEdge *edge=0) |
returns the position on the lane checking it | |
Protected Attributes | |
MSStoppingPlace * | myCurrentStop |
The currently parsed stop to add access points to. | |
NLHandler * | myHandler |
The parent handler to set for subhandlers. | |
bool | myHaveWarnedAboutEigen = false |
MSParkingArea * | myParkingArea |
definition of the currently parsed parking area | |
bool | myParkingAreaCapacitySet = false |
Builds trigger objects for guisim.
Definition at line 49 of file GUITriggerBuilder.h.
GUITriggerBuilder::GUITriggerBuilder | ( | ) |
Constructor.
Definition at line 43 of file GUITriggerBuilder.cpp.
GUITriggerBuilder::~GUITriggerBuilder | ( | ) |
Destructor.
Definition at line 46 of file GUITriggerBuilder.cpp.
|
inherited |
Parses the values and adds an access point to the currently parsed stopping place.
[in] | net | The network the stop belongs to |
[in] | attrs | SAX-attributes which define the access |
InvalidArgument | If a parameter (lane/position) is not valid |
Definition at line 526 of file NLTriggerBuilder.cpp.
References MSStoppingPlace::addAccess(), MSLane::allowsVehicleClass(), MSStoppingPlace::CARRIAGE, SUMORouteHandler::checkStopPos(), MSStoppingPlace::DOORS, Named::getID(), NLTriggerBuilder::getLane(), MSLane::getLength(), SUMOSAXAttributes::getOpt(), SUMOSAXAttributes::getString(), NLTriggerBuilder::myCurrentStop, NLTriggerBuilder::myHandler, MSStoppingPlace::PLATFORM, SUMORouteHandler::STOPPOS_VALID, SUMO_ATTR_FRIENDLY_POS, SUMO_ATTR_LENGTH, SUMO_ATTR_POSITION, SVC_PEDESTRIAN, TL, and WRITE_WARNINGF.
Referenced by NLHandler::myStartElement().
|
inherited |
Add a lot entry to current parking area.
Simply calls the addLotEntry method for current parking area.
[in] | x | X position of the lot center |
[in] | y | Y position of the lot center |
[in] | z | Z position of the lot center |
[in] | width | Width of the lot rectangle |
[in] | length | Length of the lot rectangle |
[in] | angle | Angle of the lot rectangle |
[in] | slope | Slope of the lot rectangle |
InvalidArgument | If the current parking area is 0 |
Definition at line 839 of file NLTriggerBuilder.cpp.
References MSParkingArea::addLotEntry(), NLTriggerBuilder::myParkingArea, NLTriggerBuilder::myParkingAreaCapacitySet, and MSParkingArea::parkOnRoad().
Referenced by NLTriggerBuilder::parseAndAddLotEntry().
|
overrideprotectedvirtual |
Builds a parking area.
Simply calls the GUIParkingArea constructor.
[in] | net | The net the parking area belongs to |
[in] | id | The id of the parking area |
[in] | lines | Names of the lines that halt on this parking area |
[in] | badges | Names which grant access to this parking area |
[in] | lane | The lane the parking area is placed on |
[in] | frompos | Begin position of the parking area on the lane |
[in] | topos | End position of the parking area on the lane |
[in] | capacity | Capacity of the parking area |
[in] | width | Width of the default lot rectangle |
[in] | length | Length of the default lot rectangle |
[in] | angle | Angle of the default lot rectangle |
InvalidArgument | If the parking area can not be added to the net (is duplicate) |
Reimplemented from NLTriggerBuilder.
Definition at line 83 of file GUITriggerBuilder.cpp.
References MSNet::addStoppingPlace(), NLTriggerBuilder::myParkingArea, and SUMO_TAG_PARKING_AREA.
|
protectedvirtualinherited |
builds a microscopic calibrator
Simply calls the MSCalibrator constructor.
[in] | id | The id of the calibrator |
[in] | edge | The edge the calibrator is placed at |
[in] | lane | The lane the calibrator is placed at if it is lane specific, nullptr otherwise |
[in] | pos | The position on the edge the calibrator lies at |
[in] | file | The file to read the flows from |
[in] | outfile | The file to write calibrator statistics to |
[in] | freq | The frequency for the statistics output |
[in] | probe | an optional route probe to get distributions from |
[in] | invalidJamThreshold | stop calibrating if the relative speed drops below the threshold |
[in] | vTypes | to which vehicle types the calibrator applies |
Definition at line 778 of file NLTriggerBuilder.cpp.
References MSEdge::getLength().
Referenced by NLTriggerBuilder::parseAndBuildCalibrator().
|
overrideprotectedvirtual |
Builds a charging station.
Simply calls the GUIChargingStation constructor.
[in] | net | The net the charging station belongs to |
[in] | id | The id of the charging station |
[in] | lane | The lane the charging station is placed on |
[in] | frompos | Begin position of the charging station on the lane |
[in] | topos | End position of the charging station on the lane |
[in] | chargingPower | energy charged in every timeStep |
[in] | efficiency | efficiency of the charge |
[in] | chargeInTransit | enable or disable charge in transit |
[in] | chargeDelay | delay in the charge |
[in] | chargeType | charge type (normal, electric or fuel) |
[in] | waitingTime | waiting time until start charging |
[in] | parkingArea | The associated parking area |
InvalidArgument | If the charging station can not be added to the net (is duplicate) |
Reimplemented from NLTriggerBuilder.
Definition at line 105 of file GUITriggerBuilder.cpp.
References MSNet::addStoppingPlace(), NLTriggerBuilder::myCurrentStop, and SUMO_TAG_CHARGING_STATION.
|
protectedinherited |
Builds an overhead wire inner segments.
Simply calls the buildOverheadWireSegment for inner edges connection, frontConnection and behindConnection if exists.
[in] | net | The net the overhead wire inner segments belongs to |
[in] | connection | The inner lane that connects two regular lanes, or a regular lane with the inner "behindConnection" lane, or the inner "frontConnection" lane with a regular lane, or the inner "frontConnection" lane with the inner "behindConnection" lane |
[in] | frontConnection | The inner lane that connects a regular lane with the inner "connection" lane |
[in] | behindConnection | The inner lane that connects the inner "connection" lane with a regular lane |
InvalidArgument | If the over can not be added to the net (is duplicate according to the id) |
Definition at line 902 of file NLTriggerBuilder.cpp.
References NLTriggerBuilder::buildOverheadWireSegment(), Named::getID(), and MSLane::getLength().
Referenced by NLTriggerBuilder::parseAndBuildOverheadWireSection().
|
overrideprotectedvirtual |
Builds a lane speed trigger.
Simply calls the GUILaneSpeedTrigger constructor.
[in] | net | The net the lane speed trigger belongs to |
[in] | id | The id of the lane speed trigger |
[in] | destLanes | List of lanes affected by this speed trigger |
[in] | file | Name of the file to read the speeds to set from |
ProcessError | If the XML definition file is erroneous |
Reimplemented from NLTriggerBuilder.
Definition at line 50 of file GUITriggerBuilder.cpp.
|
protectedvirtualinherited |
builds a mesoscopic calibrator
Simply calls the METriggeredCalibrator constructor.
[in] | id | The id of the calibrator |
[in] | edge | The edge the calibrator is placed at |
[in] | pos | The position on the edge the calibrator lies at |
[in] | file | The file to read the flows from |
[in] | outfile | The file to write calibrator statistics to |
[in] | freq | The frequency for the statistics output |
[in] | probe | an optional route probe to get distributions from |
[in] | invalidJamThreshold | stop calibrating if the relative speed drops below the threshold |
[in] | vTypes | to which vehicle types the calibrator applies |
Definition at line 762 of file NLTriggerBuilder.cpp.
References MESegment::getLength(), MELoop::getSegmentForEdge(), and MSGlobals::gMesoNet.
Referenced by NLTriggerBuilder::parseAndBuildCalibrator().
|
overrideprotectedvirtual |
Builds an overhead wire clamp.
Simply calls the GUIOverheadWireClamp constructor and adds the result to the network.
[in] | net | The net the overhead wire clamp belongs to |
[in] | id | The id of the overhead wire clamp |
[in] | lane_start | The lane, where is the overhead wire segment placed, to the start of which the overhead wire clamp is connected |
[in] | lane_end | The lane, where is the overhead wire segment placed, to the end of which the overhead wire clamp is connected |
Reimplemented from NLTriggerBuilder.
Definition at line 132 of file GUITriggerBuilder.cpp.
|
overrideprotectedvirtual |
Builds an overhead wire segment.
Simply calls the GUIOverheadWire constructor and adds the result to the network.
[in] | net | The net the overhead wire segment belongs to |
[in] | id | The id of the overhead wire segment |
[in] | lane | The lane the overhead wire segment is placed on |
[in] | frompos | Begin position of the overhead wire segment on the lane |
[in] | topos | End position of the overhead wire segment on the lane |
[in] | voltageSource | If the segment is the place of the connection of a traction substation |
InvalidArgument | If the overhead wire segment can not be added to the net (is duplicate according to the id) |
Reimplemented from NLTriggerBuilder.
Definition at line 121 of file GUITriggerBuilder.cpp.
References MSNet::addStoppingPlace(), and SUMO_TAG_OVERHEAD_WIRE_SEGMENT.
|
overrideprotectedvirtual |
builds an rerouter
Simply calls the GUITriggeredRerouter constructor.
[in] | net | The net the rerouter belongs to |
[in] | id | The id of the rerouter |
[in] | edges | The edges the rerouter is placed at |
[in] | prob | The probability the rerouter reroutes vehicles with |
Reimplemented from NLTriggerBuilder.
Definition at line 60 of file GUITriggerBuilder.cpp.
|
overrideprotectedvirtual |
Builds a bus stop.
Simply calls the GUIBusStop / GUIContainerStop constructor.
[in] | net | The net the stop belongs to |
[in] | id | The id of the stop |
[in] | lines | Names of the lines that halt on this stop |
[in] | lane | The lane the stop is placed on |
[in] | frompos | Begin position of the stop on the lane |
[in] | topos | End position of the stop on the lane |
[in] | element | which kind of stop is to be built |
InvalidArgument | If the stop can not be added to the net (is duplicate) |
Reimplemented from NLTriggerBuilder.
Definition at line 70 of file GUITriggerBuilder.cpp.
References MSNet::addStoppingPlace(), NLTriggerBuilder::myCurrentStop, and toString().
|
protectedinherited |
Builds a traction substation.
Simply calls the MSTractionSubstaion cosnstructor and adds the substation to the list of substations in the net.
[in] | net | The net the traction substation belongs to |
[in] | id | The id of the traction substation |
[in] | voltage | The voltage level of the voltage source representing the traction substation |
[in] | currentLimit | The electric current limit(max current flowing from(through) the traction substation) |
InvalidArgument | If the over can not be added to the net (is duplicate according to the id) |
Definition at line 919 of file NLTriggerBuilder.cpp.
References MSNet::addTractionSubstation().
Referenced by NLTriggerBuilder::parseAndBuildTractionSubstation().
|
inherited |
Builds a vaporization.
Parses the attributes, reporting errors if the time values are false or the edge is not known. Instatiates events for enabling and disabling the vaporization otherwise.
[in] | attrs | SAX-attributes which define the vaporizer |
Definition at line 73 of file NLTriggerBuilder.cpp.
References MSEventControl::addEvent(), MSEdge::decVaporization(), MSEdge::dictionary(), SUMOSAXAttributes::get(), MSNet::getBeginOfTimestepEvents(), MSNet::getInstance(), OptionsCont::getOptions(), SUMOSAXAttributes::getSUMOTimeReporting(), MSEdge::incVaporization(), string2time(), SUMO_ATTR_BEGIN, SUMO_ATTR_END, SUMO_ATTR_ID, TL, WRITE_ERRORF, and WRITE_WARNING.
Referenced by NLHandler::myStartElement().
|
overrideprotectedvirtual |
End a parking area (it must be added to the SUMORTree after all parking spaces are loaded.
Reimplemented from NLTriggerBuilder.
Definition at line 139 of file GUITriggerBuilder.cpp.
References MSNet::getInstance(), and NLTriggerBuilder::myParkingArea.
|
overrideprotectedvirtual |
End a stopping place.
InvalidArgument | If the current stopping place is 0 |
Reimplemented from NLTriggerBuilder.
Definition at line 150 of file GUITriggerBuilder.cpp.
References MSNet::getInstance(), and NLTriggerBuilder::myCurrentStop.
|
inherited |
Definition at line 1030 of file NLTriggerBuilder.cpp.
References NLTriggerBuilder::myCurrentStop, and NLTriggerBuilder::myParkingArea.
Referenced by NLHandler::myStartElement().
|
protectedinherited |
Helper method to obtain the filename.
Retrieves "file" from attributes, checks whether it is absolute and extends it by the given base path if not. Returns this information.
[in] | attrs | The attributes to obtain the file name from |
[in] | base | The base path (the path the loaded additional file lies in) |
Definition at line 932 of file NLTriggerBuilder.cpp.
References FileHelpers::getConfigurationRelative(), SUMOSAXAttributes::getOpt(), FileHelpers::isAbsolute(), and SUMO_ATTR_FILE.
Referenced by NLTriggerBuilder::parseAndBuildCalibrator(), and NLTriggerBuilder::parseAndBuildLaneSpeedTrigger().
|
protectedinherited |
Returns the lane defined by attribute "lane".
Retrieves the lane id from the given attrs. Tries to retrieve the lane, throws an InvalidArgument if it does not exist.
[in] | attrs | The attributes to obtain the lane id from |
[in] | tt | The trigger type (for user output) |
[in] | tid | The trigger id (for user output) |
InvalidArgument | If the named lane does not exist or a lane is not named |
Definition at line 953 of file NLTriggerBuilder.cpp.
References MSLane::dictionary(), SUMOSAXAttributes::get(), MSGlobals::gUsingInternalLanes, and SUMO_ATTR_LANE.
Referenced by NLTriggerBuilder::addAccess(), NLTriggerBuilder::parseAndBeginParkingArea(), NLTriggerBuilder::parseAndBuildCalibrator(), NLTriggerBuilder::parseAndBuildChargingStation(), NLTriggerBuilder::parseAndBuildOverheadWireSegment(), and NLTriggerBuilder::parseAndBuildStoppingPlace().
|
protectedinherited |
Returns the parking area defined by attribute "parkingArea".
Retrieves the parking area id from the given attrs. Tries to retrieve the parking area, throws an InvalidArgument if it does not exist.
[in] | attrs | The attributes to obtain the parking area id from |
[in] | tt | The trigger type (for user output) |
[in] | tid | The trigger id (for user output) |
InvalidArgument | If the named parking area does not exist |
Definition at line 974 of file NLTriggerBuilder.cpp.
References MSNet::getInstance(), SUMOSAXAttributes::getOpt(), MSNet::getStoppingPlace(), SUMO_ATTR_PARKING_AREA, and SUMO_TAG_PARKING_AREA.
Referenced by NLTriggerBuilder::parseAndBuildChargingStation().
|
protectedinherited |
returns the position on the lane checking it
This method extracts the position, checks whether it shall be mirrored and checks whether it is within the lane. If not, an error is reported and a InvalidArgument is thrown.
[in] | attrs | The attributes to obtain the position from |
[in] | lane | The lane the position shall be valid for |
[in] | tt | The trigger type (for user output) |
[in] | tid | The trigger id (for user output) |
InvalidArgument | If the position is beyond the lane |
Definition at line 991 of file NLTriggerBuilder.cpp.
References SUMOSAXAttributes::get(), Named::getID(), MSEdge::getLength(), MSLane::getLength(), SUMOSAXAttributes::getOpt(), SUMO_ATTR_FRIENDLY_POS, and SUMO_ATTR_POSITION.
Referenced by NLTriggerBuilder::parseAndBuildCalibrator().
|
inherited |
Parses his values and adds a lot entry to current parking area.
[in] | attrs | SAX-attributes which define the lot entry |
Definition at line 596 of file NLTriggerBuilder.cpp.
References NLTriggerBuilder::addLotEntry(), SUMOSAXAttributes::get(), MSParkingArea::getAngle(), MSParkingArea::getLength(), SUMOSAXAttributes::getOpt(), MSParkingArea::getWidth(), NLTriggerBuilder::myParkingArea, SUMO_ATTR_ANGLE, SUMO_ATTR_LENGTH, SUMO_ATTR_SLOPE, SUMO_ATTR_WIDTH, SUMO_ATTR_X, SUMO_ATTR_Y, and SUMO_ATTR_Z.
Referenced by NLHandler::myStartElement().
|
inherited |
Parses his values and builds a parking area.
[in] | net | The network the parking area belongs to |
[in] | attrs | SAX-attributes which define the trigger |
InvalidArgument | If a parameter (lane/position) is not valid |
Definition at line 561 of file NLTriggerBuilder.cpp.
References NLTriggerBuilder::beginParkingArea(), SUMORouteHandler::checkStopPos(), SUMOSAXAttributes::get(), NLTriggerBuilder::getLane(), MSLane::getLength(), SUMOSAXAttributes::getOpt(), SUMOSAXAttributes::hasAttribute(), NLTriggerBuilder::myHandler, NLTriggerBuilder::myParkingAreaCapacitySet, SUMORouteHandler::STOPPOS_VALID, SUMO_ATTR_ACCEPTED_BADGES, SUMO_ATTR_ANGLE, SUMO_ATTR_DEPARTPOS, SUMO_ATTR_ENDPOS, SUMO_ATTR_FRIENDLY_POS, SUMO_ATTR_ID, SUMO_ATTR_LEFTHAND, SUMO_ATTR_LENGTH, SUMO_ATTR_LINES, SUMO_ATTR_NAME, SUMO_ATTR_ONROAD, SUMO_ATTR_ROADSIDE_CAPACITY, SUMO_ATTR_STARTPOS, and SUMO_ATTR_WIDTH.
Referenced by NLHandler::myStartElement().
|
inherited |
Parses his values and builds a mesoscopic or microscopic calibrator.
[in] | net | The network the calibrator belongs to |
[in] | attrs | SAX-attributes which define the trigger |
[in] | base | The base path |
InvalidArgument | If a parameter (edge/position) is not valid |
Definition at line 622 of file NLTriggerBuilder.cpp.
References NLTriggerBuilder::buildCalibrator(), NLTriggerBuilder::buildMECalibrator(), DELTA_T, MSEdge::dictionary(), NamedObjectCont< T >::get(), SUMOSAXAttributes::get(), MSNet::getDetectorControl(), MSLane::getEdge(), NLTriggerBuilder::getFileName(), Named::getID(), MSNet::getJunctionControl(), NLTriggerBuilder::getLane(), MSEdge::getLanes(), SUMOSAXAttributes::getOpt(), SUMOSAXAttributes::getOptPeriod(), NLTriggerBuilder::getPosition(), MSDetectorControl::getTypedDetectors(), MSGlobals::gUseMesoSim, SUMOSAXAttributes::hasAttribute(), NLTriggerBuilder::myHandler, GenericSAXHandler::registerParent(), SUMO_ATTR_EDGE, SUMO_ATTR_ID, SUMO_ATTR_JAM_DIST_THRESHOLD, SUMO_ATTR_LANE, SUMO_ATTR_LOCAL, SUMO_ATTR_NODE, SUMO_ATTR_OUTPUT, SUMO_ATTR_ROUTEPROBE, SUMO_ATTR_VTYPES, SUMO_TAG_CALIBRATOR, SUMO_TAG_ROUTEPROBE, and WRITE_WARNING.
Referenced by NLHandler::myStartElement().
|
inherited |
Parses his values and builds a charging station.
[in] | net | The network the charging station belongs to |
[in] | attrs | SAXattributes which define the trigger |
InvalidArgument | If a parameter (lane/position) is not valid |
Definition at line 147 of file NLTriggerBuilder.cpp.
References NLTriggerBuilder::buildChargingStation(), SUMORouteHandler::checkStopPos(), SUMOSAXAttributes::get(), NLTriggerBuilder::getLane(), MSLane::getLength(), SUMOSAXAttributes::getOpt(), SUMOSAXAttributes::getOptSUMOTimeReporting(), NLTriggerBuilder::getParkingArea(), NLTriggerBuilder::myHandler, SUMORouteHandler::STOPPOS_VALID, SUMO_ATTR_CHARGEDELAY, SUMO_ATTR_CHARGEINTRANSIT, SUMO_ATTR_CHARGETYPE, SUMO_ATTR_CHARGINGPOWER, SUMO_ATTR_EFFICIENCY, SUMO_ATTR_ENDPOS, SUMO_ATTR_FRIENDLY_POS, SUMO_ATTR_ID, SUMO_ATTR_NAME, SUMO_ATTR_STARTPOS, and SUMO_ATTR_WAITINGTIME.
Referenced by NLHandler::myStartElement().
|
inherited |
Parses his values and builds a lane speed trigger.
If one of the declaration values is errornous, an InvalidArgument is thrown.
If the XML-file parsed during initialisation is errornous, and the MSLaneSpeedTrigger-constructor throws a ProcessError due to this, this exception is catched and an InvalidArgument with the message given in the ProcessError is thrown.
[in] | net | The network the lane speed trigger belongs to |
[in] | attrs | SAX-attributes which define the trigger |
[in] | base | The base path |
InvalidArgument | If a parameter (lane/position) is not valid or the read definition is errornous |
Definition at line 109 of file NLTriggerBuilder.cpp.
References NLTriggerBuilder::buildLaneSpeedTrigger(), MSLane::dictionary(), SUMOSAXAttributes::get(), NLTriggerBuilder::getFileName(), NLTriggerBuilder::myHandler, GenericSAXHandler::registerParent(), SUMO_ATTR_ID, SUMO_ATTR_LANES, and SUMO_TAG_VSS.
Referenced by NLHandler::myStartElement().
|
inherited |
Parses its values and builds an overhead wire clamp.
An overhead wire clamp is a conductive connection of wires in the opposite direction over the road
[in] | net | The network the overhead wire clamp belongs to |
[in] | attrs | SAXattributes which define the trigger |
InvalidArgument | If the traction substation is not found in the net or if the start or end segment belongs to a different traction substation |
Definition at line 426 of file NLTriggerBuilder.cpp.
References MSTractionSubstation::addClamp(), MSTractionSubstation::findClamp(), MSNet::findTractionSubstation(), SUMOSAXAttributes::get(), MSNet::getInstance(), MSNet::getStoppingPlace(), MSGlobals::gOverheadWireSolver, SUMO_ATTR_ID, SUMO_ATTR_OVERHEAD_WIRE_CLAMP_END, SUMO_ATTR_OVERHEAD_WIRE_CLAMP_START, SUMO_ATTR_SUBSTATIONID, SUMO_TAG_OVERHEAD_WIRE_SEGMENT, TL, UNUSED_PARAMETER, WRITE_ERROR, and WRITE_WARNING.
Referenced by NLHandler::myStartElement().
|
inherited |
Parses its values and builds an overhead wire section.
[in] | net | The network the overhead wire segment belongs to |
[in] | attrs | SAXattributes which define the trigger |
InvalidArgument | If a substationId is not known, a segment is not known or is assigned to another overheadWireSection |
Definition at line 229 of file NLTriggerBuilder.cpp.
References MSTractionSubstation::addForbiddenLane(), MSTractionSubstation::addOverheadWireClampToCircuit(), MSTractionSubstation::addOverheadWireSegmentToCircuit(), NLTriggerBuilder::buildInnerOverheadWireSegments(), NLTriggerBuilder::buildOverheadWireClamp(), MSLane::dictionary(), MSTractionSubstation::OverheadWireClamp::end, MSTractionSubstation::findClamp(), MSNet::findTractionSubstation(), SUMOSAXAttributes::get(), Named::getID(), MSNet::getInstance(), MSLane::getInternalFollowingLane(), MSStoppingPlace::getLane(), MSLane::getNormalIncomingLanes(), SUMOSAXAttributes::getOpt(), MSLane::getOutgoingViaLanes(), MSNet::getStoppingPlace(), MSNet::getStoppingPlaceID(), MSOverheadWire::getTractionSubstation(), MSGlobals::gOverheadWireSolver, MSTractionSubstation::OverheadWireClamp::id, MSTractionSubstation::isAnySectionPreviouslyDefined(), MSTractionSubstation::isForbidden(), MSOverheadWire::setTractionSubstation(), MSTractionSubstation::OverheadWireClamp::start, SUMO_ATTR_OVERHEAD_WIRE_CLAMPS, SUMO_ATTR_OVERHEAD_WIRE_FORBIDDEN, SUMO_ATTR_OVERHEAD_WIRE_SEGMENTS, SUMO_ATTR_SUBSTATIONID, SUMO_TAG_OVERHEAD_WIRE_SEGMENT, TL, MSTractionSubstation::OverheadWireClamp::usage, WRITE_WARNING, and WRITE_WARNINGF.
Referenced by NLHandler::myStartElement().
|
inherited |
Parses its values and builds an overhead wire segment.
[in] | net | The network the overhead wire segment belongs to |
[in] | attrs | SAXattributes which define the trigger |
InvalidArgument | If a parameter (lane/position) is not valid |
Definition at line 183 of file NLTriggerBuilder.cpp.
References NLTriggerBuilder::buildOverheadWireSegment(), SUMORouteHandler::checkStopPos(), SUMOSAXAttributes::get(), NLTriggerBuilder::getLane(), MSLane::getLength(), SUMOSAXAttributes::getOpt(), MSGlobals::gOverheadWireSolver, MSLane::isInternal(), NLTriggerBuilder::myHandler, NLTriggerBuilder::myHaveWarnedAboutEigen, SUMORouteHandler::STOPPOS_VALID, SUMO_ATTR_ENDPOS, SUMO_ATTR_FRIENDLY_POS, SUMO_ATTR_ID, SUMO_ATTR_STARTPOS, SUMO_ATTR_VOLTAGESOURCE, TL, WRITE_MESSAGEF, and WRITE_WARNING.
Referenced by NLHandler::myStartElement().
|
inherited |
Parses his values and builds a rerouter.
[in] | net | The network the rerouter belongs to |
[in] | attrs | SAX-attributes which define the trigger |
InvalidArgument | If a parameter (edge) is not valid |
Definition at line 697 of file NLTriggerBuilder.cpp.
References NLTriggerBuilder::buildRerouter(), MSEdge::dictionary(), SUMOSAXAttributes::get(), MSTriggeredRerouter::getInstances(), SUMOSAXAttributes::getOpt(), StringTokenizer::getVector(), Position::INVALID, NLTriggerBuilder::myHandler, GenericSAXHandler::registerParent(), SUMO_ATTR_EDGES, SUMO_ATTR_HALTING_TIME_THRESHOLD, SUMO_ATTR_ID, SUMO_ATTR_OFF, SUMO_ATTR_OPTIONAL, SUMO_ATTR_POSITION, SUMO_ATTR_PROB, SUMO_ATTR_RADIUS, SUMO_ATTR_VTYPES, SUMO_TAG_REROUTER, TIME2STEPS, and StringUtils::toDouble().
Referenced by NLHandler::myStartElement().
|
inherited |
Parses the values and builds a stopping places for busses, trains or container vehicles.
[in] | net | The network the stop belongs to |
[in] | attrs | SAX-attributes which define the stop |
[in] | element | which kind of stop is to be built |
InvalidArgument | If a parameter (lane/position) is not valid |
Definition at line 485 of file NLTriggerBuilder.cpp.
References NLTriggerBuilder::buildStoppingPlace(), SUMORouteHandler::checkStopPos(), SUMOSAXAttributes::get(), NLTriggerBuilder::getLane(), SUMOSAXAttributes::getOpt(), MSStoppingPlace::getTransportablesAbreast(), RGBColor::INVISIBLE, MAX2(), NLTriggerBuilder::myHandler, SUMORouteHandler::STOPPOS_VALID, SUMO_ATTR_COLOR, SUMO_ATTR_CONTAINER_CAPACITY, SUMO_ATTR_ENDPOS, SUMO_ATTR_FRIENDLY_POS, SUMO_ATTR_ID, SUMO_ATTR_LINES, SUMO_ATTR_NAME, SUMO_ATTR_PARKING_LENGTH, SUMO_ATTR_PERSON_CAPACITY, SUMO_ATTR_STARTPOS, SUMO_TAG_CONTAINER_STOP, and toString().
Referenced by NLHandler::myStartElement().
|
inherited |
Parses its values and builds a traction substation.
[in] | net | The network the overhead wire segment belongs to |
[in] | attrs | SAXattributes which define the trigger |
InvalidArgument | If the id is not given or is empty... |
Definition at line 410 of file NLTriggerBuilder.cpp.
References NLTriggerBuilder::buildTractionSubstation(), SUMOSAXAttributes::get(), SUMOSAXAttributes::getOpt(), SUMO_ATTR_CURRENTLIMIT, SUMO_ATTR_ID, and SUMO_ATTR_VOLTAGE.
Referenced by NLHandler::myStartElement().
|
inherited |
Sets the parent handler to use for nested parsing.
[in] | handler | The netload handler to set |
Definition at line 67 of file NLTriggerBuilder.cpp.
References NLTriggerBuilder::myHandler.
Referenced by NLBuilder::init(), and GUILoadThread::run().
|
inherited |
updates the parkingArea default capacity
Definition at line 1022 of file NLTriggerBuilder.cpp.
References NLTriggerBuilder::myParkingArea, NLTriggerBuilder::myParkingAreaCapacitySet, and MSParkingArea::setRoadsideCapacity().
Referenced by NLHandler::myEndElement().
|
protectedinherited |
The currently parsed stop to add access points to.
Definition at line 524 of file NLTriggerBuilder.h.
Referenced by NLTriggerBuilder::addAccess(), NLTriggerBuilder::buildChargingStation(), buildChargingStation(), NLTriggerBuilder::buildStoppingPlace(), buildStoppingPlace(), NLTriggerBuilder::endStoppingPlace(), endStoppingPlace(), and NLTriggerBuilder::getCurrentStop().
|
protectedinherited |
The parent handler to set for subhandlers.
Definition at line 520 of file NLTriggerBuilder.h.
Referenced by NLTriggerBuilder::addAccess(), NLTriggerBuilder::parseAndBeginParkingArea(), NLTriggerBuilder::parseAndBuildCalibrator(), NLTriggerBuilder::parseAndBuildChargingStation(), NLTriggerBuilder::parseAndBuildLaneSpeedTrigger(), NLTriggerBuilder::parseAndBuildOverheadWireSegment(), NLTriggerBuilder::parseAndBuildRerouter(), NLTriggerBuilder::parseAndBuildStoppingPlace(), and NLTriggerBuilder::setHandler().
|
protectedinherited |
Definition at line 526 of file NLTriggerBuilder.h.
Referenced by NLTriggerBuilder::parseAndBuildOverheadWireSegment().
|
protectedinherited |
definition of the currently parsed parking area
Definition at line 522 of file NLTriggerBuilder.h.
Referenced by NLTriggerBuilder::addLotEntry(), NLTriggerBuilder::beginParkingArea(), beginParkingArea(), NLTriggerBuilder::endParkingArea(), endParkingArea(), NLTriggerBuilder::getCurrentStop(), NLTriggerBuilder::parseAndAddLotEntry(), and NLTriggerBuilder::updateParkingAreaDefaultCapacity().
|
protectedinherited |
Definition at line 527 of file NLTriggerBuilder.h.
Referenced by NLTriggerBuilder::addLotEntry(), NLTriggerBuilder::endParkingArea(), NLTriggerBuilder::parseAndBeginParkingArea(), and NLTriggerBuilder::updateParkingAreaDefaultCapacity().