38 }, {}, {}, {TAZParent}, {}, {}, {}, {}, {}, {}),
116 if ((maxWeightSource - minWeightSource) == 0) {
120 double percentage = (
myDepartWeight - minWeightSource) / (maxWeightSource - minWeightSource);
122 if (percentage >= 1) {
124 }
else if (percentage < 0) {
127 return toString((
int)(percentage * 10));
140 if (undoList ==
nullptr) {
165 return canParse<double>(value) && (parse<double>(value) >= 0);
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
SumoXMLTag
Numbers representing SUMO-XML - element names.
~GNETAZSourceSink()
destructor
a source within a district (connection road)
void commitGeometryMoving(GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of moveGeometry(...)
double getDepartWeight() const
get depart weight
void setGenericParametersStr(const std::string &value)
set generic parameters in string format
const std::string & getAdditionalID() const
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes ...
GNETAZSourceSink(SumoXMLTag sourceSinkTag, GNEAdditional *TAZParent, GNEEdge *edge, double departWeight)
Constructor.
Stores the information about how to visualize structures.
Color of TAZSources/TAZSinks.
void moveGeometry(const Position &offset)
change the position of the element geometry without saving in undoList
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
max source (used only by TAZs)
void changeAdditionalID(const std::string &newID)
change ID of additional
A class that stores a 2D geometrical boundary.
const std::vector< GNEEdge * > & getEdgeParents() const
get edge parents
GNEViewNet * myViewNet
The GNEViewNet this additional element belongs.
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
min source (used only by TAZs)
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
A point in 2D or 3D with translation and scaling methods.
static bool isGenericParametersValid(const std::string &value)
check if given string can be parsed to a map/list of generic parameters
friend class GNEChange_Attribute
declare friend class
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
const std::vector< GNEAdditional * > & getAdditionalParents() const
return vector of additionals that have as Parent this edge (For example, Calibrators) ...
std::string getAttribute(SumoXMLAttr key) const
inherited from GNEAttributeCarrier
A road/street connecting two junctions (netedit-version)
std::string getParentName() const
Returns the name of the parent object.
double myDepartWeight
depart Weight
a sink within a district (connection road)
An Element which don't belongs to GNENet but has influency in the simulation.
const std::string & getTagStr() const
get tag assigned to this object in string format
std::string getGenericParametersStr() const
return generic parameters in string format
GNENet * getNet() const
get the net object
Position getPositionInView() const
Returns position of additional in view.
bool isValidAdditionalID(const std::string &newID) const
check if a new additional ID is valid
parent of an additional element
void updateGeometry()
update pre-computed geometry information
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.