 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
37 }, {}, {}, {TAZParent}, {}, {}, {}, {}, {}, {}),
38 myDepartWeight(departWeight) {
121 if ((maxWeightSource - minWeightSource) == 0) {
125 double percentage = (
myDepartWeight - minWeightSource) / (maxWeightSource - minWeightSource);
127 if (percentage >= 1) {
129 }
else if (percentage < 0) {
132 return toString((
int)(percentage * 10));
155 if (undoList ==
nullptr) {
180 return canParse<double>(value) && (parse<double>(value) >= 0);
An Element which don't belongs to GNENet but has influency in the simulation.
GNETAZSourceSink(SumoXMLTag sourceSinkTag, GNEAdditional *TAZParent, GNEEdge *edge, double departWeight)
Constructor.
std::string getParametersStr() const
Returns the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN".
const std::string & getAdditionalID() const
void splitEdgeGeometry(const double splitPosition, const GNENetElement *originalElement, const GNENetElement *newElement, GNEUndoList *undoList)
split geometry
const std::vector< GNEEdge * > & getParentEdges() const
get parent edges
void updateGeometry()
update pre-computed geometry information
~GNETAZSourceSink()
destructor
a source within a district (connection road)
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
void commitGeometryMoving(GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of moveGeometry(....
void changeAdditionalID(const std::string &newID)
change ID of additional
SumoXMLTag
Numbers representing SUMO-XML - element names.
GNEViewNet * myViewNet
The GNEViewNet this additional element belongs.
max source (used only by TAZs)
A road/street connecting two junctions (netedit-version)
friend class GNEChange_Attribute
declare friend class
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
GNENet * getNet() const
get the net object
min source (used only by TAZs)
const std::vector< GNEAdditional * > & getParentAdditionals() const
get parent additionals
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
std::string getAttribute(SumoXMLAttr key) const
inherited from GNEAttributeCarrier
A class that stores a 2D geometrical boundary.
parameters "key1=value1|key2=value2|...|keyN=valueN"
double getAttributeDouble(SumoXMLAttr key) const
A point in 2D or 3D with translation and scaling methods.
void moveGeometry(const Position &offset)
change the position of the element geometry without saving in undoList
std::string getParentName() const
Returns the name of the parent object.
void setParametersStr(const std::string ¶msString)
set the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN"
Position getPositionInView() const
Returns position of additional in view.
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
a sink within a district (connection road)
static bool areParametersValid(const std::string &value, bool report=false)
check if given string can be parsed to a parameters map "key1=value1|key2=value2|....
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
Color of TAZSources/TAZSinks.
double getDepartWeight() const
get depart weight
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
const std::string & getTagStr() const
get tag assigned to this object in string format
Stores the information about how to visualize structures.
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes
bool isValidAdditionalID(const std::string &newID) const
check if a new additional ID is valid
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
bool isAttributeEnabled(SumoXMLAttr key) const
double myDepartWeight
depart Weight
parent of an additional element