37 myWeight(departWeight) {
39 setParent<GNEEdge*>(edge);
40 setParent<GNEAdditional*>(TAZParent);
175 if ((maxWeightSource - minWeightSource) == 0) {
179 double percentage = (
myWeight - minWeightSource) / (maxWeightSource - minWeightSource);
181 if (percentage >= 1) {
183 }
else if (percentage < 0) {
186 return toString((
int)(percentage * 10));
221 if (undoList ==
nullptr) {
246 return canParse<double>(value) && (parse<double>(value) >= 0);
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_MIN_SOURCE
min source (used only by TAZs)
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
const std::string getID() const
get ID (all Attribute Carriers have one)
double getCommonAttributeDouble(SumoXMLAttr key) const
PositionVector getCommonAttributePositionVector(SumoXMLAttr key) const
void setCommonAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
const std::string & getTagStr() const
get tag assigned to this object in string format
Position getCommonAttributePosition(SumoXMLAttr key) const
bool isCommonAttributeValid(SumoXMLAttr key, const std::string &value) const
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
const GNEHierarchicalContainerParents< GNEAdditional * > & getParentAdditionals() const
get parent additionals
const GNEHierarchicalContainerParents< GNEEdge * > & getParentEdges() const
get parent edges
A NBNetBuilder extended by visualisation and editing capabilities.
GNETAZSourceSink(SumoXMLTag sourceSinkTag, GNENet *net)
default Constructor
std::string getAttribute(SumoXMLAttr key) const override
inherited from GNEAttributeCarrier
double getWeight() const
get weight
PositionVector getAttributePositionVector(SumoXMLAttr key) const override
double getAttributeDouble(SumoXMLAttr key) const override
bool checkDrawDeleteContourSmall() const override
check if draw delete contour small (pink/white)
bool checkDrawRelatedContour() const override
check if draw related contour (cyan)
std::string getPopUpID() const override
get PopPup ID (Used in AC Hierarchy)
~GNETAZSourceSink()
destructor
GNEMoveElement * getMoveElement() const override
methods to retrieve the elements linked to this TAZSourceSink
bool checkDrawFromContour() const override
check if draw from contour (green)
void updateGeometry() override
update pre-computed geometry information
bool checkDrawToContour() const override
check if draw from contour (magenta)
bool checkDrawSelectContour() const override
check if draw select contour (blue)
GNEHierarchicalElement * getHierarchicalElement()
get GNEHierarchicalElement associated with this AttributeCarrier
Parameterised * getParameters() override
get parameters associated with this TAZSourceSink
bool isAttributeEnabled(SumoXMLAttr key) const override
bool checkDrawDeleteContour() const override
check if draw delete contour (pink/white)
bool checkDrawMoveContour() const override
check if draw move contour (red)
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList) override
bool isValid(SumoXMLAttr key, const std::string &value) override
GUIGlObject * getGUIGlObject() override
get GUIGlObject associated with this AttributeCarrier
std::string getHierarchyName() const override
get Hierarchy Name (Used in AC Hierarchy)
void writeTAZSourceSink(OutputDevice &device) const
write TAZ sourceSink
Position getAttributePosition(SumoXMLAttr key) const override
bool checkDrawOverContour() const override
check if draw over contour (orange)
double myWeight
depart Weight
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.
An upper class for objects with additional parameters.
A point in 2D or 3D with translation and scaling methods.