SUMO - Simulation of Urban MObility
ROJTREdge.h
Go to the documentation of this file.
1 /****************************************************************************/
9 // An edge the jtr-router may route through
10 /****************************************************************************/
11 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
12 // Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors
13 /****************************************************************************/
14 //
15 // This file is part of SUMO.
16 // SUMO is free software: you can redistribute it and/or modify
17 // it under the terms of the GNU General Public License as published by
18 // the Free Software Foundation, either version 3 of the License, or
19 // (at your option) any later version.
20 //
21 /****************************************************************************/
22 #ifndef ROJTREdge_h
23 #define ROJTREdge_h
24 
25 
26 // ===========================================================================
27 // included modules
28 // ===========================================================================
29 #ifdef _MSC_VER
30 #include <windows_config.h>
31 #else
32 #include <config.h>
33 #endif
34 
35 #include <string>
36 #include <map>
37 #include <vector>
39 #include <router/ROEdge.h>
40 
41 
42 // ===========================================================================
43 // class declarations
44 // ===========================================================================
45 class ROLane;
46 
47 
48 // ===========================================================================
49 // class definitions
50 // ===========================================================================
58 class ROJTREdge : public ROEdge {
59 public:
67  ROJTREdge(const std::string& id, RONode* from, RONode* to, unsigned int index, const int priority);
68 
69 
71  ~ROJTREdge();
72 
73 
84  void addSuccessor(ROEdge* s, std::string dir = "");
85 
86 
94  void addFollowerProbability(ROJTREdge* follower,
95  SUMOReal begTime, SUMOReal endTime, SUMOReal probability);
96 
97 
104  ROJTREdge* chooseNext(const ROVehicle* const veh, SUMOReal time, const std::set<const ROEdge*>& avoid) const;
105 
106 
110  void setTurnDefaults(const std::vector<SUMOReal>& defs);
111 
112 
113 private:
115  typedef std::map<ROJTREdge*, ValueTimeLine<SUMOReal>*, Named::ComparatorIdLess> FollowerUsageCont;
116 
118  FollowerUsageCont myFollowingDefs;
119 
121  std::vector<SUMOReal> myParsedTurnings;
122 
123 
124 private:
126  ROJTREdge(const ROJTREdge& src);
127 
129  ROJTREdge& operator=(const ROJTREdge& src);
130 
131 
132 };
133 
134 
135 #endif
136 
137 /****************************************************************************/
138 
FollowerUsageCont myFollowingDefs
Storage for the probabilities of using a certain follower over time.
Definition: ROJTREdge.h:118
A single lane the router may use.
Definition: ROLane.h:52
ROJTREdge(const std::string &id, RONode *from, RONode *to, unsigned int index, const int priority)
Constructor.
Definition: ROJTREdge.cpp:49
ROJTREdge * chooseNext(const ROVehicle *const veh, SUMOReal time, const std::set< const ROEdge * > &avoid) const
Returns the next edge to use.
Definition: ROJTREdge.cpp:83
void setTurnDefaults(const std::vector< SUMOReal > &defs)
Sets the turning definition defaults.
Definition: ROJTREdge.cpp:119
ROJTREdge & operator=(const ROJTREdge &src)
invalidated assignment operator
std::vector< SUMOReal > myParsedTurnings
The defaults for turnings.
Definition: ROJTREdge.h:121
A vehicle as used by router.
Definition: ROVehicle.h:60
An edge the jtr-router may route through.
Definition: ROJTREdge.h:58
void addSuccessor(ROEdge *s, std::string dir="")
Adds information about a connected edge.
Definition: ROJTREdge.cpp:61
A basic edge for routing applications.
Definition: ROEdge.h:73
std::map< ROJTREdge *, ValueTimeLine< SUMOReal > *, Named::ComparatorIdLess > FollowerUsageCont
Definition of a map that stores the probabilities of using a certain follower over time...
Definition: ROJTREdge.h:115
~ROJTREdge()
Destructor.
Definition: ROJTREdge.cpp:53
#define SUMOReal
Definition: config.h:214
Base class for nodes used by the router.
Definition: RONode.h:53
void addFollowerProbability(ROJTREdge *follower, SUMOReal begTime, SUMOReal endTime, SUMOReal probability)
adds the information about the percentage of using a certain follower
Definition: ROJTREdge.cpp:71
Function-object for stable sorting in containers.
Definition: Named.h:79