00001 /****************************************************************************/ 00007 // An edge the jtr-router may route through 00008 /****************************************************************************/ 00009 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ 00010 // Copyright 2001-2010 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 00093 void addFollowerProbability(ROJTREdge *follower, 00094 SUMOTime begTime, SUMOTime endTime, SUMOReal probability); 00095 00097 ROJTREdge *chooseNext(const ROVehicle *const, SUMOTime time) const; 00098 00100 void setTurnDefaults(const std::vector<SUMOReal> &defs); 00101 00102 private: 00104 typedef std::map<ROJTREdge*, ValueTimeLine<SUMOReal>*> FollowerUsageCont; 00105 00107 FollowerUsageCont myFollowingDefs; 00108 00110 std::vector<SUMOReal> myParsedTurnings; 00111 00112 private: 00114 ROJTREdge(const ROJTREdge &src); 00115 00117 ROJTREdge &operator=(const ROJTREdge &src); 00118 00119 00120 }; 00121 00122 00123 #endif 00124 00125 /****************************************************************************/ 00126
1.5.6