/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.3// This program and the accompanying materials are made available under the4// terms of the Eclipse Public License 2.0 which is available at5// https://www.eclipse.org/legal/epl-2.0/6// This Source Code may also be made available under the following Secondary7// Licenses when the conditions for such availability set forth in the Eclipse8// Public License 2.0 are satisfied: GNU General Public License, version 29// or later which is available at10// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html11// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later12/****************************************************************************/13/// @file ROJTRRouter.h14/// @author Daniel Krajzewicz15/// @author Michael Behrisch16/// @date Tue, 20 Jan 200417///18// Computes routes using junction turning percentages19/****************************************************************************/20#pragma once21#include <config.h>2223#include <utils/router/SUMOAbstractRouter.h>24#include <router/RORoutable.h>252627// ===========================================================================28// class declarations29// ===========================================================================30class RONet;31class ROEdge;32class ROJTREdge;333435// ===========================================================================36// class definitions37// ===========================================================================38/**39* @class ROJTRRouter40* @brief Computes routes using junction turning percentages41*/42class ROJTRRouter : public SUMOAbstractRouter<ROEdge, ROVehicle> {43public:44/** @brief Constructor45* @param[in] unbuildIsWarningOnly Whether not closed routes shall not yield in an error46* @param[in] acceptAllDestinations If false, only sinks will be used as final edges47* @param[in] maxEdges The maximum number of edges a route may have48* @param[in] ignoreClasses Whether routing shall be done without regarding vehicle classes49* @param[in] allowLoops Whether a vehicle may reuse a road50* @param[in] discountSources Whether upstream flow shall be discounted from source flows51*/52ROJTRRouter(bool unbuildIsWarningOnly,53bool acceptAllDestinations, int maxEdges, bool ignoreClasses,54bool allowLoops,55bool discountSources);565758/// @brief Destructor59~ROJTRRouter();6061virtual SUMOAbstractRouter<ROEdge, ROVehicle>* clone() {62return new ROJTRRouter(myUnbuildIsWarningOnly, myAcceptAllDestination, myMaxEdges, myIgnoreClasses, myAllowLoops, myDiscountSources);63}6465/// @name Implementatios of SUMOAbstractRouter66/// @{6768/** @brief Computes a route69*70* The description how routes are computed is given in the user documentation71* @param[in] from The edge the vehicle starts at72* @param[in] to The destination edge - invalid here73* @param[in] vehicle The vehicle to compute the route for74* @param[in] time The departure time of the vehicle75* @param[filled] into The list of edges to store the route into76*/77bool compute(const ROEdge* from, const ROEdge* to, const ROVehicle* const vehicle,78SUMOTime time, ConstROEdgeVector& into, bool silent = false);79/// @}8081private:82/// @brief Whether unbuildable routes shall be reported as warniings, not errors83const bool myUnbuildIsWarningOnly;8485/// @brief Whether all edges may be used as route end86const bool myAcceptAllDestination;8788/// @brief The maximum number of edges a route may have89const int myMaxEdges;9091/// @brief Whether vehicle class information shall be ignored92const bool myIgnoreClasses;9394/// @brief Whether a vehicle may reuse a road95const bool myAllowLoops;9697/// @brief Whether upstream flows shall be discounted from source flows98const bool myDiscountSources;99};100101102