SUMO - Simulation of Urban MObility
ROJTREdge.h
Go to the documentation of this file.
00001 /****************************************************************************/
00008 // An edge the jtr-router may route through
00009 /****************************************************************************/
00010 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
00011 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors
00012 /****************************************************************************/
00013 //
00014 //   This file is part of SUMO.
00015 //   SUMO is free software: you can redistribute it and/or modify
00016 //   it under the terms of the GNU General Public License as published by
00017 //   the Free Software Foundation, either version 3 of the License, or
00018 //   (at your option) any later version.
00019 //
00020 /****************************************************************************/
00021 #ifndef ROJTREdge_h
00022 #define ROJTREdge_h
00023 
00024 
00025 // ===========================================================================
00026 // included modules
00027 // ===========================================================================
00028 #ifdef _MSC_VER
00029 #include <windows_config.h>
00030 #else
00031 #include <config.h>
00032 #endif
00033 
00034 #include <string>
00035 #include <map>
00036 #include <vector>
00037 #include <utils/common/ValueTimeLine.h>
00038 #include <router/ROEdge.h>
00039 
00040 
00041 // ===========================================================================
00042 // class declarations
00043 // ===========================================================================
00044 class ROLane;
00045 
00046 
00047 // ===========================================================================
00048 // class definitions
00049 // ===========================================================================
00057 class ROJTREdge : public ROEdge {
00058 public:
00066     ROJTREdge(const std::string& id, RONode* from, RONode* to, unsigned int index) ;
00067 
00068 
00070     ~ROJTREdge() ;
00071 
00072 
00083     void addFollower(ROEdge* s, std::string dir="") ;
00084 
00085 
00093     void addFollowerProbability(ROJTREdge* follower,
00094                                 SUMOTime begTime, SUMOTime endTime, SUMOReal probability);
00095 
00096 
00102     ROJTREdge* chooseNext(const ROVehicle* const veh, SUMOTime time) const;
00103 
00104 
00108     void setTurnDefaults(const std::vector<SUMOReal> &defs);
00109 
00110 
00111 private:
00113     typedef std::map<ROJTREdge*, ValueTimeLine<SUMOReal>*> FollowerUsageCont;
00114 
00116     FollowerUsageCont myFollowingDefs;
00117 
00119     std::vector<SUMOReal> myParsedTurnings;
00120 
00121 
00122 private:
00124     ROJTREdge(const ROJTREdge& src);
00125 
00127     ROJTREdge& operator=(const ROJTREdge& src);
00128 
00129 
00130 };
00131 
00132 
00133 #endif
00134 
00135 /****************************************************************************/
00136 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines