Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
NIVissimDisturbance.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2002-2024 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 <string>
31
32
33// ===========================================================================
34// class declarations
35// ===========================================================================
36class NBNode;
37class NBEdge;
38class NBDistrictCont;
39
42public:
43 NIVissimDisturbance(int id, const std::string& name,
44 const NIVissimExtendedEdgePoint& edge,
46 virtual ~NIVissimDisturbance();
47 void computeBounding();
48 bool addToNode(NBNode* node, NBDistrictCont& dc,
49 NBNodeCont& nc, NBEdgeCont& ec);
50 int getEdgeID() const {
51 return myEdge.getEdgeID();
52 }
53 int getDisturbanceID() const {
54 return myDisturbance.getEdgeID();
55 }
56 NBConnection getConnection(NBNode* node, int aedgeid);
57
58public:
59 static bool dictionary(const std::string& name,
60 const NIVissimExtendedEdgePoint& edge,
62 static bool dictionary(int id, NIVissimDisturbance* o);
63 static NIVissimDisturbance* dictionary(int id);
64 static std::vector<int> getWithin(const AbstractPoly& poly);
65 static void clearDict();
66 static void dict_SetDisturbances();
67 static void reportRefused();
68
69private:
70 int myID;
71 int myNode;
72 std::string myName;
75
76 typedef std::map<int, NIVissimDisturbance*> DictType;
78 static int myRunningID;
79 static int refusedProhibits;
80};
A container for districts.
Storage for edges, including some functionality operating on multiple edges.
Definition NBEdgeCont.h:59
The representation of a single edge during network building.
Definition NBEdge.h:92
Container for nodes during the netbuilding process.
Definition NBNodeCont.h:57
Represents a single node (junction) during network building.
Definition NBNode.h:66
NIVissimExtendedEdgePoint myDisturbance
std::map< int, NIVissimDisturbance * > DictType
static bool dictionary(const std::string &name, const NIVissimExtendedEdgePoint &edge, const NIVissimExtendedEdgePoint &by)
static std::vector< int > getWithin(const AbstractPoly &poly)
NIVissimExtendedEdgePoint myEdge
NBConnection getConnection(NBNode *node, int aedgeid)
bool addToNode(NBNode *node, NBDistrictCont &dc, NBNodeCont &nc, NBEdgeCont &ec)