SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NIVissimDisturbance.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) 2002-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 NIVissimDisturbance_h
22 #define NIVissimDisturbance_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 <string>
37 #include <netbuild/NBConnection.h>
41 
42 
43 // ===========================================================================
44 // class declarations
45 // ===========================================================================
46 class NBNode;
47 class NBEdge;
48 class NBDistrictCont;
49 
52 public:
53  NIVissimDisturbance(int id, const std::string& name,
54  const NIVissimExtendedEdgePoint& edge,
55  const NIVissimExtendedEdgePoint& by,
56  SUMOReal timegap, SUMOReal waygap, SUMOReal vmax);
57  virtual ~NIVissimDisturbance();
58  void computeBounding();
59  bool addToNode(NBNode* node, NBDistrictCont& dc,
60  NBNodeCont& nc, NBEdgeCont& ec);
61  int getEdgeID() const {
62  return myEdge.getEdgeID();
63  }
64  int getDisturbanceID() const {
65  return myDisturbance.getEdgeID();
66  }
67  NBConnection getConnection(NBNode* node, int aedgeid);
68 
69 public:
70  static bool dictionary(int id, const std::string& name,
71  const NIVissimExtendedEdgePoint& edge,
72  const NIVissimExtendedEdgePoint& by,
73  SUMOReal timegap, SUMOReal waygap, SUMOReal vmax);
74  static bool dictionary(int id, NIVissimDisturbance* o);
75  static NIVissimDisturbance* dictionary(int id);
76  static std::vector<int> getWithin(const AbstractPoly& poly);
77  static void clearDict();
78  static void dict_SetDisturbances();
79  static void reportRefused();
80 
81 private:
82  int myID;
83  int myNode;
84  std::string myName;
88 
89  typedef std::map<int, NIVissimDisturbance*> DictType;
90  static DictType myDict;
91  static int myRunningID;
92  static int refusedProhibits;
93 };
94 
95 
96 #endif
97 
98 /****************************************************************************/
99 
static DictType myDict
int getDisturbanceID() const
static std::vector< int > getWithin(const AbstractPoly &poly)
The representation of a single edge during network building.
Definition: NBEdge.h:71
A container for districts.
bool addToNode(NBNode *node, NBDistrictCont &dc, NBNodeCont &nc, NBEdgeCont &ec)
NIVissimExtendedEdgePoint myEdge
Storage for edges, including some functionality operating on multiple edges.
Definition: NBEdgeCont.h:66
static bool dictionary(int id, const std::string &name, const NIVissimExtendedEdgePoint &edge, const NIVissimExtendedEdgePoint &by, SUMOReal timegap, SUMOReal waygap, SUMOReal vmax)
std::map< int, NIVissimDisturbance * > DictType
NBConnection getConnection(NBNode *node, int aedgeid)
NIVissimDisturbance(int id, const std::string &name, const NIVissimExtendedEdgePoint &edge, const NIVissimExtendedEdgePoint &by, SUMOReal timegap, SUMOReal waygap, SUMOReal vmax)
NIVissimExtendedEdgePoint myDisturbance
Represents a single node (junction) during network building.
Definition: NBNode.h:75
#define SUMOReal
Definition: config.h:215
static void dict_SetDisturbances()
Container for nodes during the netbuilding process.
Definition: NBNodeCont.h:64