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 
FollowerUsageCont myFollowingDefs
Storage for the probabilities of using a certain follower over time.
Definition: ROJTREdge.h:116
A single lane the router may use.
Definition: ROLane.h:51
void addFollower(ROEdge *s, std::string dir="")
Adds information about a connected edge.
Definition: ROJTREdge.cpp:60
ROJTREdge(const std::string &id, RONode *from, RONode *to, unsigned int index, const int priority)
Constructor.
Definition: ROJTREdge.cpp:48
ROJTREdge * chooseNext(const ROVehicle *const veh, SUMOTime time) const
Returns the next edge to use.
Definition: ROJTREdge.cpp:82
void setTurnDefaults(const std::vector< SUMOReal > &defs)
Sets the turning definition defaults.
Definition: ROJTREdge.cpp:114
ROJTREdge & operator=(const ROJTREdge &src)
invalidated assignment operator
std::vector< SUMOReal > myParsedTurnings
The defaults for turnings.
Definition: ROJTREdge.h:119
A vehicle as used by router.
Definition: ROVehicle.h:58
An edge the jtr-router may route through.
Definition: ROJTREdge.h:57
A basic edge for routing applications.
Definition: ROEdge.h:67
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:113
~ROJTREdge()
Destructor.
Definition: ROJTREdge.cpp:52
#define SUMOReal
Definition: config.h:215
Base class for nodes used by the router.
Definition: RONode.h:46
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:70