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-2023 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// ===========================================================================
31class RONet;
32class ROEdge;
33class ROJTREdge;
34
35
36// ===========================================================================
37// class definitions
38// ===========================================================================
43class ROJTRRouter : public SUMOAbstractRouter<ROEdge, ROVehicle> {
44public:
53 ROJTRRouter(bool unbuildIsWarningOnly,
54 bool acceptAllDestinations, int maxEdges, bool ignoreClasses,
55 bool allowLoops,
56 bool discountSources);
57
58
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);
80
81
88 double recomputeCosts(const ConstROEdgeVector& edges, const ROVehicle* const v, SUMOTime msTime) const;
90
91private:
94
97
99 const int myMaxEdges;
100
102 const bool myIgnoreClasses;
103
105 const bool myAllowLoops;
106
109};
long long int SUMOTime
Definition: GUI.h:36
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
double recomputeCosts(const ConstROEdgeVector &edges, const ROVehicle *const v, SUMOTime msTime) const
Recomputes the costs of a route.
const bool myAcceptAllDestination
Whether all edges may be used as route end.
Definition: ROJTRRouter.h:96
const bool myUnbuildIsWarningOnly
Whether unbuildable routes shall be reported as warniings, not errors.
Definition: ROJTRRouter.h:93
const int myMaxEdges
The maximum number of edges a route may have.
Definition: ROJTRRouter.h:99
~ROJTRRouter()
Destructor.
Definition: ROJTRRouter.cpp:46
virtual SUMOAbstractRouter< ROEdge, ROVehicle > * clone()
Definition: ROJTRRouter.h:62
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
const bool myIgnoreClasses
Whether vehicle class information shall be ignored.
Definition: ROJTRRouter.h:102
const bool myDiscountSources
Whether upstream flows shall be discounted from source flows.
Definition: ROJTRRouter.h:108
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:105
The router's network representation.
Definition: RONet.h:62
A vehicle as used by router.
Definition: ROVehicle.h:50