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 /****************************************************************************/
16 // An edge the jtr-router may route through
17 /****************************************************************************/
18 #ifndef ROJTREdge_h
19 #define ROJTREdge_h
20 
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 #include <config.h>
26 
27 #include <string>
28 #include <map>
29 #include <vector>
31 #include <router/ROEdge.h>
32 
33 
34 // ===========================================================================
35 // class declarations
36 // ===========================================================================
37 class ROLane;
38 
39 
40 // ===========================================================================
41 // class definitions
42 // ===========================================================================
50 class ROJTREdge : public ROEdge {
51 public:
59  ROJTREdge(const std::string& id, RONode* from, RONode* to, int index, const int priority);
60 
61 
63  ~ROJTREdge();
64 
65 
76  void addSuccessor(ROEdge* s, ROEdge* via = nullptr, std::string dir = "");
77 
78 
86  void addFollowerProbability(ROJTREdge* follower,
87  double begTime, double endTime, double probability);
88 
89 
96  ROJTREdge* chooseNext(const ROVehicle* const veh, double time, const std::set<const ROEdge*>& avoid) const;
97 
98 
102  void setTurnDefaults(const std::vector<double>& defs);
103 
104 
105 private:
107  typedef std::map<ROJTREdge*, ValueTimeLine<double>*, ComparatorIdLess> FollowerUsageCont;
108 
111 
113  std::vector<double> myParsedTurnings;
114 
115 
116 private:
118  ROJTREdge(const ROJTREdge& src);
119 
121  ROJTREdge& operator=(const ROJTREdge& src);
122 
123 
124 };
125 
126 
127 #endif
128 
129 /****************************************************************************/
130 
ValueTimeLine.h
ROJTREdge::myFollowingDefs
FollowerUsageCont myFollowingDefs
Storage for the probabilities of using a certain follower over time.
Definition: ROJTREdge.h:110
ROJTREdge::setTurnDefaults
void setTurnDefaults(const std::vector< double > &defs)
Sets the turning definition defaults.
Definition: ROJTREdge.cpp:107
ROLane
A single lane the router may use.
Definition: ROLane.h:50
ROVehicle
A vehicle as used by router.
Definition: ROVehicle.h:52
ComparatorIdLess
Function-object for stable sorting of objects acting like Named without being derived (SUMOVehicle)
Definition: Named.h:32
ROJTREdge::myParsedTurnings
std::vector< double > myParsedTurnings
The defaults for turnings.
Definition: ROJTREdge.h:113
ROJTREdge
An edge the jtr-router may route through.
Definition: ROJTREdge.h:50
ROJTREdge::~ROJTREdge
~ROJTREdge()
Destructor.
Definition: ROJTREdge.cpp:41
ROJTREdge::addSuccessor
void addSuccessor(ROEdge *s, ROEdge *via=nullptr, std::string dir="")
Adds information about a connected edge.
Definition: ROJTREdge.cpp:49
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:59
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:107
ROEdge
A basic edge for routing applications.
Definition: ROEdge.h:72
config.h
RONode
Base class for nodes used by the router.
Definition: RONode.h:45
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:71
ROJTREdge::ROJTREdge
ROJTREdge(const std::string &id, RONode *from, RONode *to, int index, const int priority)
Constructor.
Definition: ROJTREdge.cpp:37
ROEdge.h
ROJTREdge::operator=
ROJTREdge & operator=(const ROJTREdge &src)
invalidated assignment operator