SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ROJTREdge.h
Go to the documentation of this file.
1 /****************************************************************************/
8 // An edge the jtr-router may route through
9 /****************************************************************************/
10 // SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
11 // Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors
12 /****************************************************************************/
13 //
14 // This file is part of SUMO.
15 // SUMO is free software: you can redistribute it and/or modify
16 // it under the terms of the GNU General Public License as published by
17 // the Free Software Foundation, either version 3 of the License, or
18 // (at your option) any later version.
19 //
20 /****************************************************************************/
21 #ifndef ROJTREdge_h
22 #define ROJTREdge_h
23 
24 
25 // ===========================================================================
26 // included modules
27 // ===========================================================================
28 #ifdef _MSC_VER
29 #include <windows_config.h>
30 #else
31 #include <config.h>
32 #endif
33 
34 #include <string>
35 #include <map>
36 #include <vector>
38 #include <router/ROEdge.h>
39 
40 
41 // ===========================================================================
42 // class declarations
43 // ===========================================================================
44 class ROLane;
45 
46 
47 // ===========================================================================
48 // class definitions
49 // ===========================================================================
57 class ROJTREdge : public ROEdge {
58 public:
66  ROJTREdge(const std::string& id, RONode* from, RONode* to, unsigned int index, const int priority);
67 
68 
70  ~ROJTREdge();
71 
72 
83  void addFollower(ROEdge* s, std::string dir = "");
84 
85 
93  void addFollowerProbability(ROJTREdge* follower,
94  SUMOTime begTime, SUMOTime endTime, SUMOReal probability);
95 
96 
102  ROJTREdge* chooseNext(const ROVehicle* const veh, SUMOTime time) const;
103 
104 
108  void setTurnDefaults(const std::vector<SUMOReal>& defs);
109 
110 
111 private:
113  typedef std::map<ROJTREdge*, ValueTimeLine<SUMOReal>*, Named::ComparatorIdLess> FollowerUsageCont;
114 
117 
119  std::vector<SUMOReal> myParsedTurnings;
120 
121 
122 private:
124  ROJTREdge(const ROJTREdge& src);
125 
127  ROJTREdge& operator=(const ROJTREdge& src);
128 
129 
130 };
131 
132 
133 #endif
134 
135 /****************************************************************************/
136