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-sim.org/
12 // Copyright (C) 2004-2014 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 addFollower(ROEdge* s, std::string dir = "");
85 
86 
94  void addFollowerProbability(ROJTREdge* follower,
95  SUMOTime begTime, SUMOTime endTime, SUMOReal probability);
96 
97 
103  ROJTREdge* chooseNext(const ROVehicle* const veh, SUMOTime time) const;
104 
105 
109  void setTurnDefaults(const std::vector<SUMOReal>& defs);
110 
111 
112 private:
114  typedef std::map<ROJTREdge*, ValueTimeLine<SUMOReal>*, Named::ComparatorIdLess> FollowerUsageCont;
115 
117  FollowerUsageCont myFollowingDefs;
118 
120  std::vector<SUMOReal> 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:52
void addFollower(ROEdge *s, std::string dir="")
Adds information about a connected edge.
Definition: ROJTREdge.cpp:61
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, SUMOTime time) 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:115
ROJTREdge & operator=(const ROJTREdge &src)
invalidated assignment operator
std::vector< SUMOReal > myParsedTurnings
The defaults for turnings.
Definition: ROJTREdge.h:120
A vehicle as used by router.
Definition: ROVehicle.h:59
An edge the jtr-router may route through.
Definition: ROJTREdge.h:58
A basic edge for routing applications.
Definition: ROEdge.h:69
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:114
~ROJTREdge()
Destructor.
Definition: ROJTREdge.cpp:53
#define SUMOReal
Definition: config.h:215
Base class for nodes used by the router.
Definition: RONode.h:51
Function-object for stable sorting in containers.
Definition: Named.h:74
void addFollowerProbability(ROJTREdge *follower, SUMOTime begTime, SUMOTime endTime, SUMOReal probability)
adds the information about the percentage of using a certain follower
Definition: ROJTREdge.cpp:71