57 SUMOTime begin,
SUMOTime end,
const bool trackVehicles,
const std::vector<SumoXMLAttr>& writtenAttributes,
58 const bool aggregate,
const std::vector<std::string>& edges,
const std::string& edgeFile,
59 std::string excludeEmpty,
const bool withInternal,
const std::vector<std::string>& detectPersons,
60 const double minSamples,
const double maxTravelTime,
const std::vector<std::string>& vTypes,
const double speedThreshold) :
67myTrackVehicles(trackVehicles),
68myWrittenAttributes(writtenAttributes),
69myAggregate(aggregate),
72myExcludeEmpty(excludeEmpty),
73myWithInternal(withInternal),
74myDetectPersons(detectPersons),
75myMinSamples(minSamples),
76myMaxTravelTime(maxTravelTime),
78mySpeedThreshold(speedThreshold) {
81 myFile = (myID +
".xml");
317 return (canParse<SUMOTime>(value) && (parse<SUMOTime>(value) >= 0));
320 if (canParse<bool>(value)) {
323 return (value ==
"default");
326 return (canParse<bool>(value));
331 return (canParse<double>(value) && (parse<double>(value) >= 0));
334 return (canParse<double>(value) && (parse<double>(value) >= 0));
336 return (canParse<double>(value) && (parse<double>(value) >= 0));
340 return (canParse<bool>(value));
345 return (value ==
"walk");
348 return canParse<std::vector<SumoXMLAttr> >(value);
350 return canParse<std::vector<GNEEdge*> >(
myNet, value,
false);
354 return (canParse<bool>(value));
430 myVTypes = parse<std::vector<std::string> >(value);
442 myEdges = parse<std::vector<std::string> >(value);
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)
SumoXMLTag
Numbers representing SUMO-XML - element names.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ SUMO_ATTR_TRACK_VEHICLES
@ SUMO_ATTR_BEGIN
weights: time range begin
@ SUMO_ATTR_WITH_INTERNAL
@ SUMO_ATTR_EDGES
the edges of a route
@ SUMO_ATTR_MAX_TRAVELTIME
@ SUMO_ATTR_HALTING_SPEED_THRESHOLD
@ SUMO_ATTR_END
weights: time range end
@ SUMO_ATTR_WRITE_ATTRIBUTES
@ SUMO_ATTR_DETECT_PERSONS
@ SUMO_ATTR_EXCLUDE_EMPTY
std::string joinToString(const std::vector< T > &v, const T_BETWEEN &between, std::streamsize accuracy=gPrecision)
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
const std::string getID() const
get ID (all Attribute Carriers have one)
void setCommonAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
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
bool isCommonValid(SumoXMLAttr key, const std::string &value)
static const Parameterised::Map PARAMETERS_EMPTY
empty parameter maps (used by ACs without parameters)
void resetDefaultValues()
reset attribute carrier to their default values
GNENet * myNet
pointer to net
std::string getCommonAttribute(SumoXMLAttr key) const
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
double myMinSamples
minSamples
std::string myExcludeEmpty
exclude empty
std::string myEdgeFile
edge file
bool checkDrawOverContour() const
check if draw over contour (orange)
bool myAggregate
whether the data for all edges shall be aggregated
bool checkDrawDeleteContour() const
check if draw delete contour (pink/white)
bool checkDrawSelectContour() const
check if draw select contour (blue)
std::vector< std::string > myDetectPersons
detect persons
GNEMeanData(GNENet *net, SumoXMLTag tag, const std::string &id)
Default constructor.
std::vector< std::string > myVTypes
VTypes.
const Parameterised::Map & getACParametersMap() const
get parameters map
GUIGlObject * getGUIGlObject()
get GUIGlObject associated with this AttributeCarrier
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform data set changes
std::vector< SumoXMLAttr > myWrittenAttributes
bit mask for checking attributes to be written
std::string myFile
filename
double getAttributeDouble(SumoXMLAttr key) const
double mySpeedThreshold
speed threshold
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
std::vector< std::string > myEdges
list of edges
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
bool checkDrawFromContour() const
check if draw from contour (green)
void updateGeometry()
update pre-computed geometry information
bool myWithInternal
width internal
bool myTrackVehicles
Whether vehicles are tracked.
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
bool checkDrawToContour() const
check if draw from contour (magenta)
std::string getAttribute(SumoXMLAttr key) const
Position getPositionInView() const
Returns element position in view.
bool checkDrawRelatedContour() const
check if draw related contour (cyan)
bool checkDrawMoveContour() const
check if draw move contour (red)
double myMaxTravelTime
max travel time
~GNEMeanData()
Destructor.
void writeMeanData(OutputDevice &device) const
write meanData element into a xml file
GNEMeanData * retrieveMeanData(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named meanData.
void updateMeanDataID(GNEMeanData *meanData, const std::string &newID)
update meanData ID in container
A NBNetBuilder extended by visualisation and editing capabilities.
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
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.
std::map< std::string, std::string > Map
parameters map
A point in 2D or 3D with translation and scaling methods.
static bool isValidFilename(const std::string &value)
whether the given string is a valid attribute for a filename (for example, a name)
static bool isValidNetID(const std::string &value)
whether the given string is a valid id for a network element