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.dev/sumo
3 // Copyright (C) 2001-2024 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials are made available under the
5 // terms of the Eclipse Public License 2.0 which is available at
6 // https://www.eclipse.org/legal/epl-2.0/
7 // This Source Code may also be made available under the following Secondary
8 // Licenses when the conditions for such availability set forth in the Eclipse
9 // Public License 2.0 are satisfied: GNU General Public License, version 2
10 // or later which is available at
11 // https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12 // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13 /****************************************************************************/
19 // Computes routes using junction turning percentages
20 /****************************************************************************/
21 #pragma once
22 #include <config.h>
23 
25 #include <router/RORoutable.h>
26 
27 
28 // ===========================================================================
29 // class declarations
30 // ===========================================================================
31 class RONet;
32 class ROEdge;
33 class ROJTREdge;
34 
35 
36 // ===========================================================================
37 // class definitions
38 // ===========================================================================
43 class ROJTRRouter : public SUMOAbstractRouter<ROEdge, ROVehicle> {
44 public:
53  ROJTRRouter(bool unbuildIsWarningOnly,
54  bool acceptAllDestinations, int maxEdges, bool ignoreClasses,
55  bool allowLoops,
56  bool discountSources);
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);
81 
82 private:
85 
88 
90  const int myMaxEdges;
91 
93  const bool myIgnoreClasses;
94 
96  const bool myAllowLoops;
97 
99  const bool myDiscountSources;
100 };
long long int SUMOTime
Definition: GUI.h:35
std::vector< const ROEdge * > ConstROEdgeVector
Definition: ROEdge.h:54
A basic edge for routing applications.
Definition: ROEdge.h:70
An edge the jtr-router may route through.
Definition: ROJTREdge.h:48
Computes routes using junction turning percentages.
Definition: ROJTRRouter.h:43
const bool myAcceptAllDestination
Whether all edges may be used as route end.
Definition: ROJTRRouter.h:87
const bool myUnbuildIsWarningOnly
Whether unbuildable routes shall be reported as warniings, not errors.
Definition: ROJTRRouter.h:84
const int myMaxEdges
The maximum number of edges a route may have.
Definition: ROJTRRouter.h:90
~ROJTRRouter()
Destructor.
Definition: ROJTRRouter.cpp:46
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:50
virtual SUMOAbstractRouter< ROEdge, ROVehicle > * clone()
Definition: ROJTRRouter.h:62
const bool myIgnoreClasses
Whether vehicle class information shall be ignored.
Definition: ROJTRRouter.h:93
const bool myDiscountSources
Whether upstream flows shall be discounted from source flows.
Definition: ROJTRRouter.h:99
ROJTRRouter(bool unbuildIsWarningOnly, bool acceptAllDestinations, int maxEdges, bool ignoreClasses, bool allowLoops, bool discountSources)
Constructor.
Definition: ROJTRRouter.cpp:33
const bool myAllowLoops
Whether a vehicle may reuse a road.
Definition: ROJTRRouter.h:96
The router's network representation.
Definition: RONet.h:62
A vehicle as used by router.
Definition: ROVehicle.h:50