SUMO - Simulation of Urban MObility
ROJTREdge.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2004-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
19 // An edge the jtr-router may route through
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, int index, const int priority);
67 
68 
70  ~ROJTREdge();
71 
72 
83  void addSuccessor(ROEdge* s, std::string dir = "");
84 
85 
93  void addFollowerProbability(ROJTREdge* follower,
94  double begTime, double endTime, double probability);
95 
96 
103  ROJTREdge* chooseNext(const ROVehicle* const veh, double time, const std::set<const ROEdge*>& avoid) const;
104 
105 
109  void setTurnDefaults(const std::vector<double>& defs);
110 
111 
112 private:
114  typedef std::map<ROJTREdge*, ValueTimeLine<double>*, ComparatorIdLess> FollowerUsageCont;
115 
117  FollowerUsageCont myFollowingDefs;
118 
120  std::vector<double> myParsedTurnings;
121 
122 
123 private:
125  ROJTREdge(const ROJTREdge& src);
126 
128  ROJTREdge& operator=(const ROJTREdge& src);
129 
130 
131 };
132 
133 
134 #endif
135 
136 /****************************************************************************/
137 
FollowerUsageCont myFollowingDefs
Storage for the probabilities of using a certain follower over time.
Definition: ROJTREdge.h:117
A single lane the router may use.
Definition: ROLane.h:56
ROJTREdge & operator=(const ROJTREdge &src)
invalidated assignment operator
std::vector< double > myParsedTurnings
The defaults for turnings.
Definition: ROJTREdge.h:120
A vehicle as used by router.
Definition: ROVehicle.h:59
std::map< ROJTREdge *, ValueTimeLine< double > *, ComparatorIdLess > FollowerUsageCont
Definition of a map that stores the probabilities of using a certain follower over time...
Definition: ROJTREdge.h:114
An edge the jtr-router may route through.
Definition: ROJTREdge.h:57
void addFollowerProbability(ROJTREdge *follower, double begTime, double endTime, double probability)
adds the information about the percentage of using a certain follower
Definition: ROJTREdge.cpp:66
void addSuccessor(ROEdge *s, std::string dir="")
Adds information about a connected edge.
Definition: ROJTREdge.cpp:56
A basic edge for routing applications.
Definition: ROEdge.h:77
~ROJTREdge()
Destructor.
Definition: ROJTREdge.cpp:48
ROJTREdge(const std::string &id, RONode *from, RONode *to, int index, const int priority)
Constructor.
Definition: ROJTREdge.cpp:44
void setTurnDefaults(const std::vector< double > &defs)
Sets the turning definition defaults.
Definition: ROJTREdge.cpp:114
ROJTREdge * chooseNext(const ROVehicle *const veh, double time, const std::set< const ROEdge *> &avoid) const
Returns the next edge to use.
Definition: ROJTREdge.cpp:78
Base class for nodes used by the router.
Definition: RONode.h:52
Function-object for stable sorting of objects acting like Named without being derived (SUMOVehicle) ...
Definition: Named.h:39