SUMO - Simulation of Urban MObility
ROJTRRouter.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
18 // Computes routes using junction turning percentages
19 /****************************************************************************/
20 #ifndef ROJTRRouter_h
21 #define ROJTRRouter_h
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #ifdef _MSC_VER
28 #include <windows_config.h>
29 #else
30 #include <config.h>
31 #endif
32 
34 #include <router/RORoutable.h>
35 
36 
37 // ===========================================================================
38 // class declarations
39 // ===========================================================================
40 class RONet;
41 class ROEdge;
42 class ROJTREdge;
43 
44 
45 // ===========================================================================
46 // class definitions
47 // ===========================================================================
52 class ROJTRRouter : public SUMOAbstractRouter<ROEdge, ROVehicle> {
53 public:
61  ROJTRRouter(bool unbuildIsWarningOnly,
62  bool acceptAllDestinations, int maxEdges, bool ignoreClasses,
63  bool allowLoops);
64 
65 
67  ~ROJTRRouter();
68 
71  }
72 
75 
85  bool compute(const ROEdge* from, const ROEdge* to, const ROVehicle* const vehicle,
86  SUMOTime time, ConstROEdgeVector& into);
87 
88 
95  double recomputeCosts(const ConstROEdgeVector& edges, const ROVehicle* const v, SUMOTime msTime) const;
97 
98 
99 private:
102 
105 
107  const int myMaxEdges;
108 
110  const bool myIgnoreClasses;
111 
113  const bool myAllowLoops;
114 
115 };
116 
117 
118 #endif
119 
120 /****************************************************************************/
121 
Computes routes using junction turning percentages.
Definition: ROJTRRouter.h:52
const bool myUnbuildIsWarningOnly
Whether unbuildable routes shall be reported as warniings, not errors.
Definition: ROJTRRouter.h:101
const int myMaxEdges
The maximum number of edges a route may have.
Definition: ROJTRRouter.h:107
bool compute(const ROEdge *from, const ROEdge *to, const ROVehicle *const vehicle, SUMOTime time, ConstROEdgeVector &into)
Computes a route.
Definition: ROJTRRouter.cpp:54
virtual SUMOAbstractRouter< ROEdge, ROVehicle > * clone()
Definition: ROJTRRouter.h:69
std::vector< const ROEdge * > ConstROEdgeVector
Definition: ROEdge.h:62
const bool myAcceptAllDestination
Whether all edges may be used as route end.
Definition: ROJTRRouter.h:104
const bool myAllowLoops
Whether a vehicle may reuse a road.
Definition: ROJTRRouter.h:113
A vehicle as used by router.
Definition: ROVehicle.h:59
~ROJTRRouter()
Destructor.
Definition: ROJTRRouter.cpp:50
const bool myIgnoreClasses
Whether vehicle class information shall be ignored.
Definition: ROJTRRouter.h:110
double recomputeCosts(const ConstROEdgeVector &edges, const ROVehicle *const v, SUMOTime msTime) const
Recomputes the costs of a route.
Definition: ROJTRRouter.cpp:91
An edge the jtr-router may route through.
Definition: ROJTREdge.h:57
A basic edge for routing applications.
Definition: ROEdge.h:77
ROJTRRouter(bool unbuildIsWarningOnly, bool acceptAllDestinations, int maxEdges, bool ignoreClasses, bool allowLoops)
Constructor.
Definition: ROJTRRouter.cpp:41
The router&#39;s network representation.
Definition: RONet.h:74
long long int SUMOTime
Definition: TraCIDefs.h:51