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-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
18 // -------------------
19 /****************************************************************************/
20 #ifndef NIVissimNodeCluster_h
21 #define NIVissimNodeCluster_h
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #ifdef _MSC_VER
28 #include <windows_config.h>
29 #else
30 #include <config.h>
31 #endif
32 
33 #include <map>
34 #include <utils/geom/Position.h>
35 
36 
37 // ===========================================================================
38 // class declarations
39 // ===========================================================================
40 class NBNode;
41 class NBNodeCont;
42 class NBEdgeCont;
43 class NBDistrictCont;
44 
45 
46 // ===========================================================================
47 // class definitions
48 // ===========================================================================
53 public:
54  NIVissimNodeCluster(int id, int nodeid, int tlid,
55  const std::vector<int>& connectors,
56  const std::vector<int>& disturbances,
57  bool amEdgeSplitOnly);
59  int getID() const {
60  return myID;
61  }
62  void buildNBNode(NBNodeCont& nc);
63  bool recheckEdgeChanges();
64  NBNode* getNBNode() const;
65  Position getPos() const;
66  std::string getNodeName() const;
67 
68 
69 public:
70  static bool dictionary(int id, NIVissimNodeCluster* o);
71  static int dictionary(int nodeid, int tlid, const std::vector<int>& connectors,
72  const std::vector<int>& disturbances, bool amEdgeSplitOnly);
73  static NIVissimNodeCluster* dictionary(int id);
74  static int contSize();
75  static void assignToEdges();
76  static void buildNBNodes(NBNodeCont& nc);
77  static void dict_recheckEdgeChanges();
78  static int getFromNode(int edgeid);
79  static int getToNode(int edgeid);
80  static void _debugOut(std::ostream& into);
81  static void dict_addDisturbances(NBDistrictCont& dc,
82  NBNodeCont& nc, NBEdgeCont& ec);
83  static void clearDict();
84  static void setCurrentVirtID(int id);
85 
86 
87 private:
88 
89  int myID;
90  int myNodeID;
91  int myTLID;
92  std::vector<int> myConnectors;
93  std::vector<int> myDisturbances;
95  typedef std::map<int, NIVissimNodeCluster*> DictType;
96  static DictType myDict;
97  static int myCurrentID;
100 
101 };
102 
103 
104 #endif
105 
106 /****************************************************************************/
107 
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:45
static void assignToEdges()
Storage for edges, including some functionality operating on multiple edges.
Definition: NBEdgeCont.h:66
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:74
void buildNBNode(NBNodeCont &nc)
Container for nodes during the netbuilding process.
Definition: NBNodeCont.h:66