39 const std::string& outputFilename,
const std::vector<std::string>& vehicleTypes,
const std::vector<std::string>& nextEdges,
const std::string& detectPersons,
40 const std::string& name,
const SUMOTime timeThreshold,
const double speedThreshold,
const bool openEntry,
const bool expectedArrival,
const Parameterised::Map& parameters) :
45 myOutputFilename(outputFilename),
46 myVehicleTypes(vehicleTypes),
47 myNextEdges(nextEdges),
48 myDetectPersons(detectPersons),
49 myTimeThreshold(timeThreshold),
50 mySpeedThreshold(speedThreshold),
51 myOpenEntry(openEntry),
52 myExpectedArrival(expectedArrival) {
56 if (outputFilename.empty()) {
127 access->writeAdditional(device);
303 return (canParse<double>(value) && (parse<double>(value) >= 0));
329 return canParse<double>(value) && (parse<double>(value) >= 0);
332 return canParse<bool>(value);
352 if (numEntrys == 0) {
353 WRITE_WARNING(
TL(
"An entry-exit detector needs at least one entry detector"));
356 WRITE_WARNING(
TL(
"An entry-exit detector needs at least one exit detector"));
359 return ((numEntrys != 0) && (numExits != 0));
402 myNextEdges = parse<std::vector<std::string> >(value);
424 if (
getID().size() > 0) {
@ NETWORK_MOVE
mode for moving network elements
#define WRITE_WARNING(msg)
SUMOTime string2time(const std::string &r)
convert string to SUMOTime
std::string time2string(SUMOTime t, bool humanReadable)
convert SUMOTime to string (independently of global format setting)
#define SUMOTime_MAX_PERIOD
@ SUMO_TAG_DET_ENTRY
an e3 entry point
@ SUMO_TAG_DET_EXIT
an e3 exit point
@ SUMO_TAG_ENTRY_EXIT_DETECTOR
alternative tag for e3 detector
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ SUMO_ATTR_EXPECT_ARRIVAL
@ SUMO_ATTR_HALTING_TIME_THRESHOLD
@ SUMO_ATTR_HALTING_SPEED_THRESHOLD
@ SUMO_ATTR_DETECT_PERSONS
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
void setAdditionalID(const std::string &newID)
set additional ID
bool isValidDetectorID(const std::string &value) const
check if a new detector ID is valid
std::string myAdditionalName
name of additional
void writeAdditionalAttributes(OutputDevice &device) const
write common additional attributes
void drawParentChildLines(const GUIVisualizationSettings &s, const RGBColor &color, const bool onlySymbols=false) const
draw parent and child lines
void updatedSquaredGeometry()
updated squared geometry
Position myPosOverView
position over view
void updatedSquaredCenteringBoundary(const bool updateGrid)
updated squared centering boundary
GNEMoveElementView * myMoveElementView
move element over view
void drawSquaredAdditional(const GUIVisualizationSettings &s, const double size, GUITexture texture, GUITexture selectedTexture) const
draw squared additional
const std::string getID() const
get ID (all Attribute Carriers have one)
bool mySelected
boolean to check if this AC is selected (more quickly as checking GUIGlObjectStorage)
const std::string & getTagStr() const
get tag assigned to this object in string format
const GNETagProperties * getTagProperty() const
get tagProperty associated with this Attribute Carrier
GNENet * myNet
pointer to net
const GNETagProperties * myTagProperty
reference to tagProperty associated with this attribute carrier
static void changeAttribute(GNEAttributeCarrier *AC, SumoXMLAttr key, const std::string &value, GNEUndoList *undoList, const bool force=false)
change attribute
const GNEHierarchicalContainerChildren< GNEAdditional * > & getChildAdditionals() const
return child additionals
Position getMovingAttributePosition(SumoXMLAttr key) const override
get moving attribute position
void writeMoveAttributes(OutputDevice &device) const
write move attributes
void setMovingAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList) override
set moving attribute (using undo-list)
PositionVector getMovingAttributePositionVector(SumoXMLAttr key) const override
get moving attribute positionVector
double getMovingAttributeDouble(SumoXMLAttr key) const override
get moving attribute double
std::string getMovingAttribute(SumoXMLAttr key) const override
get moving attribute
bool isMovingAttributeValid(SumoXMLAttr key, const std::string &value) const override
check if the given moving attribute is valid
bool isAdditionalValid() const
check if current additional is valid to be written into XML (must be reimplemented in all detector ch...
bool myExpectedArrival
flag for enable/disable expected arrival
std::vector< std::string > myNextEdges
next edges
double getAttributeDouble(SumoXMLAttr key) const override
std::vector< std::string > myVehicleTypes
attribute vehicle types
std::string getHierarchyName() const override
get Hierarchy Name (Used in AC Hierarchy)
std::string myOutputFilename
fielname of E3 detector
void updateCenteringBoundary(const bool updateGrid)
update centering boundary (implies change in RTREE)
SUMOTime myTimeThreshold
The time-based threshold that describes how much time has to pass until a vehicle is recognized as ha...
bool checkChildAdditionalRestriction() const
check restriction with the number of children
Parameterised * getParameters() override
get parameters associated with this multiEntryExitDetector
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
void fixAdditionalProblem()
fix additional problem (must be reimplemented in all detector children)
Position getPositionInView() const
Returns position of additional in view.
bool isValid(SumoXMLAttr key, const std::string &value) override
std::string getParentName() const
Returns the name of the parent object.
std::string myDetectPersons
detect persons
~GNEMultiEntryExitDetector()
GNEMultiEntryExitDetector Destructor.
PositionVector getAttributePositionVector(SumoXMLAttr key) const override
void splitEdgeGeometry(const double splitPosition, const GNENetworkElement *originalElement, const GNENetworkElement *newElement, GNEUndoList *undoList)
split geometry
GNEMultiEntryExitDetector(GNENet *net)
default constructor
std::string getPopUpID() const override
get PopPup ID (Used in AC Hierarchy)
std::string getAdditionalProblem() const
return a string with the current additional problem (must be reimplemented in all detector children)
std::string getAttribute(SumoXMLAttr key) const override
bool checkDrawMoveContour() const override
check if draw move contour (red)
SUMOTime myPeriod
period of E3 detector
void updateGeometry() override
update pre-computed geometry information
void writeAdditional(OutputDevice &device) const
write additional element into a xml file
bool myOpenEntry
@brie open entry
GNEMoveElement * getMoveElement() const override
methods to retrieve the elements linked to this multiEntryExitDetector
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList) override
Position getAttributePosition(SumoXMLAttr key) const override
double mySpeedThreshold
The speed-based threshold that describes how slow a vehicle has to be to be recognized as halting.
A NBNetBuilder extended by visualisation and editing capabilities.
GNEViewNet * getViewNet() const
get view net
bool getDefaultBoolValue(SumoXMLAttr attr) const
get default bool value
double getDefaultDoubleValue(SumoXMLAttr attr) const
get default double value
SUMOTime getDefaultTimeValue(SumoXMLAttr attr) const
get default time value
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
const GUIGlObject * getGUIGlObjectFront() const
get front GUIGLObject or a pointer to nullptr
bool isCurrentlyMovingElements() const
check if an element is being moved
const GNEViewNetHelper::DataViewOptions & getDataViewOptions() const
get data view options
const GNEViewNetHelper::EditModes & getEditModes() const
get edit modes
const GNEViewNetHelper::EditNetworkElementShapes & getEditNetworkElementShapes() const
get Edit Shape module
bool checkOverLockedElement(const GUIGlObject *GLObject, const bool isSelected) const
check if given element is locked (used for drawing select and delete contour)
const GNEViewNetHelper::ViewObjectsSelector & getViewObjectsSelector() const
get objects under cursor
bool selectingDetectorsTLSMode() const
check if we're selecting detectors in TLS mode
const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
Stores the information about how to visualize structures.
GUIVisualizationAdditionalSettings additionalSettings
Additional settings.
GUIVisualizationDetectorSettings detectorSettings
Detector settings.
Static storage of an output device and its base (abstract) implementation.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
An upper class for objects with additional parameters.
std::map< std::string, std::string > Map
parameters map
void writeParams(OutputDevice &device) const
write Params in the given outputdevice
A point in 2D or 3D with translation and scaling methods.
static StringBijection< PersonMode > PersonModeValues
person modes
static bool isValidListOfNetIDs(const std::string &value)
whether the given string is a valid list of id for a network (empty aren't allowed)
static bool isValidFilename(const std::string &value)
whether the given string is a valid attribute for a filename (for example, a name)
static bool isValidListOfTypeID(const std::string &value)
whether the given string is a valid list of ids for an edge or vehicle type (empty aren't allowed)
static bool isValidAttribute(const std::string &value)
whether the given string is a valid attribute for a certain key (for example, a name)
bool hasString(const std::string &str) const
check if the given string exist
bool showAdditionals() const
check if additionals has to be drawn
GNENetworkElement * getEditedNetworkElement() const
pointer to edited network element
static const RGBColor connectionColor
connection color
static const double E3Size
E3 detector size.