Eclipse SUMO - Simulation of Urban MObility
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
GNEDetector.cpp
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
18//
19/****************************************************************************/
20#include <config.h>
21
22#include <netedit/GNENet.h>
24#include <netedit/GNESegment.h>
25#include <netedit/GNEViewNet.h>
32
33#include "GNEDetector.h"
34
35// ===========================================================================
36// member method definitions
37// ===========================================================================
38
40 GNEAdditional("", net, "", tag, "") {
41}
42
43
44GNEDetector::GNEDetector(const std::string& id, GNENet* net, const std::string& filename, SumoXMLTag tag, const double pos, const SUMOTime period,
45 GNELane* lane, const std::string& outputFilename, const std::vector<std::string>& vehicleTypes, const std::vector<std::string>& nextEdges,
46 const std::string& detectPersons, const std::string& name, const bool friendlyPos, const Parameterised::Map& parameters) :
47 GNEAdditional(id, net, filename, tag, name),
48 Parameterised(parameters),
49 myPositionOverLane(pos),
50 myPeriod(period),
51 myOutputFilename(outputFilename),
52 myVehicleTypes(vehicleTypes),
53 myNextEdges(nextEdges),
54 myDetectPersons(detectPersons),
55 myFriendlyPosition(friendlyPos) {
56 // update output filename
57 if (outputFilename.empty()) {
58 myOutputFilename = id + ".xml";
59 }
60 // set parents
61 setParent<GNELane*>(lane);
62}
63
64
65GNEDetector::GNEDetector(const std::string& id, GNENet* net, const std::string& filename, SumoXMLTag tag, const double pos, const SUMOTime period,
66 const std::vector<GNELane*>& lanes, const std::string& outputFilename, const std::vector<std::string>& vehicleTypes,
67 const std::vector<std::string>& nextEdges, const std::string& detectPersons, const std::string& name, const bool friendlyPos,
68 const Parameterised::Map& parameters) :
69 GNEAdditional(id, net, filename, tag, name),
70 Parameterised(parameters),
71 myPositionOverLane(pos),
72 myPeriod(period),
73 myOutputFilename(outputFilename),
74 myVehicleTypes(vehicleTypes),
75 myNextEdges(nextEdges),
76 myDetectPersons(detectPersons),
77 myFriendlyPosition(friendlyPos) {
78 // update output filename
79 if (outputFilename.empty()) {
80 myOutputFilename = id + ".xml";
81 }
82 // set parents
83 setParents<GNELane*>(lanes);
84}
85
86
87GNEDetector::GNEDetector(GNEAdditional* additionalParent, SumoXMLTag tag, const double pos, const SUMOTime period, GNELane* lane,
88 const std::string& outputFilename, const std::string& name, const bool friendlyPos, const Parameterised::Map& parameters) :
89 GNEAdditional(additionalParent, tag, name),
90 Parameterised(parameters),
91 myPositionOverLane(pos),
92 myPeriod(period),
93 myOutputFilename(outputFilename),
94 myFriendlyPosition(friendlyPos) {
95 // set parents
96 setParent<GNELane*>(lane);
97 setParent<GNEAdditional*>(additionalParent);
98}
99
100
102
103
106 // check modes and detector type
108 return nullptr;
113 } else {
114 // return move operation for detectors with single position placed over shape (E1, EntryExits..)
115 return new GNEMoveOperation(this, getParentLanes().front(), myPositionOverLane,
117 }
118}
119
120
121double
125
126
127bool
129 // get edit modes
130 const auto& editModes = myNet->getViewNet()->getEditModes();
131 // check if we're in move mode
132 if (!myNet->getViewNet()->isCurrentlyMovingElements() && editModes.isCurrentSupermodeNetwork() &&
134 (editModes.networkEditMode == NetworkEditMode::NETWORK_MOVE) && myNet->getViewNet()->checkOverLockedElement(this, mySelected)) {
135 // only move the first element
137 // special case for multiple lane area detectors
139 auto segment = gViewObjectsHandler.getSelectedSegment(this);
140 if (segment && segment->getJunction()) {
141 return false;
142 } else if (segment && segment->getLane()) {
143 // ensure that is the first or the last lane
144 if (segment->getLaneIndex() == 0) {
145 return true;
146 } else if (segment->getLaneIndex() == ((int)getParentLanes().size() - 1)) {
147 return true;
148 }
149 } else {
150 // this is the start or end point
151 return true;
152 }
153 } else {
154 return true;
155 }
156 }
157 }
158 return false;
159}
160
161
162GNELane*
164 return getParentLanes().front();
165}
166
167
172
173
174void
175GNEDetector::updateCenteringBoundary(const bool /*updateGrid*/) {
176 // nothing to update
177}
178
179void
180GNEDetector::splitEdgeGeometry(const double splitPosition, const GNENetworkElement* originalElement,
181 const GNENetworkElement* newElement, GNEUndoList* undoList) {
182 // only split geometry of E2 multilane detectors
184 // obtain new list of E2 lanes
185 std::string newE2Lanes = getNewListOfParents(originalElement, newElement);
186 // update E2 Lanes
187 if (newE2Lanes.size() > 0) {
188 setAttribute(SUMO_ATTR_LANES, newE2Lanes, undoList);
189 }
190 } else if (splitPosition < myPositionOverLane) {
191 // change lane
192 setAttribute(SUMO_ATTR_LANE, newElement->getID(), undoList);
193 // now adjust start position
194 setAttribute(SUMO_ATTR_POSITION, toString(myPositionOverLane - splitPosition), undoList);
195 }
196}
197
198
199double
201 double fixedPos = myPositionOverLane;
202 const double len = getLane()->getParentEdge()->getNBEdge()->getFinalLength();
203 double length = 0;
204 GNEAdditionalHandler::fixLanePosition(fixedPos, length, len);
205 return (fixedPos * getLane()->getLengthGeometryFactor());
206}
207
208
209
210std::string
212 return getLane()->getID();
213}
214
215
220
221
222std::string
224 return getTagStr() + ": " + getID();
225}
226
227
228std::string
230 return getTagStr();
231}
232
233
234std::string
236 switch (key) {
237 case SUMO_ATTR_ID:
238 return getMicrosimID();
239 case SUMO_ATTR_LANE:
240 return getParentLanes().front()->getID();
243 case SUMO_ATTR_PERIOD:
245 return "";
246 } else {
247 return time2string(myPeriod);
248 }
249 case SUMO_ATTR_NAME:
250 return myAdditionalName;
251 case SUMO_ATTR_FILE:
252 return myOutputFilename;
253 case SUMO_ATTR_VTYPES:
254 return toString(myVehicleTypes);
256 return toString(myNextEdges);
262 return "";
263 default:
264 return getCommonAttribute(this, key);
265 }
266}
267
268
269double
271 switch (key) {
273 return myPositionOverLane;
274 default:
275 throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'");
276 }
277}
278
279
280void
281GNEDetector::setDetectorAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) {
282 switch (key) {
283 case SUMO_ATTR_ID:
284 case SUMO_ATTR_LANE:
286 case SUMO_ATTR_PERIOD:
287 case SUMO_ATTR_NAME:
288 case SUMO_ATTR_FILE:
289 case SUMO_ATTR_VTYPES:
294 GNEChange_Attribute::changeAttribute(this, key, value, undoList);
295 break;
296 default:
297 setCommonAttribute(key, value, undoList);
298 break;
299 }
300}
301
302
303
304bool
305GNEDetector::isDetectorValid(SumoXMLAttr key, const std::string& value) {
306 switch (key) {
307 case SUMO_ATTR_ID:
308 return isValidDetectorID(value);
309 case SUMO_ATTR_LANE:
310 if (myNet->getAttributeCarriers()->retrieveLane(value, false) != nullptr) {
311 return true;
312 } else {
313 return false;
314 }
316 return canParse<double>(value) && fabs(parse<double>(value)) < getParentLanes().front()->getParentEdge()->getNBEdge()->getFinalLength();
317 case SUMO_ATTR_PERIOD:
318 if (value.empty()) {
319 return true;
320 } else {
321 return (canParse<double>(value) && (parse<double>(value) >= 0));
322 }
323 case SUMO_ATTR_NAME:
325 case SUMO_ATTR_FILE:
327 case SUMO_ATTR_VTYPES:
328 if (value.empty()) {
329 return true;
330 } else {
332 }
334 if (value.empty()) {
335 return true;
336 } else {
338 }
340 if (value.empty()) {
341 return true;
342 } else {
344 }
346 return canParse<bool>(value);
347 default:
348 return isCommonValid(key, value);
349 }
350}
351
352
353void
377
378
379void
380GNEDetector::setDetectorAttribute(SumoXMLAttr key, const std::string& value) {
381 switch (key) {
382 case SUMO_ATTR_ID:
383 // update microsimID
384 setAdditionalID(value);
385 break;
386 case SUMO_ATTR_LANE:
388 break;
390 myPositionOverLane = parse<double>(value);
391 break;
392 case SUMO_ATTR_PERIOD:
393 if (value.empty()) {
395 } else {
396 myPeriod = string2time(value);
397 }
398 break;
399 case SUMO_ATTR_FILE:
400 myOutputFilename = value;
401 break;
402 case SUMO_ATTR_NAME:
403 myAdditionalName = value;
404 break;
405 case SUMO_ATTR_VTYPES:
406 myVehicleTypes = parse<std::vector<std::string> >(value);
407 break;
409 myNextEdges = parse<std::vector<std::string> >(value);
410 break;
412 myDetectPersons = value;
413 break;
415 myFriendlyPosition = parse<bool>(value);
416 break;
419 break;
420 default:
421 setCommonAttribute(this, key, value);
422 break;
423 }
424}
425
426
427void
429 const RGBColor& mainColor, const RGBColor& secondColor) const {
430 // push matrix
432 // set line width
433 glLineWidth(1.0);
434 // translate to center geometry
435 glTranslated(myAdditionalGeometry.getShape().front().x(), myAdditionalGeometry.getShape().front().y(), 0);
436 // rotate over lane
438 // scale
439 glScaled(exaggeration, exaggeration, 1);
440 // set main color
441 GLHelper::setColor(mainColor);
442 // begin draw square
443 glBegin(GL_QUADS);
444 // draw square
445 glVertex2d(-1.0, 2);
446 glVertex2d(-1.0, -2);
447 glVertex2d(1.0, -2);
448 glVertex2d(1.0, 2);
449 // end draw square
450 glEnd();
451 // move top
452 glTranslated(0, 0, .01);
453 // begin draw line
454 glBegin(GL_LINES);
455 // draw lines
456 glVertex2d(0, 2 - .1);
457 glVertex2d(0, -2 + .1);
458 // end draw line
459 glEnd();
460 // draw center only in draw in level 2
462 // set main color
463 GLHelper::setColor(secondColor);
464 // set polygon mode
465 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
466 // begin draw square
467 glBegin(GL_QUADS);
468 // draw square
469 glVertex2f(-1.0, 2);
470 glVertex2f(-1.0, -2);
471 glVertex2f(1.0, -2);
472 glVertex2f(1.0, 2);
473 // end draw square
474 glEnd();
475 // rotate 90 degrees
476 glRotated(90, 0, 0, -1);
477 //set polygon mode
478 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
479 // begin draw line
480 glBegin(GL_LINES);
481 // draw line
482 glVertex2d(0, 1.7);
483 glVertex2d(0, -1.7);
484 // end draw line
485 glEnd();
486 //arrow
487 glTranslated(2, 0, 0);
488 GLHelper::setColor(mainColor);
489 GLHelper::drawTriangleAtEnd(Position(0, 0), Position(0.5, 0), (double) 0.5, (double) 1);
490 }
491 // pop matrix
493}
494
495
496void
498 const double exaggeration, const std::string& logo, const RGBColor& textColor) const {
499 // only draw in level 2
501 // calculate position
502 const Position pos = myAdditionalGeometry.getShape().front();
503 // calculate rotation
504 const double rot = s.getTextAngle(myAdditionalGeometry.getShapeRotations().front() + 90);
505 // Start pushing matrix
507 // Traslate to position
508 glTranslated(pos.x(), pos.y(), 0.1);
509 // scale text
510 glScaled(exaggeration, exaggeration, 1);
511 // draw E1 logo
512 GLHelper::drawText(logo + " ", Position(), .1, 1.5, textColor, rot);
513 // pop matrix
515 }
516}
517
518
519void
521 const double exaggeration, const std::string& logo, const RGBColor& textColor) const {
522 // only draw in level 2
524 // calculate middle point
525 const double middlePoint = (myAdditionalGeometry.getShape().length2D() * 0.5);
526 // calculate position
527 const Position pos = myAdditionalGeometry.getShape().positionAtOffset2D(middlePoint);
528 // calculate rotation
529 const double rot = s.getTextAngle(myAdditionalGeometry.getShape().rotationDegreeAtOffset(middlePoint) + 90);
530 // Start pushing matrix
532 // Traslate to position
533 glTranslated(pos.x(), pos.y(), 0.1);
534 // scale text
535 glScaled(exaggeration, exaggeration, 1);
536 // draw E1 logo
537 GLHelper::drawText(logo, Position(), .1, 1.5, textColor, rot);
538 // pop matrix
540 }
541}
542
543/****************************************************************************/
@ NETWORK_MOVE
mode for moving network elements
long long int SUMOTime
Definition GUI.h:36
GUIViewObjectsHandler gViewObjectsHandler
SUMOTime string2time(const std::string &r)
convert string to SUMOTime
Definition SUMOTime.cpp:46
std::string time2string(SUMOTime t, bool humanReadable)
convert SUMOTime to string (independently of global format setting)
Definition SUMOTime.cpp:91
#define SUMOTime_MAX_PERIOD
Definition SUMOTime.h:36
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ GNE_TAG_MULTI_LANE_AREA_DETECTOR
an e2 detector over multiple lanes (placed here due create Additional Frame)
@ SUMO_TAG_LANE_AREA_DETECTOR
alternative tag for e2 detector
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ SUMO_ATTR_LANE
@ SUMO_ATTR_NEXT_EDGES
@ SUMO_ATTR_FILE
@ SUMO_ATTR_ENDPOS
@ SUMO_ATTR_LANES
@ SUMO_ATTR_VTYPES
@ SUMO_ATTR_NAME
@ SUMO_ATTR_PERIOD
@ SUMO_ATTR_FRIENDLY_POS
@ SUMO_ATTR_ID
@ SUMO_ATTR_POSITION
@ GNE_ATTR_SHIFTLANEINDEX
shift lane index (only used by elements over lanes)
@ SUMO_ATTR_DETECT_PERSONS
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition ToString.h:46
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
Definition GLHelper.cpp:649
static void drawTriangleAtEnd(const Position &p1, const Position &p2, double tLength, double tWidth, const double extraOffset=0)
Draws a triangle at the end of the given line.
Definition GLHelper.cpp:624
static void popMatrix()
pop matrix
Definition GLHelper.cpp:131
static void pushMatrix()
push matrix
Definition GLHelper.cpp:118
static void drawText(const std::string &text, const Position &pos, const double layer, const double size, const RGBColor &col=RGBColor::BLACK, const double angle=0, const int align=0, double width=-1)
Definition GLHelper.cpp:748
static void fixLanePosition(double &pos, double &length, const double laneLength)
fix given position over lane
void setAdditionalID(const std::string &newID)
set additional ID
GUIGeometry myAdditionalGeometry
geometry to be precomputed in updateGeometry(...)
bool isValidDetectorID(const std::string &value) const
check if a new detector ID is valid
void replaceAdditionalParentLanes(const std::string &value)
replace additional parent lanes
void shiftLaneIndex()
shift lane index
GNEMoveOperation * getMoveOperationMultiLane(const double startPos, const double endPos)
get moveOperation for an element over multi lane
std::string myAdditionalName
name of additional
GNEMoveOperation * getMoveOperationSingleLane(const double startPos, const double endPos)
get moveOperation for an element over single lane
const std::string getID() const
get ID (all Attribute Carriers have one)
bool mySelected
boolean to check if this AC is selected (more quickly as checking GUIGlObjectStorage)
std::string getCommonAttribute(const Parameterised *parameterised, 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
GNENet * myNet
pointer to net
bool isCommonValid(SumoXMLAttr key, const std::string &value) 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
SUMOTime myPeriod
The aggregation period the values the detector collects shall be summed up.
void drawE2DetectorLogo(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const double exaggeration, const std::string &logo, const RGBColor &textColor) const
draw E2 detector Logo
double myPositionOverLane
position of detector over Lane
Position getPositionInView() const
Returns position of additional in view.
std::string myOutputFilename
The path to the output file.
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
~GNEDetector()
Destructor.
bool isDetectorValid(SumoXMLAttr key, const std::string &value)
double getPositionOverLane() const
get position over lane
double getGeometryPositionOverLane() const
get position over lane that is applicable to the shape
GNELane * getLane() const
get lane
virtual double getAttributeDouble(SumoXMLAttr key) const =0
void setDetectorAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
std::vector< std::string > myNextEdges
next edges
GNEMoveOperation * getMoveOperation()
get move operation
void drawE1Shape(const GUIVisualizationSettings::Detail d, const double exaggeration, const RGBColor &mainColor, const RGBColor &secondColor) const
draw E1 shape
const Parameterised::Map & getACParametersMap() const
get parameters map
double getDetectorAttributeDouble(SumoXMLAttr key) const
bool checkDrawMoveContour() const
check if draw move contour (red)
GNEDetector(GNENet *net, SumoXMLTag tag)
Default constructor.
void writeDetectorValues(OutputDevice &device) const
write additional element into a xml file
void splitEdgeGeometry(const double splitPosition, const GNENetworkElement *originalElement, const GNENetworkElement *newElement, GNEUndoList *undoList)
split geometry
bool myFriendlyPosition
Flag for friendly position.
void updateCenteringBoundary(const bool updateGrid)
update centering boundary (implies change in RTREE)
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
std::string getDetectorAttribute(SumoXMLAttr key) const
std::vector< std::string > myVehicleTypes
attribute vehicle types
void drawE1DetectorLogo(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const double exaggeration, const std::string &logo, const RGBColor &textColor) const
draw E1 detector Logo
std::string myDetectPersons
detect persons
virtual void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)=0
method for setting the attribute and letting the object perform additional changes
std::string getParentName() const
Returns the name of the parent object.
NBEdge * getNBEdge() const
returns the internal NBEdge
Definition GNEEdge.cpp:829
const GNEHierarchicalContainerParents< GNELane * > & getParentLanes() const
get parent lanes
std::string getNewListOfParents(const GNENetworkElement *currentElement, const GNENetworkElement *newNextElement) const
if use edge/parent lanes as a list of consecutive elements, obtain a list of IDs of elements after in...
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition GNELane.h:46
GNEEdge * getParentEdge() const
get parent edge
Definition GNELane.cpp:202
bool getAllowChangeLane() const
allow change lane
CommonMoveOptions * getCommonMoveOptions() const
get common mode options
move operation
GNELane * retrieveLane(const std::string &id, bool hardFail=true, bool checkVolatileChange=false) const
get lane by id
A NBNetBuilder extended by visualisation and editing capabilities.
Definition GNENet.h:42
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
Definition GNENet.cpp:146
GNEViewNet * getViewNet() const
get view net
Definition GNENet.cpp:2194
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
const GUIGlObject * getGUIGlObjectFront() const
get front GUIGLObject or a pointer to nullptr
bool isCurrentlyMovingElements() const
check if an element is being moved
const GNEViewNetHelper::EditModes & getEditModes() const
get edit modes
const GNEViewNetHelper::EditNetworkElementShapes & getEditNetworkElementShapes() const
get Edit Shape module
GNEViewParent * getViewParent() const
get the net object
bool checkOverLockedElement(const GUIGlObject *GLObject, const bool isSelected) const
check if given element is locked (used for drawing select and delete contour)
const GNEViewNetHelper::ViewObjectsSelector & getViewObjectsSelector() const
get objects under cursor
GNEMoveFrame * getMoveFrame() const
get frame for move elements
static void rotateOverLane(const double rot)
rotate over lane (used by Lock icons, detector logos, etc.)
const std::vector< double > & getShapeRotations() const
The rotations of the single shape parts.
const PositionVector & getShape() const
The shape of the additional element.
const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
const GNESegment * getSelectedSegment(const GUIGlObject *GLObject) const
get segment associated with the given GLObject (if exist)
Stores the information about how to visualize structures.
double getTextAngle(double objectAngle) const
return an angle that is suitable for reading text aligned with the given angle (degrees)
double getFinalLength() const
get length that will be assigned to the lanes in the final network
Definition NBEdge.cpp:4809
Static storage of an output device and its base (abstract) implementation.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
An upper class for objects with additional parameters.
std::map< std::string, std::string > Map
parameters map
const Parameterised::Map & getParametersMap() const
Returns the inner key/value map.
A point in 2D or 3D with translation and scaling methods.
Definition Position.h:37
double x() const
Returns the x-position.
Definition Position.h:52
double y() const
Returns the y-position.
Definition Position.h:57
double length2D() const
Returns the length.
Position getPolygonCenter() const
Returns the arithmetic of all corner points.
double rotationDegreeAtOffset(double pos) const
Returns the rotation at the given length.
Position positionAtOffset2D(double pos, double lateralOffset=0, bool extrapolateBeyond=false) const
Returns the position at the given length.
static StringBijection< PersonMode > PersonModeValues
person modes
static bool isValidListOfNetIDs(const std::string &value)
whether the given string is a valid list of id for a network (empty aren't allowed)
static bool isValidFilename(const std::string &value)
whether the given string is a valid attribute for a filename (for example, a name)
static bool isValidListOfTypeID(const std::string &value)
whether the given string is a valid list of ids for an edge or vehicle type (empty aren't allowed)
static bool isValidAttribute(const std::string &value)
whether the given string is a valid attribute for a certain key (for example, a name)
const std::string & getString(const T key) const
get string
bool hasString(const std::string &str) const
check if the given string exist
static std::string escapeXML(const std::string &orig, const bool maskDoubleHyphen=false)
Replaces the standard escapes by their XML entities.
NetworkEditMode networkEditMode
the current Network edit mode
bool isCurrentSupermodeNetwork() const
@check if current supermode is Network
GNENetworkElement * getEditedNetworkElement() const
pointer to edited network element