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-2020 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 /****************************************************************************/
19 // -------------------
20 /****************************************************************************/
21 #pragma once
22 #include <config.h>
23 
24 #include <map>
25 #include <utils/geom/Position.h>
26 
27 
28 // ===========================================================================
29 // class declarations
30 // ===========================================================================
31 class NBNode;
32 class NBNodeCont;
33 class NBEdgeCont;
34 class NBDistrictCont;
35 
36 
37 // ===========================================================================
38 // class definitions
39 // ===========================================================================
44 public:
45  NIVissimNodeCluster(int id, int nodeid, int tlid,
46  const std::vector<int>& connectors,
47  const std::vector<int>& disturbances,
48  bool amEdgeSplitOnly);
50  int getID() const {
51  return myID;
52  }
53  void buildNBNode(NBNodeCont& nc);
55  NBNode* getNBNode() const;
56  Position getPos() const;
57  std::string getNodeName() const;
58 
59 
60 public:
61  static bool dictionary(int id, NIVissimNodeCluster* o);
62  static int dictionary(int nodeid, int tlid, const std::vector<int>& connectors,
63  const std::vector<int>& disturbances, bool amEdgeSplitOnly);
64  static NIVissimNodeCluster* dictionary(int id);
65  static int contSize();
66  static void assignToEdges();
67  static void buildNBNodes(NBNodeCont& nc);
68  static void dict_recheckEdgeChanges();
69  static int getFromNode(int edgeid);
70  static int getToNode(int edgeid);
71  static void _debugOut(std::ostream& into);
72  static void dict_addDisturbances(NBDistrictCont& dc,
73  NBNodeCont& nc, NBEdgeCont& ec);
74  static void clearDict();
75  static void setCurrentVirtID(int id);
76 
77 
78 private:
79 
80  int myID;
81  int myNodeID;
82  int myTLID;
83  std::vector<int> myConnectors;
84  std::vector<int> myDisturbances;
86  typedef std::map<int, NIVissimNodeCluster*> DictType;
87  static DictType myDict;
88  static int myCurrentID;
91 
92 };
A container for districts.
Storage for edges, including some functionality operating on multiple edges.
Definition: NBEdgeCont.h:59
Container for nodes during the netbuilding process.
Definition: NBNodeCont.h:58
Represents a single node (junction) during network building.
Definition: NBNode.h:66
static void setCurrentVirtID(int id)
std::map< int, NIVissimNodeCluster * > DictType
std::vector< int > myDisturbances
static int getToNode(int edgeid)
NIVissimNodeCluster(int id, int nodeid, int tlid, const std::vector< int > &connectors, const std::vector< int > &disturbances, bool amEdgeSplitOnly)
static DictType myDict
static int getFromNode(int edgeid)
static bool dictionary(int id, NIVissimNodeCluster *o)
void buildNBNode(NBNodeCont &nc)
std::string getNodeName() const
static void dict_addDisturbances(NBDistrictCont &dc, NBNodeCont &nc, NBEdgeCont &ec)
static void dict_recheckEdgeChanges()
NBNode * getNBNode() const
static void assignToEdges()
std::vector< int > myConnectors
static void buildNBNodes(NBNodeCont &nc)
static void _debugOut(std::ostream &into)
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:36