Eclipse 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-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
17 // An edge the jtr-router may route through
18 /****************************************************************************/
19 #ifndef ROJTREdge_h
20 #define ROJTREdge_h
21 
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #include <config.h>
27 
28 #include <string>
29 #include <map>
30 #include <vector>
32 #include <router/ROEdge.h>
33 
34 
35 // ===========================================================================
36 // class declarations
37 // ===========================================================================
38 class ROLane;
39 
40 
41 // ===========================================================================
42 // class definitions
43 // ===========================================================================
51 class ROJTREdge : public ROEdge {
52 public:
60  ROJTREdge(const std::string& id, RONode* from, RONode* to, int index, const int priority);
61 
62 
64  ~ROJTREdge();
65 
66 
77  void addSuccessor(ROEdge* s, ROEdge* via = nullptr, std::string dir = "");
78 
79 
87  void addFollowerProbability(ROJTREdge* follower,
88  double begTime, double endTime, double probability);
89 
90 
97  ROJTREdge* chooseNext(const ROVehicle* const veh, double time, const std::set<const ROEdge*>& avoid) const;
98 
99 
103  void setTurnDefaults(const std::vector<double>& defs);
104 
105 
106 private:
108  typedef std::map<ROJTREdge*, ValueTimeLine<double>*, ComparatorIdLess> FollowerUsageCont;
109 
112 
114  std::vector<double> myParsedTurnings;
115 
116 
117 private:
119  ROJTREdge(const ROJTREdge& src);
120 
122  ROJTREdge& operator=(const ROJTREdge& src);
123 
124 
125 };
126 
127 
128 #endif
129 
130 /****************************************************************************/
131 
ValueTimeLine.h
ROJTREdge::myFollowingDefs
FollowerUsageCont myFollowingDefs
Storage for the probabilities of using a certain follower over time.
Definition: ROJTREdge.h:111
ROJTREdge::setTurnDefaults
void setTurnDefaults(const std::vector< double > &defs)
Sets the turning definition defaults.
Definition: ROJTREdge.cpp:108
ROLane
A single lane the router may use.
Definition: ROLane.h:51
ROVehicle
A vehicle as used by router.
Definition: ROVehicle.h:53
ComparatorIdLess
Function-object for stable sorting of objects acting like Named without being derived (SUMOVehicle)
Definition: Named.h:33
ROJTREdge::myParsedTurnings
std::vector< double > myParsedTurnings
The defaults for turnings.
Definition: ROJTREdge.h:114
ROJTREdge
An edge the jtr-router may route through.
Definition: ROJTREdge.h:51
ROJTREdge::~ROJTREdge
~ROJTREdge()
Destructor.
Definition: ROJTREdge.cpp:42
ROJTREdge::addSuccessor
void addSuccessor(ROEdge *s, ROEdge *via=nullptr, std::string dir="")
Adds information about a connected edge.
Definition: ROJTREdge.cpp:50
ROJTREdge::addFollowerProbability
void addFollowerProbability(ROJTREdge *follower, double begTime, double endTime, double probability)
adds the information about the percentage of using a certain follower
Definition: ROJTREdge.cpp:60
ROJTREdge::FollowerUsageCont
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:108
ROEdge
A basic edge for routing applications.
Definition: ROEdge.h:73
config.h
RONode
Base class for nodes used by the router.
Definition: RONode.h:46
ROJTREdge::chooseNext
ROJTREdge * chooseNext(const ROVehicle *const veh, double time, const std::set< const ROEdge * > &avoid) const
Returns the next edge to use.
Definition: ROJTREdge.cpp:72
ROJTREdge::ROJTREdge
ROJTREdge(const std::string &id, RONode *from, RONode *to, int index, const int priority)
Constructor.
Definition: ROJTREdge.cpp:38
ROEdge.h
ROJTREdge::operator=
ROJTREdge & operator=(const ROJTREdge &src)
invalidated assignment operator