SUMO - Simulation of Urban MObility
|
Builds detectors for guisim. More...
#include <GUIDetectorBuilder.h>
Public Member Functions | |
MSDetectorFileOutput * | buildMultiLaneE2Det (const std::string &id, DetectorUsage usage, MSLane *lane, SUMOReal pos, SUMOReal length, SUMOTime haltingTimeThreshold, SUMOReal haltingSpeedThreshold, SUMOReal jamDistThreshold) |
Builds an e2 detector that continues on preceeding lanes. | |
MSDetectorFileOutput * | buildSingleLaneE2Det (const std::string &id, DetectorUsage usage, MSLane *lane, SUMOReal pos, SUMOReal length, SUMOTime haltingTimeThreshold, SUMOReal haltingSpeedThreshold, SUMOReal jamDistThreshold) |
Builds an e2 detector that lies on only one lane. | |
GUIDetectorBuilder (MSNet &net) | |
Constructor. | |
~GUIDetectorBuilder () | |
Destructor. | |
Detector creating methods | |
Override NLDetectorBuilder methods. | |
virtual MSDetectorFileOutput * | createInductLoop (const std::string &id, MSLane *lane, SUMOReal pos, bool splitByType) |
Creates an instance of an e1 detector using the given values. | |
virtual MSDetectorFileOutput * | createInstantInductLoop (const std::string &id, MSLane *lane, SUMOReal pos, OutputDevice &od) |
Creates an instance of an e1 detector using the given values. | |
virtual MSDetectorFileOutput * | createSingleLaneE2Detector (const std::string &id, DetectorUsage usage, MSLane *lane, SUMOReal pos, SUMOReal length, SUMOTime haltingTimeThreshold, SUMOReal haltingSpeedThreshold, SUMOReal jamDistThreshold) |
Creates an instance of an e2-detector using the given values. | |
virtual MSDetectorFileOutput * | createMultiLaneE2Detector (const std::string &id, DetectorUsage usage, MSLane *lane, SUMOReal pos, SUMOTime haltingTimeThreshold, SUMOReal haltingSpeedThreshold, SUMOReal jamDistThreshold) |
Creates an instance of an e2ol-detector using the given values. | |
virtual MSDetectorFileOutput * | createE3Detector (const std::string &id, const CrossSectionVector &entries, const CrossSectionVector &exits, SUMOReal haltingSpeedThreshold, SUMOTime haltingTimeThreshold) |
Creates an instance of an e3 detector using the given values. | |
Value parsing and detector building methods | |
void | buildInductLoop (const std::string &id, const std::string &lane, SUMOReal pos, int splInterval, OutputDevice &device, bool friendlyPos, bool splitByType) throw (InvalidArgument) |
Builds an e1 detector and adds it to the net. | |
void | buildInstantInductLoop (const std::string &id, const std::string &lane, SUMOReal pos, OutputDevice &device, bool friendlyPos) throw (InvalidArgument) |
Builds an instantenous induction and adds it to the net. | |
void | buildE2Detector (const std::string &id, const std::string &lane, SUMOReal pos, SUMOReal length, bool cont, int splInterval, OutputDevice &device, SUMOTime haltingTimeThreshold, SUMOReal haltingSpeedThreshold, SUMOReal jamDistThreshold, bool friendlyPos) throw (InvalidArgument) |
Builds an e2 detector with a fixed interval and adds it to the net. | |
void | buildE2Detector (const std::string &id, const std::string &lane, SUMOReal pos, SUMOReal length, bool cont, MSTLLogicControl::TLSLogicVariants &tlls, OutputDevice &device, SUMOTime haltingTimeThreshold, SUMOReal haltingSpeedThreshold, SUMOReal jamDistThreshold, bool friendlyPos) throw (InvalidArgument) |
Builds an e2 detector connected to a lsa. | |
void | buildE2Detector (const std::string &id, const std::string &lane, SUMOReal pos, SUMOReal length, bool cont, MSTLLogicControl::TLSLogicVariants &tlls, const std::string &tolane, OutputDevice &device, SUMOTime haltingTimeThreshold, SUMOReal haltingSpeedThreshold, SUMOReal jamDistThreshold, bool friendlyPos) throw (InvalidArgument) |
Builds an e2 detector connected to a link's state. | |
void | beginE3Detector (const std::string &id, OutputDevice &device, int splInterval, SUMOReal haltingSpeedThreshold, SUMOTime haltingTimeThreshold) throw (InvalidArgument) |
Stores temporary the initial information about an e3 detector to build. | |
void | addE3Entry (const std::string &lane, SUMOReal pos, bool friendlyPos) throw (InvalidArgument) |
Builds an entry point of an e3 detector. | |
void | addE3Exit (const std::string &lane, SUMOReal pos, bool friendlyPos) throw (InvalidArgument) |
Builds an exit point of an e3 detector. | |
void | endE3Detector () throw (InvalidArgument) |
Builds of an e3 detector using collected values. | |
std::string | getCurrentE3ID () const |
Returns the id of the currently built e3 detector. | |
void | buildVTypeProbe (const std::string &id, const std::string &vtype, SUMOTime frequency, OutputDevice &device) throw (InvalidArgument) |
Builds a vTypeProbe and adds it to the net. | |
void | buildRouteProbe (const std::string &id, const std::string &edge, SUMOTime frequency, SUMOTime begin, OutputDevice &device) throw (InvalidArgument) |
Builds a routeprobe and adds it to the net. | |
Detector creating methods | |
Virtual, so they may be overwritten, for generating gui-versions of the detectors, for example. | |
void | createEdgeLaneMeanData (const std::string &id, SUMOTime frequency, SUMOTime begin, SUMOTime end, const std::string &type, const bool useLanes, const bool withEmpty, const bool printDefaults, const bool withInternal, const bool trackVehicles, const SUMOReal maxTravelTime, const SUMOReal minSamples, const SUMOReal haltSpeed, const std::string &vTypes, OutputDevice &device) throw (InvalidArgument) |
Creates edge based mean data collector using the given specification. |
Protected Member Functions | |
void | convContE2PosLength (const std::string &id, MSLane *clane, SUMOReal &pos, SUMOReal &length, bool frinedly_pos) throw (InvalidArgument) |
Converts the length and the position information for an e2ol-detector. | |
void | convUncontE2PosLength (const std::string &id, MSLane *clane, SUMOReal &pos, SUMOReal &length, bool frinedly_pos) throw (InvalidArgument) |
Converts the length and the position information for an e2 detector. | |
SUMOReal | getPositionChecking (SUMOReal pos, MSLane *lane, bool friendlyPos, const std::string &detid) throw (InvalidArgument) |
Computes the position to use. | |
Value checking/adapting methods | |
MSEdge * | getEdgeChecking (const std::string &edgeID, SumoXMLTag type, const std::string &detid) throw (InvalidArgument) |
Returns the named edge. | |
MSLane * | getLaneChecking (const std::string &laneID, SumoXMLTag type, const std::string &detid) throw (InvalidArgument) |
Returns the named lane. | |
void | checkSampleInterval (int splInterval, SumoXMLTag type, const std::string &id) throw (InvalidArgument) |
Checks whether the given frequency (sample interval) is valid. |
Protected Attributes | |
MSNet & | myNet |
The net to fill. |
Builds detectors for guisim.
This class overrides NLDetectorBuilder's detector creation methods in order to build guisim-classes instead of microsim-classes.
Definition at line 56 of file GUIDetectorBuilder.h.
GUIDetectorBuilder::GUIDetectorBuilder | ( | MSNet & | net | ) |
Constructor.
[in] | net | The network to which's detector control built detector shall be added |
Definition at line 58 of file GUIDetectorBuilder.cpp.
GUIDetectorBuilder::~GUIDetectorBuilder | ( | ) |
Destructor.
Definition at line 62 of file GUIDetectorBuilder.cpp.
|
inherited |
Builds an entry point of an e3 detector.
If the lane is not known or the position information is not within the lane, an InvalidArgument is thrown. Otherwise a MSCrossSection is built using the obtained values and added to the list of entries of the e3 definition stored in "myE3Definition".
[in] | lane | The id of the lane the entry shall be placed at |
[in] | pos | The position on the lane the entry shall be placed at |
[in] | friendlyPos | Whether the position information shall be used "friendly" (see user docs) |
InvalidArgument | If one of the values is invalid |
Definition at line 298 of file NLDetectorBuilder.cpp.
References Named::myID, and SUMO_TAG_E3DETECTOR.
Referenced by NLHandler::addE3Entry().
|
inherited |
Builds an exit point of an e3 detector.
If the lane is not known or the position information is not within the lane, an InvalidArgument is thrown. Otherwise a MSCrossSection is built using the obtained values and added to the list of exits of the e3 definition stored in "myE3Definition".
[in] | lane | The id of the lane the exit shall be placed at |
[in] | pos | The position on the lane the exit shall be placed at |
[in] | friendlyPos | Whether the position information shall be used "friendly" (see user docs) |
InvalidArgument | If one of the values is invalid |
Definition at line 312 of file NLDetectorBuilder.cpp.
References Named::myID, and SUMO_TAG_E3DETECTOR.
Referenced by NLHandler::addE3Exit().
|
inherited |
Stores temporary the initial information about an e3 detector to build.
If the given sample interval is < 0, an InvalidArgument is thrown. Otherwise, the values are stored in a new instance of E3DetectorDefinition within "myE3Definition".
[in] | id | The id the detector shall have |
[in] | device | The output device the detector shall write into |
[in] | splInterval | The aggregation time span the detector shall use |
[in] | haltingTimeThreshold | Detector parameter: the time a vehicle's speed must be below haltingSpeedThreshold to be assigned as jammed |
[in] | haltingSpeedThreshold | Detector parameter: the speed a vehicle's speed must be below to be assigned as jammed |
InvalidArgument | If one of the values is invalid |
Definition at line 288 of file NLDetectorBuilder.cpp.
References SUMO_TAG_E3DETECTOR.
Referenced by NLHandler::beginE3Detector().
|
inherited |
Builds an e2 detector with a fixed interval and adds it to the net.
Checks the given values, first. If one of the values is invalid (lane is not known, sampling frequency<=0, position is larger than lane's length, length is too large, the id is already in use), an InvalidArgument is thrown.
Otherwise the e2 detector is built, either by calling "buildMultiLaneE2Det" if the detector shall continue on consecutive lanes, or by calling "buildSingleLaneE2Det" if it is a one-lane detector.
[in] | id | The id the detector shall have |
[in] | lane | The name of the lane the detector is placed at |
[in] | pos | The definition of the position on the lane the detector shall be placed at |
[in] | length | The definition of the length the detector shall have |
[in] | cont | Whether the detector shall continue on predeceeding lanes |
[in] | splInterval | The aggregation time span the detector shall use |
[in] | device | The output device the detector shall write into |
[in] | haltingTimeThreshold | Detector parameter: the time a vehicle's speed must be below haltingSpeedThreshold to be assigned as jammed |
[in] | haltingSpeedThreshold | Detector parameter: the speed a vehicle's speed must be below to be assigned as jammed |
[in] | jamDistThreshold | Detector parameter: the distance between two vehicles in order to not count them to one jam |
[in] | friendlyPos | Whether the position information shall be used "friendly" (see user docs) |
InvalidArgument | If one of the values is invalid |
Definition at line 158 of file NLDetectorBuilder.cpp.
References DU_USER_DEFINED, SUMO_TAG_E2DETECTOR, and SUMO_TAG_LANE_AREA_DETECTOR.
Referenced by NLHandler::addE2Detector().
|
inherited |
Builds an e2 detector connected to a lsa.
Checks the given values, first. If one of the values is invalid (lane is not known, position is larger than lane's length, length is too large, the tls is not known, the id is already in use), an InvalidArgument is thrown.
Otherwise the e2 detector is built, either by calling "buildMultiLaneE2Det" if the detector shall continue on consecutive lanes, or by calling "buildSingleLaneE2Det" if it is a one-lane detector.
[in] | id | The id the detector shall have |
[in] | lane | The name of the lane the detector is placed at |
[in] | pos | The definition of the position on the lane the detector shall be placed at |
[in] | length | The definition of the length the detector shall have |
[in] | cont | Whether the detector shall continue on predeceeding lanes |
[in] | tlls | The tls the detector is assigned to |
[in] | device | The output device the detector shall write into |
[in] | haltingTimeThreshold | Detector parameter: the time a vehicle's speed must be below haltingSpeedThreshold to be assigned as jammed |
[in] | haltingSpeedThreshold | Detector parameter: the speed a vehicle's speed must be below to be assigned as jammed |
[in] | jamDistThreshold | Detector parameter: the distance between two vehicles in order to not count them to one jam |
[in] | friendlyPos | Whether the position information shall be used "friendly" (see user docs) |
InvalidArgument | If one of the values is invalid |
Definition at line 182 of file NLDetectorBuilder.cpp.
References DU_USER_DEFINED, SUMO_TAG_E2DETECTOR, and SUMO_TAG_LANE_AREA_DETECTOR.
|
inherited |
Builds an e2 detector connected to a link's state.
Checks the given values, first. If one of the values is invalid (lane is not known, position is larger than lane's length, length is too large, the tls or the destination lane is not known, the id is already in use), an InvalidArgument is thrown.
Otherwise the e2 detector is built, either by calling "buildMultiLaneE2Det" if the detector shall continue on consecutive lanes, or by calling "buildSingleLaneE2Det" if it is a one-lane detector.
[in] | id | The id the detector shall have |
[in] | lane | The name of the lane the detector is placed at |
[in] | pos | The definition of the position on the lane the detector shall be placed at |
[in] | length | The definition of the length the detector shall have |
[in] | cont | Whether the detector shall continue on predeceeding lanes |
[in] | tlls | The tls the detector is assigned to |
[in] | tolane | The name of the lane to which the link to which the detector to build shall be assigned to points |
[in] | device | The output device the detector shall write into |
[in] | haltingTimeThreshold | Detector parameter: the time a vehicle's speed must be below haltingSpeedThreshold to be assigned as jammed |
[in] | haltingSpeedThreshold | Detector parameter: the speed a vehicle's speed must be below to be assigned as jammed |
[in] | jamDistThreshold | Detector parameter: the distance between two vehicles in order to not count them to one jam |
[in] | friendlyPos | Whether the position information shall be used "friendly" (see user docs) |
InvalidArgument | If one of the values is invalid |
Definition at line 211 of file NLDetectorBuilder.cpp.
References DU_USER_DEFINED, MSLinkContHelper::getConnectingLink(), SUMO_TAG_E2DETECTOR, and SUMO_TAG_LANE_AREA_DETECTOR.
|
inherited |
Builds an e1 detector and adds it to the net.
Checks the given values, first. If one of the values is invalid (lane is not known, sampling frequency<=0, position is larger than lane's length, the id is already in use), an InvalidArgument is thrown.
Otherwise the e1 detector is built by calling "createInductLoop".
Internally, there is also a distinction whether a mesosim e1 detector shall be built.
[in] | id | The id the detector shall have |
[in] | lane | The name of the lane the detector is placed at |
[in] | pos | The definition of the position on the lane the detector shall be placed at |
[in] | splInterval | The aggregation time span the detector shall use |
[in] | device | The output device the detector shall write into |
[in] | friendlyPos | Whether the position information shall be used "friendly" (see user docs) |
[in] | splitByType | Whether vehicle types shall be disaggregated |
InvalidArgument | If one of the values is invalid |
Definition at line 100 of file NLDetectorBuilder.cpp.
References MSLane::getEdge(), MSLane::getLength(), MSGlobals::gUseMesoSim, SUMO_TAG_E1DETECTOR, SUMO_TAG_INDUCTION_LOOP, and SUMOReal.
Referenced by NLHandler::addE1Detector().
|
inherited |
Builds an instantenous induction and adds it to the net.
Checks the given values, first. If one of the values is invalid (lane is not known, sampling frequency<=0, position is larger than lane's length, the id is already in use), an InvalidArgument is thrown.
Otherwise the e1 detector is built by calling "createInductLoop".
[in] | id | The id the detector shall have |
[in] | lane | The name of the lane the detector is placed at |
[in] | pos | The definition of the position on the lane the detector shall be placed at |
[in] | device | The output device the detector shall write into |
[in] | friendlyPos | Whether the position information shall be used "friendly" (see user docs) |
InvalidArgument | If one of the values is invalid |
Definition at line 143 of file NLDetectorBuilder.cpp.
References SUMO_TAG_INDUCTION_LOOP, and SUMO_TAG_INSTANT_INDUCTION_LOOP.
Referenced by NLHandler::addInstantE1Detector().
|
inherited |
Builds an e2 detector that continues on preceeding lanes.
[in] | id | The id the detector shall have |
[in] | usage | Information how the detector is used within the simulation |
[in] | lane | The lane the detector is placed at |
[in] | pos | The position on the lane the detector is placed at |
[in] | length | The length the detector has |
[in] | haltingTimeThreshold | Detector parameter: the time a vehicle's speed must be below haltingSpeedThreshold to be assigned as jammed |
[in] | haltingSpeedThreshold | Detector parameter: the speed a vehicle's speed must be below to be assigned as jammed |
[in] | jamDistThreshold | Detector parameter: the distance between two vehicles in order to not count them to one jam |
Definition at line 386 of file NLDetectorBuilder.cpp.
References NLDetectorBuilder::createMultiLaneE2Detector().
Referenced by MSAgentbasedTrafficLightLogic::init().
|
inherited |
Builds a routeprobe and adds it to the net.
Checks the given values, first. If one of the values is invalid (sampling frequency<=0), an InvalidArgument is thrown.
Otherwise the routeprobe is built (directly).
[in] | id | The id the detector shall have |
[in] | edge | The name of the edge the detector shall observe |
[in] | frequency | The reporting frequency |
[in] | begin | The start of the first reporting interval |
[in] | device | The output device the detector shall write into |
InvalidArgument | If one of the values is invalid |
Definition at line 360 of file NLDetectorBuilder.cpp.
References SUMO_TAG_ROUTEPROBE.
Referenced by NLHandler::addRouteProbeDetector().
|
inherited |
Builds an e2 detector that lies on only one lane.
[in] | id | The id the detector shall have |
[in] | usage | Information how the detector is used within the simulation |
[in] | lane | The lane the detector is placed at |
[in] | pos | The position on the lane the detector is placed at |
[in] | length | The length the detector has |
[in] | haltingTimeThreshold | Detector parameter: the time a vehicle's speed must be below haltingSpeedThreshold to be assigned as jammed |
[in] | haltingSpeedThreshold | Detector parameter: the speed a vehicle's speed must be below to be assigned as jammed |
[in] | jamDistThreshold | Detector parameter: the distance between two vehicles in order to not count them to one jam |
Definition at line 373 of file NLDetectorBuilder.cpp.
References NLDetectorBuilder::createSingleLaneE2Detector().
|
inherited |
Builds a vTypeProbe and adds it to the net.
Checks the given values, first. If one of the values is invalid (sampling frequency<=0), an InvalidArgument is thrown.
Otherwise the vTypeProbe is built (directly).
[in] | id | The id the detector shall have |
[in] | vtype | The name of the vehicle type the detector shall observe |
[in] | frequency | The reporting frequency |
[in] | device | The output device the detector shall write into |
InvalidArgument | If one of the values is invalid |
Definition at line 351 of file NLDetectorBuilder.cpp.
References SUMO_TAG_VTYPEPROBE.
Referenced by NLHandler::addVTypeProbeDetector().
|
protectedinherited |
Checks whether the given frequency (sample interval) is valid.
[in] | splInterval | The sample interval |
[in] | type | The type of the detector (for error message generation) |
[in] | id | The id of the detector (for error message generation) |
InvalidArgument | If the given sample interval is invalid (<=0) |
Definition at line 549 of file NLDetectorBuilder.cpp.
References toString().
|
protectedinherited |
Converts the length and the position information for an e2ol-detector.
[in] | id | The id of the currently built detector (for error message generation) |
[in] | clane | The lane the detector is placed at |
[in,out] | pos | The position definition to convert |
[in,out] | length | The length definition to convert |
InvalidArgument | If the defined position or the defined length is invalid |
Definition at line 278 of file NLDetectorBuilder.cpp.
|
protectedinherited |
Converts the length and the position information for an e2 detector.
[in] | id | The id of the currently built detector (for error message generation) |
[in] | clane | The lane the detector is placed at |
[in,out] | pos | The position definition to convert |
[in,out] | length | The length definition to convert |
InvalidArgument | If the defined position or the defined length is invalid |
Definition at line 251 of file NLDetectorBuilder.cpp.
References SUMOReal.
|
virtual |
Creates an instance of an e3 detector using the given values.
Simply calls the GUIE3Collector constructor.
[in] | id | The id the detector shall have |
[in] | entries | The list of this detector's entries |
[in] | exits | The list of this detector's exits |
[in] | haltingSpeedThreshold | Detector parameter: the speed a vehicle's speed must be below to be assigned as jammed |
[in] | haltingTimeThreshold | Detector parameter: the time a vehicle's speed must be below haltingSpeedThreshold to be assigned as jammed |
Reimplemented from NLDetectorBuilder.
Definition at line 109 of file GUIDetectorBuilder.cpp.
|
inherited |
Creates edge based mean data collector using the given specification.
[in] | id | The id the detector shall have |
[in] | frequency | The aggregation interval the detector shall use |
[in] | begin | dump begin time |
[in] | end | dump end time |
[in] | type | The type of values to be generated |
[in] | useLanes | Information whether lane-based or edge-based dump shall be generated |
[in] | withEmpty | Information whether empty lanes/edges shall be written |
[in] | withInternal | Information whether internal lanes/edges shall be written |
[in] | trackVehicles | Information whether information shall be collected per vehicle |
[in] | maxTravelTime | the maximum travel time to output |
[in] | minSamples | the minimum number of sample seconds before the values are valid |
[in] | haltSpeed | the maximum speed to consider a vehicle waiting |
[in] | vTypes | the set of vehicle types to consider |
InvalidArgument | If one of the values is invalid |
Definition at line 475 of file NLDetectorBuilder.cpp.
References MSDetectorControl::add(), MSNet::getDetectorControl(), MSNet::getInstance(), StringTokenizer::hasNext(), StringTokenizer::next(), and SUMOTime_MAX.
Referenced by NLHandler::addEdgeLaneMeanData().
|
virtual |
Creates an instance of an e1 detector using the given values.
Simply calls the GUIInductLoop constructor
[in] | id | The id the detector shall have |
[in] | lane | The lane the detector is placed at |
[in] | pos | The position on the lane the detector is placed at |
[in] | splitByType | Whether additional information split by vehicle classes shall be generated |
Reimplemented from NLDetectorBuilder.
Definition at line 66 of file GUIDetectorBuilder.cpp.
|
virtual |
Creates an instance of an e1 detector using the given values.
Simply calls the MSInductLoop constructor
[in] | id | The id the detector shall have |
[in] | lane | The lane the detector is placed at |
[in] | pos | The position on the lane the detector is placed at |
[in] | od | The output device the loop shall use |
Reimplemented from NLDetectorBuilder.
Definition at line 73 of file GUIDetectorBuilder.cpp.
|
virtual |
Creates an instance of an e2ol-detector using the given values.
Simply calls the GUI_E2_ZS_CollectorOverLanes constructor. After this call, the detector must be initialised.
[in] | id | The id the detector shall have |
[in] | lane | The lane the detector is placed at |
[in] | pos | The position on the lane the detector is placed at |
[in] | length | The length the detector has |
[in] | haltingTimeThreshold | Detector parameter: the time a vehicle's speed must be below haltingSpeedThreshold to be assigned as jammed |
[in] | haltingSpeedThreshold | Detector parameter: the speed a vehicle's speed must be below to be assigned as jammed |
[in] | jamDistThreshold | Detector parameter: the distance between two vehicles in order to not count them to one jam |
Reimplemented from NLDetectorBuilder.
Definition at line 99 of file GUIDetectorBuilder.cpp.
|
virtual |
Creates an instance of an e2-detector using the given values.
Simply calls the GUI_E2_ZS_Collector constructor
[in] | id | The id the detector shall have |
[in] | lane | The lane the detector is placed at |
[in] | pos | The position on the lane the detector is placed at |
[in] | length | The length the detector has |
[in] | haltingTimeThreshold | Detector parameter: the time a vehicle's speed must be below haltingSpeedThreshold to be assigned as jammed |
[in] | haltingSpeedThreshold | Detector parameter: the speed a vehicle's speed must be below to be assigned as jammed |
[in] | jamDistThreshold | Detector parameter: the distance between two vehicles in order to not count them to one jam |
Reimplemented from NLDetectorBuilder.
Definition at line 89 of file GUIDetectorBuilder.cpp.
|
inherited |
Builds of an e3 detector using collected values.
The parameter collected are used to build an e3 detector using "createE3Detector". The resulting detector is added to the net.
[in] | lane | The id of the lane the exit shall be placed at |
[in] | pos | The position on the lane the exit shall be placed at |
InvalidArgument | If one of the values is invalid |
Definition at line 335 of file NLDetectorBuilder.cpp.
References MSDetectorControl::add(), NLDetectorBuilder::createE3Detector(), MSNet::getDetectorControl(), NLDetectorBuilder::E3DetectorDefinition::myDevice, NLDetectorBuilder::myE3Definition, NLDetectorBuilder::E3DetectorDefinition::myEntries, NLDetectorBuilder::E3DetectorDefinition::myExits, NLDetectorBuilder::E3DetectorDefinition::myHaltingSpeedThreshold, NLDetectorBuilder::E3DetectorDefinition::myHaltingTimeThreshold, NLDetectorBuilder::E3DetectorDefinition::myID, NLDetectorBuilder::myNet, NLDetectorBuilder::E3DetectorDefinition::mySampleInterval, and SUMO_TAG_ENTRY_EXIT_DETECTOR.
Referenced by NLHandler::endE3Detector().
|
inherited |
Returns the id of the currently built e3 detector.
This is used for error-message generation only. If no id is known, "<unknown>" is returned.
Definition at line 326 of file NLDetectorBuilder.cpp.
References NLDetectorBuilder::myE3Definition, and NLDetectorBuilder::E3DetectorDefinition::myID.
Referenced by NLHandler::addE3Entry(), and NLHandler::addE3Exit().
|
protectedinherited |
Returns the named edge.
[in] | edgeID | The id of the lane |
[in] | type | The type of the detector (for error message generation) |
[in] | detid | The id of the currently built detector (for error message generation) |
InvalidArgument | If the named edge is not known |
Definition at line 525 of file NLDetectorBuilder.cpp.
References MSEdge::dictionary(), and toString().
|
protectedinherited |
Returns the named lane.
[in] | laneID | The id of the lane |
[in] | type | The type of the detector (for error message generation) |
[in] | detid | The id of the currently built detector (for error message generation) |
InvalidArgument | If the named lane is not known |
Definition at line 537 of file NLDetectorBuilder.cpp.
References MSLane::dictionary(), and toString().
|
protectedinherited |
Computes the position to use.
At first, it is checked whether the given position is negative. If so, the position is added to the lane's length to obtain the position counted backwards.
If the resulting position is beyond or in front (<0) of the lane, it is either set to the according lane's boundary (.1 or length-.1) if friendlyPos is set, or, if friendlyPos is not set, an InvalidArgument is thrown.
[in] | pos | Definition of the position on the lane |
[in] | lane | The lane the position must be valid for |
[in] | friendlyPos | Whether false positions shall be made acceptable |
[in] | detid | The id of the currently built detector (for error message generation) |
InvalidArgument | If the defined position is invalid |
Definition at line 449 of file NLDetectorBuilder.cpp.
References SUMOReal.
|
protectedinherited |
The net to fill.
Definition at line 619 of file NLDetectorBuilder.h.
Referenced by NLDetectorBuilder::endE3Detector().