22 #ifndef NLDetectorBuilder_h 23 #define NLDetectorBuilder_h 99 const std::string& lane,
double pos,
SUMOTime splInterval,
100 const std::string& device,
bool friendlyPos,
101 const std::string& vTypes);
120 const std::string& lane,
double pos,
121 const std::string& device,
bool friendlyPos,
122 const std::string& vTypes);
139 const std::string& device,
SUMOTime frequency,
140 SUMOTime haltingTimeThreshold,
double haltingSpeedThreshold,
double jamDistThreshold,
141 const std::string& vTypes,
bool friendlyPos,
bool showDetector,
144 void buildE2Detector(
const std::string&
id, std::vector<MSLane*> lanes,
double pos,
double endPos,
145 const std::string& device,
SUMOTime frequency,
146 SUMOTime haltingTimeThreshold,
double haltingSpeedThreshold,
double jamDistThreshold,
147 const std::string& vTypes,
bool friendlyPos,
bool showDetector,
165 double haltingSpeedThreshold,
SUMOTime haltingTimeThreshold,
166 const std::string& vTypes);
181 void addE3Entry(
const std::string& lane,
double pos,
bool friendlyPos);
196 void addE3Exit(
const std::string& lane,
double pos,
bool friendlyPos);
235 const std::string& vtype,
SUMOTime frequency,
236 const std::string& device);
255 const std::string& device,
256 const std::string& vTypes);
278 const std::string& vTypes,
bool show =
true);
291 MSLane* lane,
double pos,
const std::string& od,
292 const std::string& vTypes);
303 SUMOTime haltingTimeThreshold,
double haltingSpeedThreshold,
double jamDistThreshold,
304 const std::string& vTypes,
bool showDetector =
true);
307 DetectorUsage usage, std::vector<MSLane*> lanes,
double pos,
double endPos,
308 SUMOTime haltingTimeThreshold,
double haltingSpeedThreshold,
double jamDistThreshold,
309 const std::string& vTypes,
bool showDetector =
true);
323 double haltingSpeedThreshold,
SUMOTime haltingTimeThreshold,
324 const std::string& vTypes);
346 const bool useLanes,
const bool withEmpty,
const bool printDefaults,
347 const bool withInternal,
const bool trackVehicles,
348 const double maxTravelTime,
const double minSamples,
349 const double haltSpeed,
const std::string& vTypes,
350 const std::string& device);
369 SUMOTime haltingTimeThreshold,
double haltingSpeedThreshold,
370 double jamDistThreshold,
371 const std::string& vTypes);
389 const std::string& device,
double haltingSpeedThreshold,
391 const std::string& vTypes);
442 const std::string& detid);
455 const std::string& detid);
465 const std::string& detid);
double getPositionChecking(double pos, MSLane *lane, bool friendlyPos, const std::string &detid)
Computes the position to use.
SumoXMLTag
Numbers representing SUMO-XML - element names.
Builds detectors for microsim.
MSE2Collector * buildSingleLaneE2Det(const std::string &id, DetectorUsage usage, MSLane *lane, double pos, double length, SUMOTime haltingTimeThreshold, double haltingSpeedThreshold, double jamDistThreshold, const std::string &vTypes)
Builds an e2 detector that lies on only one lane.
Storage for all programs of a single tls.
void buildInstantInductLoop(const std::string &id, const std::string &lane, double pos, const std::string &device, bool friendlyPos, const std::string &vTypes)
Builds an instantenous induction and adds it to the net.
MSLane * getLaneChecking(const std::string &laneID, SumoXMLTag type, const std::string &detid)
Returns the named lane.
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 double maxTravelTime, const double minSamples, const double haltSpeed, const std::string &vTypes, const std::string &device)
Creates edge based mean data collector using the given specification.
An areal detector corresponding to a sequence of consecutive lanes.
void beginE3Detector(const std::string &id, const std::string &device, SUMOTime splInterval, double haltingSpeedThreshold, SUMOTime haltingTimeThreshold, const std::string &vTypes)
Stores temporary the initial information about an e3 detector to build.
virtual MSDetectorFileOutput * createE3Detector(const std::string &id, const CrossSectionVector &entries, const CrossSectionVector &exits, double haltingSpeedThreshold, SUMOTime haltingTimeThreshold, const std::string &vTypes)
Creates an instance of an e3 detector using the given values.
void addE3Entry(const std::string &lane, double pos, bool friendlyPos)
Builds an entry point of an e3 detector.
const std::string myID
The id of the detector.
std::vector< MSCrossSection > CrossSectionVector
void buildRouteProbe(const std::string &id, const std::string &edge, SUMOTime frequency, SUMOTime begin, const std::string &device, const std::string &vTypes)
Builds a routeProbe and adds it to the net.
E3DetectorDefinition(const std::string &id, const std::string &device, double haltingSpeedThreshold, SUMOTime haltingTimeThreshold, SUMOTime splInterval, const std::string &vTypes)
Constructor.
~E3DetectorDefinition()
Destructor.
void buildVTypeProbe(const std::string &id, const std::string &vtype, SUMOTime frequency, const std::string &device)
Builds a vTypeProbe and adds it to the net.
void endE3Detector()
Builds of an e3 detector using collected values.
The simulated network and simulation perfomer.
void addE3Exit(const std::string &lane, double pos, bool friendlyPos)
Builds an exit point of an e3 detector.
E3DetectorDefinition & operator=(const E3DetectorDefinition &)
Invalidated assignment operator.
const std::string myVehicleTypes
The device the detector shall use.
A road/street connecting two junctions.
virtual MSDetectorFileOutput * createInductLoop(const std::string &id, MSLane *lane, double pos, const std::string &vTypes, bool show=true)
Creates an instance of an e1 detector using the given values.
Holds the incoming definitions of an e3 detector unless the detector is build.
virtual MSDetectorFileOutput * createInstantInductLoop(const std::string &id, MSLane *lane, double pos, const std::string &od, const std::string &vTypes)
Creates an instance of an e1 detector using the given values.
std::string getCurrentE3ID() const
Returns the id of the currently built e3 detector.
CrossSectionVector myExits
List of detector's exits.
void buildInductLoop(const std::string &id, const std::string &lane, double pos, SUMOTime splInterval, const std::string &device, bool friendlyPos, const std::string &vTypes)
Builds an e1 detector and adds it to the net.
virtual MSE2Collector * createE2Detector(const std::string &id, DetectorUsage usage, MSLane *lane, double pos, double endPos, double length, SUMOTime haltingTimeThreshold, double haltingSpeedThreshold, double jamDistThreshold, const std::string &vTypes, bool showDetector=true)
Creates a MSE2Collector instance, overridden by GUIE2Collector::createE2Detector() ...
MSEdge * getEdgeChecking(const std::string &edgeID, SumoXMLTag type, const std::string &detid)
Returns the named edge.
SUMOTime mySampleInterval
The aggregation interval.
double myHaltingSpeedThreshold
The speed a vehicle's speed must be below to be assigned as jammed.
NLDetectorBuilder(MSNet &net)
Constructor.
A single mesoscopic segment (cell)
void checkSampleInterval(SUMOTime splInterval, SumoXMLTag type, const std::string &id)
Checks whether the given frequency (sample interval) is valid.
void buildE2Detector(const std::string &id, MSLane *lane, double pos, double endPos, double length, const std::string &device, SUMOTime frequency, SUMOTime haltingTimeThreshold, double haltingSpeedThreshold, double jamDistThreshold, const std::string &vTypes, bool friendlyPos, bool showDetector, MSTLLogicControl::TLSLogicVariants *tlls=0, MSLane *toLane=0)
Builds a new E2 detector and adds it to the net's detector control. Also performs some consistency ch...
virtual ~NLDetectorBuilder()
Destructor.
E3DetectorDefinition * myE3Definition
definition of the currently parsed e3 detector
MSNet & myNet
The net to fill.
CrossSectionVector myEntries
List of detector's entries.
Representation of a lane in the micro simulation.
const std::string myDevice
The device the detector shall use.
An induction loop for mesoscopic simulation.
Base of value-generating classes (detectors)
SUMOTime myHaltingTimeThreshold
The time a vehicle's speed must be below haltingSpeedThreshold to be assigned as jammed.