/****************************************************************************/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 Command_RouteReplacement.h14/// @author Jakob Erdmann15/// @date 1 Feb 202216///17// Replaces a vehicles route at a pre-determined time18/****************************************************************************/19#pragma once20#include <config.h>2122#include <string>23#include <map>24#include <utils/common/Command.h>252627// ===========================================================================28// class declarations29// ===========================================================================30class MSRoute;313233// ===========================================================================34// class definitions35// ===========================================================================36/**37* @class Command_RouteReplacement38* @brief Writes the state of the tls to a file (in each second)39*/40class Command_RouteReplacement : public Command {41public:42/** @brief Constructor43*44* @param[in] tlls The logic to write state of45* @param[in] od The output device to write the state into46*/47Command_RouteReplacement(const std::string& vehID, ConstMSRoutePtr route);4849/// @brief Destructor50~Command_RouteReplacement();515253/// @name Derived from Command54/// @{5556/** @brief toggles override57*58* Returns always 1.59*60* @param[in] currentTime The current simulation time (unused)61* @return Always DELTA_T (will be executed in next time step)62* @see Command63*/64SUMOTime execute(SUMOTime currentTime);65/// @}6667private:6869/// @brief The id of the vehicle to be rerouted70std::string myVehID;7172/// @brief The replacement route73ConstMSRoutePtr myRoute;747576private:77/// @brief Invalidated copy constructor.78Command_RouteReplacement(const Command_RouteReplacement&);7980/// @brief Invalidated assignment operator.81Command_RouteReplacement& operator=(const Command_RouteReplacement&);8283};848586