Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
eclipse
GitHub Repository: eclipse/sumo
Path: blob/main/src/netimport/vissim/tempstructs/NIVissimNodeCluster.h
169684 views
1
/****************************************************************************/
2
// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3
// Copyright (C) 2001-2025 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
/****************************************************************************/
14
/// @file NIVissimNodeCluster.h
15
/// @author Daniel Krajzewicz
16
/// @author Michael Behrisch
17
/// @date Sept 2002
18
///
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
// ===========================================================================
40
/**
41
*
42
*/
43
class NIVissimNodeCluster {
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);
49
~NIVissimNodeCluster();
50
int getID() const {
51
return myID;
52
}
53
void buildNBNode(NBNodeCont& nc);
54
bool recheckEdgeChanges();
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;
85
Position myPosition;
86
typedef std::map<int, NIVissimNodeCluster*> DictType;
87
static DictType myDict;
88
static int myCurrentID;
89
NBNode* myNBNode;
90
bool myAmEdgeSplit;
91
92
};
93
94