|
SUMO - Simulation of Urban MObility
|
00001 /****************************************************************************/ 00007 // An edge the jtr-router may route through 00008 /****************************************************************************/ 00009 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ 00010 // Copyright (C) 2001-2011 DLR (http://www.dlr.de/) and contributors 00011 /****************************************************************************/ 00012 // 00013 // This program is free software; you can redistribute it and/or modify 00014 // it under the terms of the GNU General Public License as published by 00015 // the Free Software Foundation; either version 2 of the License, or 00016 // (at your option) any later version. 00017 // 00018 /****************************************************************************/ 00019 #ifndef ROJTREdge_h 00020 #define ROJTREdge_h 00021 00022 00023 // =========================================================================== 00024 // included modules 00025 // =========================================================================== 00026 #ifdef _MSC_VER 00027 #include <windows_config.h> 00028 #else 00029 #include <config.h> 00030 #endif 00031 00032 #include <string> 00033 #include <map> 00034 #include <vector> 00035 #include <utils/common/ValueTimeLine.h> 00036 #include <router/ROEdge.h> 00037 00038 00039 // =========================================================================== 00040 // class declarations 00041 // =========================================================================== 00042 class ROLane; 00043 00044 00045 // =========================================================================== 00046 // class definitions 00047 // =========================================================================== 00055 class ROJTREdge : public ROEdge { 00056 public: 00064 ROJTREdge(const std::string& id, RONode* from, RONode* to, unsigned int index) throw(); 00065 00066 00068 ~ROJTREdge() throw(); 00069 00070 00081 void addFollower(ROEdge* s) throw(); 00082 00083 00091 void addFollowerProbability(ROJTREdge* follower, 00092 SUMOTime begTime, SUMOTime endTime, SUMOReal probability); 00093 00094 00100 ROJTREdge* chooseNext(const ROVehicle* const veh, SUMOTime time) const; 00101 00102 00106 void setTurnDefaults(const std::vector<SUMOReal> &defs); 00107 00108 00109 private: 00111 typedef std::map<ROJTREdge*, ValueTimeLine<SUMOReal>*> FollowerUsageCont; 00112 00114 FollowerUsageCont myFollowingDefs; 00115 00117 std::vector<SUMOReal> myParsedTurnings; 00118 00119 00120 private: 00122 ROJTREdge(const ROJTREdge& src); 00123 00125 ROJTREdge& operator=(const ROJTREdge& src); 00126 00127 00128 }; 00129 00130 00131 #endif 00132 00133 /****************************************************************************/ 00134