NIVissimDisturbance.h
Go to the documentation of this file.00001
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef NIVissimDisturbance_h
00020 #define NIVissimDisturbance_h
00021
00022
00023
00024
00025
00026 #ifdef _MSC_VER
00027 #include <windows_config.h>
00028 #else
00029 #include <config.h>
00030 #endif
00031
00032 #include <map>
00033 #include <string>
00034 #include <utils/common/VectorHelper.h>
00035 #include <utils/geom/AbstractPoly.h>
00036 #include <netbuild/NBConnection.h>
00037 #include "NIVissimExtendedEdgePoint.h"
00038 #include "NIVissimBoundedClusterObject.h"
00039 #include "NIVissimNodeParticipatingEdgeVector.h"
00040
00041
00042
00043
00044
00045 class NBNode;
00046 class NBEdge;
00047 class NBDistrictCont;
00048
00049 class NIVissimDisturbance
00050 : public NIVissimBoundedClusterObject {
00051 public:
00052 NIVissimDisturbance(int id, const std::string &name,
00053 const NIVissimExtendedEdgePoint &edge,
00054 const NIVissimExtendedEdgePoint &by,
00055 SUMOReal timegap, SUMOReal waygap, SUMOReal vmax);
00056 virtual ~NIVissimDisturbance();
00057 void computeBounding();
00058 bool addToNode(NBNode *node, NBDistrictCont &dc,
00059 NBNodeCont &nc, NBEdgeCont &ec);
00060 int getEdgeID() const {
00061 return myEdge.getEdgeID();
00062 }
00063 int getDisturbanceID() const {
00064 return myDisturbance.getEdgeID();
00065 }
00066 NBConnection getConnection(NBNode *node, int aedgeid);
00067
00068 public:
00069 static bool dictionary(int id, const std::string &name,
00070 const NIVissimExtendedEdgePoint &edge,
00071 const NIVissimExtendedEdgePoint &by,
00072 SUMOReal timegap, SUMOReal waygap, SUMOReal vmax);
00073 static bool dictionary(int id, NIVissimDisturbance *o);
00074 static NIVissimDisturbance *dictionary(int id);
00075 static IntVector getWithin(const AbstractPoly &poly);
00076 static void clearDict();
00077 static void dict_SetDisturbances();
00078 static void reportRefused();
00079
00080 private:
00081 int myID;
00082 int myNode;
00083 std::string myName;
00084 NIVissimExtendedEdgePoint myEdge;
00085 NIVissimExtendedEdgePoint myDisturbance;
00086 SUMOReal myTimeGap, myWayGap, myVMax;
00087
00088 typedef std::map<int, NIVissimDisturbance*> DictType;
00089 static DictType myDict;
00090 static int myRunningID;
00091 static int refusedProhibits;
00092 };
00093
00094
00095 #endif
00096
00097
00098