37 myArrivalWeight(arrivalWeight) {
100 if ((maxWeightSink - minWeightSink) == 0) {
104 double percentage = (
myArrivalWeight - minWeightSink) / (maxWeightSink - minWeightSink);
106 if(percentage >= 1) {
108 }
else if(percentage < 0) {
111 return toString((
int)(percentage*10));
124 if(undoList ==
nullptr) {
149 return canParse<double>(value) && (parse<double>(value) >= 0);
GNETAZSink(GNEAdditional *TAZParent, GNEEdge *edge, double arrivalWeight)
constructor
void addEdgeChild(GNEEdge *edge)
add edge child
std::string getAttribute(SumoXMLAttr key) const
inherited from GNEAttributeCarrier
void setGenericParametersStr(const std::string &value)
set generic parameters in string format
const std::string & getAdditionalID() const
returns Additional ID
Position getPositionInView() const
Returns position of additional in view.
Stores the information about how to visualize structures.
Color of TAZSources/TAZChilds.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
min sink (used only by TAZs)
void updateGeometry(bool updateGrid)
update pre-computed geometry information
void changeAdditionalID(const std::string &newID)
change ID of additional
virtual std::string getAttribute(SumoXMLAttr key) const =0
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
max sink (used only by TAZs)
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
const std::string getID() const
function to support debugging
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
A road/street connecting two junctions (netedit-version)
void commitGeometryMoving(GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of moveGeometry(...)
virtual void updateAdditionalParent()
update parent after add or remove a child (can be reimplemented, for example used for stadistics) ...
a sink within a district (connection road)
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes ...
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
double myArrivalWeight
arrival Weight
bool isValidAdditionalID(const std::string &newID) const
check if a new additional ID is valid
parent of an additional element
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
void moveGeometry(const Position &offset)
change the position of the element geometry without saving in undoList
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
std::string getParentName() const
Returns the name of the parent object.
GNEAdditional * myFirstAdditionalParent
pointer to first Additional parent
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
virtual Position getPositionInView() const =0
Returns position of additional in view.