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 /****************************************************************************/
7 // -------------------
8 /****************************************************************************/
9 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
10 // Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors
11 /****************************************************************************/
12 //
13 // This file is part of SUMO.
14 // SUMO is free software: you can redistribute it and/or modify
15 // it under the terms of the GNU General Public License as published by
16 // the Free Software Foundation, either version 3 of the License, or
17 // (at your option) any later version.
18 //
19 /****************************************************************************/
20 #ifndef NIVissimDisturbance_h
21 #define NIVissimDisturbance_h
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #ifdef _MSC_VER
28 #include <windows_config.h>
29 #else
30 #include <config.h>
31 #endif
32 
33 #include <map>
34 #include <string>
36 #include <netbuild/NBConnection.h>
40 
41 
42 // ===========================================================================
43 // class declarations
44 // ===========================================================================
45 class NBNode;
46 class NBEdge;
47 class NBDistrictCont;
48 
51 public:
52  NIVissimDisturbance(int id, const std::string& name,
53  const NIVissimExtendedEdgePoint& edge,
54  const NIVissimExtendedEdgePoint& by,
55  SUMOReal timegap, SUMOReal waygap, SUMOReal vmax);
56  virtual ~NIVissimDisturbance();
57  void computeBounding();
58  bool addToNode(NBNode* node, NBDistrictCont& dc,
59  NBNodeCont& nc, NBEdgeCont& ec);
60  int getEdgeID() const {
61  return myEdge.getEdgeID();
62  }
63  int getDisturbanceID() const {
64  return myDisturbance.getEdgeID();
65  }
66  NBConnection getConnection(NBNode* node, int aedgeid);
67 
68 public:
69  static bool dictionary(int id, const std::string& name,
70  const NIVissimExtendedEdgePoint& edge,
71  const NIVissimExtendedEdgePoint& by,
72  SUMOReal timegap, SUMOReal waygap, SUMOReal vmax);
73  static bool dictionary(int id, NIVissimDisturbance* o);
74  static NIVissimDisturbance* dictionary(int id);
75  static std::vector<int> getWithin(const AbstractPoly& poly);
76  static void clearDict();
77  static void dict_SetDisturbances();
78  static void reportRefused();
79 
80 private:
81  int myID;
82  int myNode;
83  std::string myName;
87 
88  typedef std::map<int, NIVissimDisturbance*> DictType;
89  static DictType myDict;
90  static int myRunningID;
91  static int refusedProhibits;
92 };
93 
94 
95 #endif
96 
97 /****************************************************************************/
98