SUMO - Simulation of Urban MObility
ROJTRRouter.h
Go to the documentation of this file.
1 /****************************************************************************/
8 // Computes routes using junction turning percentages
9 /****************************************************************************/
10 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
11 // Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors
12 /****************************************************************************/
13 //
14 // This file is part of SUMO.
15 // SUMO is free software: you can redistribute it and/or modify
16 // it under the terms of the GNU General Public License as published by
17 // the Free Software Foundation, either version 3 of the License, or
18 // (at your option) any later version.
19 //
20 /****************************************************************************/
21 #ifndef ROJTRRouter_h
22 #define ROJTRRouter_h
23 
24 
25 // ===========================================================================
26 // included modules
27 // ===========================================================================
28 #ifdef _MSC_VER
29 #include <windows_config.h>
30 #else
31 #include <config.h>
32 #endif
33 
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  void compute(const ROEdge* from, const ROEdge* to, const ROVehicle* const vehicle,
86  SUMOTime time, ConstROEdgeVector& into);
87 
88 
95  SUMOReal recomputeCosts(const ConstROEdgeVector& edges, const ROVehicle* const v, SUMOTime time) 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 
long long int SUMOTime
Definition: SUMOTime.h:43
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
std::vector< const ROEdge * > ConstROEdgeVector
Definition: ROEdge.h:59
const bool myAcceptAllDestination
Whether all edges may be used as route end.
Definition: ROJTRRouter.h:104
void compute(const ROEdge *from, const ROEdge *to, const ROVehicle *const vehicle, SUMOTime time, ConstROEdgeVector &into)
Computes a route.
Definition: ROJTRRouter.cpp:59
const bool myAllowLoops
Whether a vehicle may reuse a road.
Definition: ROJTRRouter.h:113
SUMOReal recomputeCosts(const ConstROEdgeVector &edges, const ROVehicle *const v, SUMOTime time) const
Recomputes the costs of a route.
Definition: ROJTRRouter.cpp:94
A vehicle as used by router.
Definition: ROVehicle.h:60
virtual SUMOAbstractRouter< ROEdge, ROVehicle > * clone() const
Definition: ROJTRRouter.h:69
~ROJTRRouter()
Destructor.
Definition: ROJTRRouter.cpp:55
const bool myIgnoreClasses
Whether vehicle class information shall be ignored.
Definition: ROJTRRouter.h:110
An edge the jtr-router may route through.
Definition: ROJTREdge.h:58
A basic edge for routing applications.
Definition: ROEdge.h:73
ROJTRRouter(bool unbuildIsWarningOnly, bool acceptAllDestinations, int maxEdges, bool ignoreClasses, bool allowLoops)
Constructor.
Definition: ROJTRRouter.cpp:46
The router&#39;s network representation.
Definition: RONet.h:72
#define SUMOReal
Definition: config.h:214