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");
268 return (canParse<double>(value) && (parse<double>(value) >= 0));
271 if (canParse<bool>(value)) {
274 return (value ==
"default");
277 return (canParse<bool>(value));
282 return (canParse<double>(value) && (parse<double>(value) >= 0));
285 return (canParse<double>(value) && (parse<double>(value) >= 0));
287 return (canParse<double>(value) && (parse<double>(value) >= 0));
291 return (canParse<bool>(value));
296 return (value ==
"walk");
299 return canParse<std::vector<SumoXMLAttr> >(value);
301 return canParse<std::vector<GNEEdge*> >(
myNet, value,
false);
305 return (canParse<bool>(value));
380 myVTypes = parse<std::vector<std::string> >(value);
392 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 toString(const T &t, std::streamsize accuracy=gPrecision)
const std::string getID() const
get ID (all Attribute Carriers have one)
friend class GNEChange_Attribute
declare friend class
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
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
const GNETagProperties & myTagProperty
reference to tagProperty associated with this attribute carrier
double myMinSamples
minSamples
std::string myExcludeEmpty
exclude empty
std::string myEdgeFile
edge file
bool myAggregate
whether the data for all edges shall be aggregated
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)
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)
std::string getAttribute(SumoXMLAttr key) const
Position getPositionInView() const
Returns element position in view.
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.
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
void changeAttribute(GNEChange_Attribute *change)
special method for change attributes, avoid empty changes, always execute
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)