Eclipse 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-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 /****************************************************************************/
15 // Computes routes using junction turning percentages
16 /****************************************************************************/
17 #ifndef ROJTRRouter_h
18 #define ROJTRRouter_h
19 
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #include <config.h>
25 
27 #include <router/RORoutable.h>
28 
29 
30 // ===========================================================================
31 // class declarations
32 // ===========================================================================
33 class RONet;
34 class ROEdge;
35 class ROJTREdge;
36 
37 
38 // ===========================================================================
39 // class definitions
40 // ===========================================================================
45 class ROJTRRouter : public SUMOAbstractRouter<ROEdge, ROVehicle> {
46 public:
54  ROJTRRouter(bool unbuildIsWarningOnly,
55  bool acceptAllDestinations, int maxEdges, bool ignoreClasses,
56  bool allowLoops);
57 
58 
60  ~ROJTRRouter();
61 
64  }
65 
68 
78  bool compute(const ROEdge* from, const ROEdge* to, const ROVehicle* const vehicle,
79  SUMOTime time, ConstROEdgeVector& into, bool silent = false);
80 
81 
88  double recomputeCosts(const ConstROEdgeVector& edges, const ROVehicle* const v, SUMOTime msTime) const;
90 
91 
92 private:
95 
98 
100  const int myMaxEdges;
101 
103  const bool myIgnoreClasses;
104 
106  const bool myAllowLoops;
107 
108 };
109 
110 
111 #endif
112 
113 /****************************************************************************/
114 
ROJTRRouter::~ROJTRRouter
~ROJTRRouter()
Destructor.
Definition: ROJTRRouter.cpp:43
SUMOTime
long long int SUMOTime
Definition: SUMOTime.h:34
RONet
The router's network representation.
Definition: RONet.h:63
ROVehicle
A vehicle as used by router.
Definition: ROVehicle.h:52
RORoutable.h
ROJTRRouter::compute
bool compute(const ROEdge *from, const ROEdge *to, const ROVehicle *const vehicle, SUMOTime time, ConstROEdgeVector &into, bool silent=false)
Computes a route.
Definition: ROJTRRouter.cpp:47
ROJTRRouter::clone
virtual SUMOAbstractRouter< ROEdge, ROVehicle > * clone()
Definition: ROJTRRouter.h:62
ROJTREdge
An edge the jtr-router may route through.
Definition: ROJTREdge.h:50
ROJTRRouter::ROJTRRouter
ROJTRRouter(bool unbuildIsWarningOnly, bool acceptAllDestinations, int maxEdges, bool ignoreClasses, bool allowLoops)
Constructor.
Definition: ROJTRRouter.cpp:34
ROJTRRouter::myMaxEdges
const int myMaxEdges
The maximum number of edges a route may have.
Definition: ROJTRRouter.h:100
SUMOAbstractRouter
Definition: SUMOAbstractRouter.h:46
ROJTRRouter::myIgnoreClasses
const bool myIgnoreClasses
Whether vehicle class information shall be ignored.
Definition: ROJTRRouter.h:103
ROEdge
A basic edge for routing applications.
Definition: ROEdge.h:72
config.h
ROJTRRouter::myAllowLoops
const bool myAllowLoops
Whether a vehicle may reuse a road.
Definition: ROJTRRouter.h:106
SUMOAbstractRouter.h
ROJTRRouter::myUnbuildIsWarningOnly
const bool myUnbuildIsWarningOnly
Whether unbuildable routes shall be reported as warniings, not errors.
Definition: ROJTRRouter.h:94
ROJTRRouter::recomputeCosts
double recomputeCosts(const ConstROEdgeVector &edges, const ROVehicle *const v, SUMOTime msTime) const
Recomputes the costs of a route.
ROJTRRouter
Computes routes using junction turning percentages.
Definition: ROJTRRouter.h:45
ROJTRRouter::myAcceptAllDestination
const bool myAcceptAllDestination
Whether all edges may be used as route end.
Definition: ROJTRRouter.h:97
ConstROEdgeVector
std::vector< const ROEdge * > ConstROEdgeVector
Definition: ROEdge.h:56