35 {}, {edge}, {}, {}, {}, {TAZParent}, {}, {}),
36 myDepartWeight(departWeight) {
125 if ((maxWeightSource - minWeightSource) == 0) {
129 double percentage = (
myDepartWeight - minWeightSource) / (maxWeightSource - minWeightSource);
131 if (percentage >= 1) {
133 }
else if (percentage < 0) {
136 return toString((
int)(percentage * 10));
159 if (undoList ==
nullptr) {
184 return canParse<double>(value) && (parse<double>(value) >= 0);
@ GLO_TAZ
Traffic Assignment Zones (TAZs)
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ SUMO_TAG_TAZSINK
a sink within a district (connection road)
@ SUMO_TAG_TAZSOURCE
a source within a district (connection road)
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ GNE_ATTR_MAX_SOURCE
max source (used only by TAZs)
@ GNE_ATTR_TAZCOLOR
Color of TAZSources/TAZSinks.
@ GNE_ATTR_PARENT
parent of an additional element
@ GNE_ATTR_PARAMETERS
parameters "key1=value1|key2=value2|...|keyN=valueN"
@ GNE_ATTR_MIN_SOURCE
min source (used only by TAZs)
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
A class that stores a 2D geometrical boundary.
friend class GNEChange_Attribute
declare friend class
const std::string & getTagStr() const
get tag assigned to this object in string format
GNENet * myNet
pointer to net
const GNETagProperties & myTagProperty
the xml tag to which this attribute carrier corresponds
A road/street connecting two junctions (netedit-version)
const std::vector< GNEEdge * > & getParentEdges() const
get parent edges
const std::vector< GNETAZElement * > & getParentTAZElements() const
get parent TAZElements
void updateID(GNEAttributeCarrier *AC, const std::string newID)
update ID
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
retrieve all attribute carriers of Net
An Element which don't belongs to GNENet but has influency in the simulation.
bool isValidTAZElementID(const std::string &newID) const
check if a new TAZElement ID is valid
const std::string & getID() const
get ID
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
void updateGeometry()
update pre-computed geometry information
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform TAZElement changes
void splitEdgeGeometry(const double splitPosition, const GNENetworkElement *originalElement, const GNENetworkElement *newElement, GNEUndoList *undoList)
split geometry
void writeTAZElement(OutputDevice &device) const
writte TAZElement element into a xml file
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
std::string getAttribute(SumoXMLAttr key) const
inherited from GNEAttributeCarrier
double getDepartWeight() const
get depart weight
~GNETAZSourceSink()
destructor
double myDepartWeight
depart Weight
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
std::string getParentName() const
Returns the name of the parent object.
GNETAZSourceSink(SumoXMLTag sourceSinkTag, GNETAZElement *TAZParent, GNEEdge *edge, double departWeight)
Constructor.
double getAttributeDouble(SumoXMLAttr key) const
const PositionVector & getTAZElementShape() const
get TAZ Shape
bool isAttributeEnabled(SumoXMLAttr key) const
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Position getPositionInView() const
Returns position of additional in view.
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
Stores the information about how to visualize structures.
Static storage of an output device and its base (abstract) implementation.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
static bool areParametersValid(const std::string &value, bool report=false, ParameterisedAttrType attrType=ParameterisedAttrType::STRING, const std::string kvsep="=", const std::string sep="|")
check if given string can be parsed to a parameters map "key1=value1|key2=value2|....
void setParametersStr(const std::string ¶msString, const std::string kvsep="=", const std::string sep="|")
set the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN"
std::string getParametersStr(const std::string kvsep="=", const std::string sep="|") const
Returns the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN".
A point in 2D or 3D with translation and scaling methods.