SUMO - Simulation of Urban MObility
NIVissimNodeCluster.h
Go to the documentation of this file.
1 /****************************************************************************/
8 // -------------------
9 /****************************************************************************/
10 // SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
11 // Copyright (C) 2001-2014 DLR (http://www.dlr.de/) and contributors
12 /****************************************************************************/
13 //
14 // This file is part of SUMO.
15 // SUMO is free software: you can redistribute it and/or modify
16 // it under the terms of the GNU General Public License as published by
17 // the Free Software Foundation, either version 3 of the License, or
18 // (at your option) any later version.
19 //
20 /****************************************************************************/
21 #ifndef NIVissimNodeCluster_h
22 #define NIVissimNodeCluster_h
23 
24 
25 // ===========================================================================
26 // included modules
27 // ===========================================================================
28 #ifdef _MSC_VER
29 #include <windows_config.h>
30 #else
31 #include <config.h>
32 #endif
33 
34 #include <map>
35 #include <utils/geom/Position.h>
36 
37 
38 // ===========================================================================
39 // class declarations
40 // ===========================================================================
41 class NBNode;
42 class NBNodeCont;
43 class NBEdgeCont;
44 class NBDistrictCont;
45 
46 
47 // ===========================================================================
48 // class definitions
49 // ===========================================================================
54 public:
55  NIVissimNodeCluster(int id, int nodeid, int tlid,
56  const std::vector<int>& connectors,
57  const std::vector<int>& disturbances,
58  bool amEdgeSplitOnly);
60  int getID() const {
61  return myID;
62  }
63  void buildNBNode(NBNodeCont& nc);
64  bool recheckEdgeChanges();
65  NBNode* getNBNode() const;
66  Position getPos() const;
67  std::string getNodeName() const;
68 
69 
70 public:
71  static bool dictionary(int id, NIVissimNodeCluster* o);
72  static int dictionary(int nodeid, int tlid, const std::vector<int>& connectors,
73  const std::vector<int>& disturbances, bool amEdgeSplitOnly);
74  static NIVissimNodeCluster* dictionary(int id);
75  static size_t contSize();
76  static void assignToEdges();
77  static void buildNBNodes(NBNodeCont& nc);
78  static void dict_recheckEdgeChanges();
79  static int getFromNode(int edgeid);
80  static int getToNode(int edgeid);
81  static void _debugOut(std::ostream& into);
82  static void dict_addDisturbances(NBDistrictCont& dc,
83  NBNodeCont& nc, NBEdgeCont& ec);
84  static void clearDict();
85  static void setCurrentVirtID(int id);
86 
87 
88 private:
89 
90  int myID;
91  int myNodeID;
92  int myTLID;
93  std::vector<int> myConnectors;
94  std::vector<int> myDisturbances;
96  typedef std::map<int, NIVissimNodeCluster*> DictType;
97  static DictType myDict;
98  static int myCurrentID;
101 
102 };
103 
104 
105 #endif
106 
107 /****************************************************************************/
108 
static DictType myDict
static int getFromNode(int edgeid)
Position getPos() 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)
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:46
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::string getNodeName() const
std::vector< int > myConnectors
std::vector< int > myDisturbances
static void buildNBNodes(NBNodeCont &nc)
Represents a single node (junction) during network building.
Definition: NBNode.h:75
void buildNBNode(NBNodeCont &nc)
Container for nodes during the netbuilding process.
Definition: NBNodeCont.h:64
NBNode * getNBNode() const