SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules 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.dlr.de/
11 // Copyright (C) 2001-2016 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 #include <router/RORoutable.h>
36 
37 
38 // ===========================================================================
39 // class declarations
40 // ===========================================================================
41 class RONet;
42 class ROEdge;
43 class ROJTREdge;
44 
45 
46 // ===========================================================================
47 // class definitions
48 // ===========================================================================
53 class ROJTRRouter : public SUMOAbstractRouter<ROEdge, ROVehicle> {
54 public:
62  ROJTRRouter(bool unbuildIsWarningOnly,
63  bool acceptAllDestinations, int maxEdges, bool ignoreClasses,
64  bool allowLoops);
65 
66 
68  ~ROJTRRouter();
69 
72  }
73 
76 
86  bool compute(const ROEdge* from, const ROEdge* to, const ROVehicle* const vehicle,
87  SUMOTime time, ConstROEdgeVector& into);
88 
89 
96  SUMOReal recomputeCosts(const ConstROEdgeVector& edges, const ROVehicle* const v, SUMOTime msTime) const;
98 
99 
100 private:
103 
106 
108  const int myMaxEdges;
109 
111  const bool myIgnoreClasses;
112 
114  const bool myAllowLoops;
115 
116 };
117 
118 
119 #endif
120 
121 /****************************************************************************/
122 
long long int SUMOTime
Definition: SUMOTime.h:43
Computes routes using junction turning percentages.
Definition: ROJTRRouter.h:53
const bool myUnbuildIsWarningOnly
Whether unbuildable routes shall be reported as warniings, not errors.
Definition: ROJTRRouter.h:102
const int myMaxEdges
The maximum number of edges a route may have.
Definition: ROJTRRouter.h:108
bool compute(const ROEdge *from, const ROEdge *to, const ROVehicle *const vehicle, SUMOTime time, ConstROEdgeVector &into)
Computes a route.
Definition: ROJTRRouter.cpp:59
virtual SUMOAbstractRouter< ROEdge, ROVehicle > * clone()
Definition: ROJTRRouter.h:70
std::vector< const ROEdge * > ConstROEdgeVector
Definition: ROEdge.h:62
const bool myAcceptAllDestination
Whether all edges may be used as route end.
Definition: ROJTRRouter.h:105
const bool myAllowLoops
Whether a vehicle may reuse a road.
Definition: ROJTRRouter.h:114
A vehicle as used by router.
Definition: ROVehicle.h:60
~ROJTRRouter()
Destructor.
Definition: ROJTRRouter.cpp:55
const bool myIgnoreClasses
Whether vehicle class information shall be ignored.
Definition: ROJTRRouter.h:111
An edge the jtr-router may route through.
Definition: ROJTREdge.h:58
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:46
The router's network representation.
Definition: RONet.h:76
SUMOReal recomputeCosts(const ConstROEdgeVector &edges, const ROVehicle *const v, SUMOTime msTime) const
Recomputes the costs of a route.
Definition: ROJTRRouter.cpp:96
#define SUMOReal
Definition: config.h:214