130 const std::string& suggestedName =
"",
bool wasSplit =
false,
bool allowDuplicateGeom =
false,
131 bool recomputeConnections =
true);
345 std::vector<GNEEdge*>
retrieveEdges(
bool onlySelected =
false);
360 std::vector<GNELane*>
retrieveLanes(
bool onlySelected =
false);
368 GNELane*
retrieveLane(
const std::string&
id,
bool failHard =
true,
bool checkVolatileChange =
false);
445 void computeNetwork(
GNEApplicationWindow* window,
bool force =
false,
bool volatileOptions =
false, std::string additionalPath =
"", std::string demandPath =
"", std::string dataPath =
"");
636 const std::string& beginStr,
const std::string& endStr)
const;
659 std::vector<GNEShape*>
retrieveShapes(
bool onlySelected =
false)
const;
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ SUMO_TAG_NOTHING
invalid tag
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
A class that stores a 2D geometrical boundary.
An Element which don't belongs to GNENet but has influency in the simulation.
The main window of the Netedit.
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
An Element which don't belongs to GNENet but has influency in the simulation.
An Element which don't belongs to GNENet but has influency in the simulation.
A road/street connecting two junctions (netedit-version)
An Element which don't belongs to GNENet but has influency in the simulation.
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
struct used for saving all attribute carriers of net, in different formats
class used to calculate paths in nets
A NBNetBuilder extended by visualisation and editing capabilities.
void removeSolitaryJunctions(GNEUndoList *undoList)
removes junctions that have no edges
void deleteEdge(GNEEdge *edge, GNEUndoList *undoList, bool recomputeConnections)
removes edge
int getNumberOfAdditionals(SumoXMLTag type=SUMO_TAG_NOTHING) const
Returns the number of additionals of the net.
GNECrossing * retrieveCrossing(const std::string &id, bool failHard=true) const
get Crossing by id
std::vector< GNEDataSet * > retrieveDataSets() const
return all data sets
bool joinSelectedJunctions(GNEUndoList *undoList)
join selected junctions
double getDataSetIntervalMaximumEnd() const
get maximum interval
void save(OptionsCont &oc)
save the network
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
void saveDemandElements(const std::string &filename)
save demand element elements of the network
void deleteLane(GNELane *lane, GNEUndoList *undoList, bool recomputeConnections)
removes lane
static const double Z_INITIALIZED
marker for whether the z-boundary is initialized
void deleteCrossing(GNECrossing *crossing, GNEUndoList *undoList)
remove crossing
int getNumberOfTAZElements(SumoXMLTag type=SUMO_TAG_NOTHING) const
Returns the number of TAZElements of the net.
SUMORTree & getGrid()
Returns the RTree used for visualisation speed-up.
GNEViewNet * myViewNet
The net to be notofied of about changes.
void deleteAdditional(GNEAdditional *additional, GNEUndoList *undoList)
remove additional
bool myDataElementsSaved
Flag to check if data elements has to be saved.
void disableUpdateGeometry()
disable update geometry of elements after inserting or removing an element in net
void saveTLSPrograms(const std::string &filename)
save TLS Programs elements of the network
NBNetBuilder * getNetBuilder() const
get net builder
void addGLObjectIntoGrid(GNEAttributeCarrier *AC)
add GL Object into net
void reverseEdge(GNEEdge *edge, GNEUndoList *undoList)
reverse edge
GNEEdge * addReversedEdge(GNEEdge *edge, GNEUndoList *undoList)
add reversed edge
std::string generateTAZElementID(SumoXMLTag TAZElementTag) const
generate TAZElement ID
int getNumberOfDemandElements(SumoXMLTag type=SUMO_TAG_NOTHING) const
Returns the number of demand elements of the net.
void removeGLObjectFromGrid(GNEAttributeCarrier *AC)
add GL Object into net
void deleteTAZElement(GNETAZElement *TAZElement, GNEUndoList *undoList)
remove TAZElement
std::string generateAdditionalID(SumoXMLTag type) const
generate additional id
NBTrafficLightLogicCont & getTLLogicCont()
returns the tllcont of the underlying netbuilder
GNELane * retrieveLane(const std::string &id, bool failHard=true, bool checkVolatileChange=false)
get lane by id
std::vector< GNEGenericData * > retrieveGenericDatas(bool onlySelected=false) const
return all generic datas
bool restrictLane(SUMOVehicleClass vclass, GNELane *lane, GNEUndoList *undoList)
transform lane to restricted lane
bool isNetSaved() const
return if net has to be saved
bool myNetSaved
Flag to check if net has to be saved.
bool myTLSProgramsSaved
Flag to check if shapes has to be saved.
GNEEdge * retrieveEdge(const std::string &id, bool failHard=true) const
get edge by id
void requireSaveNet(bool value)
inform that net has to be saved
std::vector< GNELane * > retrieveLanes(bool onlySelected=false)
return all lanes
GNEJunction * splitEdge(GNEEdge *edge, const Position &pos, GNEUndoList *undoList, GNEJunction *newJunction=0)
split edge at position by inserting a new junction
GNEAttributeCarrier * retrieveAttributeCarrier(const GUIGlID id, bool failHard=true) const
get a single attribute carrier based on a GLID
void setViewNet(GNEViewNet *viewNet)
Set the net to be notified of network changes.
GNEDataSet * retrieveDataSet(const std::string &id, bool hardFail=true) const
Returns the named data set.
std::vector< GNEAdditional * > retrieveAdditionals(bool onlySelected=false) const
return all additionals
bool myNeedRecompute
whether the net needs recomputation
void saveAdditionalsConfirmed(const std::string &filename)
save additionals after confirming invalid objects
void deleteDemandElement(GNEDemandElement *demandElement, GNEUndoList *undoList)
remove demand element
void duplicateLane(GNELane *lane, GNEUndoList *undoList, bool recomputeConnections)
duplicates lane
const Boundary & getZBoundary() const
Returns the Z boundary (stored in the x() coordinate) values of 0 do not affect the boundary.
const Boundary & getBoundary() const
returns the bounder of the network
void saveEdgeTypes(const std::string &filename)
save edgeTypes elements of the network
IDSupplier myEdgeIDSupplier
GNENet(const GNENet &)=delete
Invalidated copy constructor.
void reserveEdgeID(const std::string &id)
reserve edge ID (To avoid duplicates)
void computeAndUpdate(OptionsCont &oc, bool volatileOptions)
recompute the network and update lane geometries
GNENetHelper::PathCalculator * myPathCalculator
PathCalculator instance.
SUMORTree myGrid
the rtree which contains all GUIGlObjects (so named for historical reasons)
std::vector< GNEEdge * > retrieve000180AngleEdges(bool onlySelected=false) const
return edges with junction angle between 0 (inclusive) and 180 (exclusive) degrees
void savePlain(OptionsCont &oc)
save plain xml representation of the network (and nothing else)
std::vector< GNEAttributeCarrier * > getSelectedAttributeCarriers(bool ignoreCurrentSupermode)
get all selected attribute carriers (or only relative to current supermode
GNENet & operator=(const GNENet &)=delete
Invalidated assignment operator.
void deleteDataInterval(GNEDataInterval *dataInterval, GNEUndoList *undoList)
remove data interval
void deleteConnection(GNEConnection *connection, GNEUndoList *undoList)
remove connection
std::vector< GNEDemandElement * > retrieveDemandElements(bool onlySelected=false) const
return all demand elements
void requireSaveAdditionals(bool value)
inform that additionals has to be saved
void cleanInvalidDemandElements(GNEUndoList *undoList)
clean invalid demand elements
bool myUpdateDataEnabled
Flag to enable or disable update data elements after inserting or removing element in net.
void cleanUnusedRoutes(GNEUndoList *undoList)
clean unused routes
NBNetBuilder * myNetBuilder
The internal netbuilder.
GNETAZElement * retrieveTAZElement(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named TAZElement.
void removeExplicitTurnaround(std::string id)
remove edge id from the list of explicit turnarounds
void computeJunction(GNEJunction *junction)
trigger recomputation of junction shape and logic param[in] window The window to inform about delay
void resetJunctionConnections(GNEJunction *junction, GNEUndoList *undoList)
reset junction's connections
GNEEdgeType * retrieveEdgeType(const std::string &id, bool failHard=true) const
get edge type by id
void replaceIncomingEdge(GNEEdge *which, GNEEdge *by, GNEUndoList *undoList)
replaces edge
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
void deleteGenericData(GNEGenericData *genericData, GNEUndoList *undoList)
remove generic data
GNENetHelper::PathCalculator * getPathCalculator()
obtain instance of PathCalculator
std::string generateDataSetID(const std::string &prefix) const
generate data set id
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
retrieve all attribute carriers of Net
void computeNetwork(GNEApplicationWindow *window, bool force=false, bool volatileOptions=false, std::string additionalPath="", std::string demandPath="", std::string dataPath="")
trigger full netbuild computation param[in] window The window to inform about delay param[in] force W...
std::vector< GNEConnection * > retrieveConnections(bool onlySelected=false) const
return all connections
void changeEdgeEndpoints(GNEEdge *edge, const std::string &newSourceID, const std::string &newDestID)
modifies endpoins of the given edge
bool myUpdateGeometryEnabled
Flag to enable or disable update geometry of elements after inserting or removing element in net.
std::vector< GNEJunction * > retrieveJunctions(bool onlySelected=false)
return all junctions
bool isAdditionalsSaved() const
check if additionals are saved
void initJunctionsAndEdges()
Init Junctions and edges.
void splitEdgesBidi(GNEEdge *edge, GNEEdge *oppositeEdge, const Position &pos, GNEUndoList *undoList)
split all edges at position by inserting one new junction
IDSupplier myJunctionIDSupplier
void requireSaveTLSPrograms()
std::string generateShapeID(SumoXMLTag shapeTag) const
generate Shape ID
void expandBoundary(const Boundary &newBoundary)
expand boundary
void deleteShape(GNEShape *shape, GNEUndoList *undoList)
remove shape
void disableUpdateData()
disable update data elements after inserting or removing an element in net
std::vector< GNEEdge * > retrieve180360AngleEdges(bool onlySelected=false) const
return edges with junction angle between 180 (inclusive) and 360 (exclusive) degrees
bool removeRestrictedLane(SUMOVehicleClass vclass, GNEEdge *edge, GNEUndoList *undoList)
remove restricted lane
std::string generateDemandElementID(SumoXMLTag tag) const
generate demand element id
void mergeJunctions(GNEJunction *moved, GNEJunction *target, GNEUndoList *undoList)
merge the given junctions edges between the given junctions will be deleted
GNEEdge * createEdge(GNEJunction *src, GNEJunction *dest, GNEEdge *edgeTemplate, GNEUndoList *undoList, const std::string &suggestedName="", bool wasSplit=false, bool allowDuplicateGeom=false, bool recomputeConnections=true)
creates a new edge (unless an edge with the same geometry already exists)
std::set< std::string > myExplicitTurnarounds
list of edge ids for which turn-arounds must be added explicitly
std::set< std::string > retrieveGenericDataParameters(const std::string &genericDataTag, const double begin, const double end) const
return a set of parameters for the given data Interval
bool myAdditionalsSaved
Flag to check if additionals has to be saved.
void addZValueInBoundary(const double z)
add Z in net boundary
bool isUpdateGeometryEnabled() const
check if update geometry after inserting or removing has to be updated
bool addRestrictedLane(SUMOVehicleClass vclass, GNEEdge *edge, int index, GNEUndoList *undoList)
add restricted lane to edge
int getNumberOfDataSets() const
Returns the number of data sets of the net.
GNEAdditional * retrieveAdditional(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named additional.
bool checkJunctionPosition(const Position &pos)
return true if there are already a Junction in the given position, false in other case
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
void reserveJunctionID(const std::string &id)
reserve junction ID (To avoid duplicates)
bool isNetRecomputed() const
check if net requiere recomputing
bool isUpdateDataEnabled() const
check if update data after inserting or removing has to be updated
void deleteDataSet(GNEDataSet *dataSet, GNEUndoList *undoList)
remove data set
static void replaceInListAttribute(GNEAttributeCarrier *ac, SumoXMLAttr key, const std::string &which, const std::string &by, GNEUndoList *undoList)
bool cleanInvalidCrossings(GNEUndoList *undoList)
clear invalid crossings
void splitJunction(GNEJunction *junction, bool reconnect, GNEUndoList *undoList)
replace the selected junction by a list of junctions for each unique edge endpoint
void selectRoundabout(GNEJunction *junction, GNEUndoList *undoList)
select all roundabout edges and junctions for the current roundabout
void joinRoutes(GNEUndoList *undoList)
join routes
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
std::vector< GNEShape * > retrieveShapes(SumoXMLTag shapeTag, bool onlySelected=false)
return shape by type shapes
void replaceJunctionByGeometry(GNEJunction *junction, GNEUndoList *undoList)
replace the selected junction by geometry node(s) and merge the edges
void requireSaveDemandElements(bool value)
inform that demand elements has to be saved
std::vector< GNEEdge * > retrieveEdges(bool onlySelected=false)
return all edges
int getNumberOfShapes(SumoXMLTag type=SUMO_TAG_NOTHING) const
Returns the number of shapes of the net.
void createRoundabout(GNEJunction *junction, GNEUndoList *undoList)
transform the given junction into a roundabout
bool netHasGNECrossings() const
check if net has GNECrossings
std::string generateEdgeTypeID() const
generate edgeType id
void requireSaveDataElements(bool value)
inform that data sets has to be saved
void requireRecompute()
inform the net about the need for recomputation
GNEJunction * createJunction(const Position &pos, GNEUndoList *undoList)
creates a new junction
void saveJoined(OptionsCont &oc)
save log of joined junctions (and nothing else)
GNEShape * retrieveShape(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named shape.
std::map< std::string, int > myEdgesAndNumberOfLanes
map with the Edges and their number of lanes
void addExplicitTurnaround(std::string id)
add edge id to the list of explicit turnarounds
void saveDataElements(const std::string &filename)
save data set elements of the network
void initGNEConnections()
initialize GNEConnections
void saveAdditionals(const std::string &filename)
save additional elements of the network
void deleteJunction(GNEJunction *junction, GNEUndoList *undoList)
removes junction and all incident edges
NBEdgeCont & getEdgeCont()
returns the NBEdgeCont of the underlying netbuilder
std::vector< GNETAZElement * > retrieveTAZElements(bool onlySelected=false) const
return all TAZElements
GNEDemandElement * retrieveDemandElement(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named demand element.
GNENetHelper::AttributeCarriers * myAttributeCarriers
AttributeCarriers of net.
void computeDataElements(GNEApplicationWindow *window)
compute data elements param[in] window The window to inform about delay
FXApp * getApp()
get pointer to the main App
bool isDataElementsSaved() const
check if data sets are saved
void saveDataElementsConfirmed(const std::string &filename)
save data elements after confirming invalid objects
bool myDemandElementsSaved
Flag to check if demand elements has to be saved.
int getNumberOfTLSPrograms() const
get number of TLS Programs
GNEViewNet * getViewNet() const
get view net
GNEJunction * retrieveJunction(const std::string &id, bool failHard=true) const
get junction by id
void saveDemandElementsConfirmed(const std::string &filename)
save demand elements after confirming invalid objects
std::vector< GNECrossing * > retrieveCrossings(bool onlySelected=false) const
return all crossings
GNENet(NBNetBuilder *netBuilder)
Constructor.
void enableUpdateGeometry()
void clearJunctionConnections(GNEJunction *junction, GNEUndoList *undoList)
clear junction's connections
std::vector< GNEAttributeCarrier * > retrieveAttributeCarriers(SumoXMLTag type=SUMO_TAG_NOTHING)
get the attribute carriers based on Type
Boundary myZBoundary
the z boundary (stored in the x-coordinate), values of 0 are ignored
double getDataSetIntervalMinimumBegin() const
get minimum interval
GNEConnection * retrieveConnection(const std::string &id, bool failHard=true) const
get Connection by id
void computeDemandElements(GNEApplicationWindow *window)
compute demand elements param[in] window The window to inform about delay
bool isDemandElementsSaved() const
check if demand elements are saved
An Element which don't belongs to GNENet but has influency in the simulation.
A window containing a gl-object's parameter.
Stores the information about how to visualize structures.
Storage for edges, including some functionality operating on multiple edges.
Instance responsible for building networks.
A container for traffic light definitions and built programs.
A storage for options typed value containers)
A point in 2D or 3D with translation and scaling methods.
A RT-tree for efficient storing of SUMO's GL-objects.