1 /****************************************************************************/ 2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo 3 // Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. 4 // This program and the accompanying materials 5 // are made available under the terms of the Eclipse Public License v2.0 6 // which accompanies this distribution, and is available at 7 // http://www.eclipse.org/legal/epl-v20.html 8 // SPDX-License-Identifier: EPL-2.0 9 /****************************************************************************/ 10 /// @file EffortCalculator.h 11 /// @author Michael Behrisch 12 /// @date 2018-08-21 13 /// @version $Id$ 14 /// 15 // The EffortCalculator is an interface for additional edge effort calculators 16 /****************************************************************************/ 17 #ifndef EffortCalculator_h 18 #define EffortCalculator_h 19 20 21 // =========================================================================== 22 // included modules 23 // =========================================================================== 24 #include <config.h> 25 26 #include <utils/common/Parameterised.h> 27 28 29 // =========================================================================== 30 // class definitions 31 // =========================================================================== 32 /// @brief the effort calculator interface 33 class EffortCalculator { 34 35 public: 36 37 /** Pass the set of all edges in the routing query to the effortCalculator **/ 38 virtual void init(const std::vector<std::string>& edges) = 0; 39 40 /** Add information about stops **/ 41 virtual void addStop(const int stopEdge, const Parameterised& params) = 0; 42 43 /** Return the effort of a given edge **/ 44 virtual double getEffort(const int numericalID) const = 0; 45 46 /** Update the effort of the edge **/ 47 virtual void update(const int edge, const int prev, const double length) = 0; 48 49 /** Set the effort of the first edge in the query to zero **/ 50 virtual void setInitialState(const int edge) = 0; 51 52 /** basic output facility to inform about effort at this edge **/ 53 virtual std::string output(const int edge) const = 0; 54 55 }; 56 57 58 #endif 59 60 /****************************************************************************/ 61