SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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-sim.org/
11 // Copyright (C) 2001-2013 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:
62  ROJTRRouter(RONet& net, bool unbuildIsWarningOnly,
63  bool acceptAllDestinations, int maxEdges, bool ignoreClasses,
64  bool allowLoops);
65 
66 
68  ~ROJTRRouter();
69 
70 
71 
74 
84  void compute(const ROEdge* from, const ROEdge* to, const ROVehicle* const vehicle,
85  SUMOTime time, std::vector<const ROEdge*>& into);
86 
87 
94  SUMOReal recomputeCosts(const std::vector<const ROEdge*>& edges, const ROVehicle* const v, SUMOTime time) const;
96 
97 
98 private:
101 
104 
107 
109  const int myMaxEdges;
110 
112  const bool myIgnoreClasses;
113 
115  const bool myAllowLoops;
116 
117 };
118 
119 
120 #endif
121 
122 /****************************************************************************/
123 
SUMOReal recomputeCosts(const std::vector< const ROEdge * > &edges, const ROVehicle *const v, SUMOTime time) const
Recomputes the costs of a route.
Definition: ROJTRRouter.cpp:92
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:103
const int myMaxEdges
The maximum number of edges a route may have.
Definition: ROJTRRouter.h:109
void compute(const ROEdge *from, const ROEdge *to, const ROVehicle *const vehicle, SUMOTime time, std::vector< const ROEdge * > &into)
Computes a route.
Definition: ROJTRRouter.cpp:59
ROJTRRouter(RONet &net, bool unbuildIsWarningOnly, bool acceptAllDestinations, int maxEdges, bool ignoreClasses, bool allowLoops)
Constructor.
Definition: ROJTRRouter.cpp:46
const bool myAcceptAllDestination
Whether all edges may be used as route end.
Definition: ROJTRRouter.h:106
const bool myAllowLoops
Whether a vehicle may reuse a road.
Definition: ROJTRRouter.h:115
RONet & myNet
The network to use.
Definition: ROJTRRouter.h:100
A vehicle as used by router.
Definition: ROVehicle.h:58
~ROJTRRouter()
Destructor.
Definition: ROJTRRouter.cpp:55
const bool myIgnoreClasses
Whether vehicle class information shall be ignored.
Definition: ROJTRRouter.h:112
An edge the jtr-router may route through.
Definition: ROJTREdge.h:57
A basic edge for routing applications.
Definition: ROEdge.h:67
The router&#39;s network representation.
Definition: RONet.h:65
#define SUMOReal
Definition: config.h:215