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