Eclipse SUMO - Simulation of Urban MObility
NIVissimNodeCluster.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
16 // -------------------
17 /****************************************************************************/
18 #ifndef NIVissimNodeCluster_h
19 #define NIVissimNodeCluster_h
20 
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 #include <config.h>
26 
27 #include <map>
28 #include <utils/geom/Position.h>
29 
30 
31 // ===========================================================================
32 // class declarations
33 // ===========================================================================
34 class NBNode;
35 class NBNodeCont;
36 class NBEdgeCont;
37 class NBDistrictCont;
38 
39 
40 // ===========================================================================
41 // class definitions
42 // ===========================================================================
47 public:
48  NIVissimNodeCluster(int id, int nodeid, int tlid,
49  const std::vector<int>& connectors,
50  const std::vector<int>& disturbances,
51  bool amEdgeSplitOnly);
53  int getID() const {
54  return myID;
55  }
56  void buildNBNode(NBNodeCont& nc);
57  bool recheckEdgeChanges();
58  NBNode* getNBNode() const;
59  Position getPos() const;
60  std::string getNodeName() const;
61 
62 
63 public:
64  static bool dictionary(int id, NIVissimNodeCluster* o);
65  static int dictionary(int nodeid, int tlid, const std::vector<int>& connectors,
66  const std::vector<int>& disturbances, bool amEdgeSplitOnly);
67  static NIVissimNodeCluster* dictionary(int id);
68  static int contSize();
69  static void assignToEdges();
70  static void buildNBNodes(NBNodeCont& nc);
71  static void dict_recheckEdgeChanges();
72  static int getFromNode(int edgeid);
73  static int getToNode(int edgeid);
74  static void _debugOut(std::ostream& into);
75  static void dict_addDisturbances(NBDistrictCont& dc,
76  NBNodeCont& nc, NBEdgeCont& ec);
77  static void clearDict();
78  static void setCurrentVirtID(int id);
79 
80 
81 private:
82 
83  int myID;
84  int myNodeID;
85  int myTLID;
86  std::vector<int> myConnectors;
87  std::vector<int> myDisturbances;
89  typedef std::map<int, NIVissimNodeCluster*> DictType;
90  static DictType myDict;
91  static int myCurrentID;
94 
95 };
96 
97 
98 #endif
99 
100 /****************************************************************************/
101 
static DictType myDict
static int getFromNode(int edgeid)
std::string getNodeName() const
static void dict_recheckEdgeChanges()
NIVissimNodeCluster(int id, int nodeid, int tlid, const std::vector< int > &connectors, const std::vector< int > &disturbances, bool amEdgeSplitOnly)
A container for districts.
static bool dictionary(int id, NIVissimNodeCluster *o)
static void setCurrentVirtID(int id)
static void dict_addDisturbances(NBDistrictCont &dc, NBNodeCont &nc, NBEdgeCont &ec)
NBNode * getNBNode() const
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:39
static void assignToEdges()
Storage for edges, including some functionality operating on multiple edges.
Definition: NBEdgeCont.h:61
std::map< int, NIVissimNodeCluster * > DictType
static int getToNode(int edgeid)
static void _debugOut(std::ostream &into)
std::vector< int > myConnectors
std::vector< int > myDisturbances
static void buildNBNodes(NBNodeCont &nc)
Represents a single node (junction) during network building.
Definition: NBNode.h:68
void buildNBNode(NBNodeCont &nc)
Container for nodes during the netbuilding process.
Definition: NBNodeCont.h:60