LCOV - code coverage report
Current view: top level - src/microsim/traffic_lights - MSSOTLPolicyDesirability.h (source / functions) Hit Total Coverage
Test: lcov.info Lines: 2 2 100.0 %
Date: 2024-05-19 15:37:39 Functions: 0 0 -

          Line data    Source code
       1             : /****************************************************************************/
       2             : // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
       3             : // Copyright (C) 2013-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             : /****************************************************************************/
      14             : /// @file    MSSOTLPolicyDesirability.h
      15             : /// @author  Riccardo Belletti
      16             : /// @date    2014-03-20
      17             : ///
      18             : // The class a low-level policy desirability
      19             : /****************************************************************************/
      20             : #pragma once
      21             : #include <config.h>
      22             : 
      23             : #include <sstream>
      24             : #include <utils/common/Parameterised.h>
      25             : #include <utils/common/StringUtils.h>
      26             : 
      27             : /**
      28             :  * \class MSSOTLPolicyDesirability
      29             :  * \brief This class determines the desirability algorithm of a MSSOTLPolicy when
      30             :  * used in combination with a high level policy
      31             :  */
      32             : class MSSOTLPolicyDesirability: public Parameterised {
      33             : 
      34             : private:
      35             :     std::string myKeyPrefix;
      36             : 
      37             : public:
      38             : 
      39             :     MSSOTLPolicyDesirability(std::string keyPrefix,
      40             :                              const Parameterised::Map& parameters);
      41             :     virtual ~MSSOTLPolicyDesirability();
      42             : 
      43             :     /**
      44             :      * \brief Calculates the desirability of the policy
      45             :      */
      46             :     virtual double computeDesirability(double vehInMeasure,
      47             :                                        double vehOutMeasure) = 0;
      48             :     /**
      49             :      * \brief Calculates the desirability of the policy
      50             :      */
      51             :     virtual double computeDesirability(double vehInMeasure, double vehOutMeasure,
      52             :                                        double vehInDispersionMeasure,
      53             :                                        double vehOutDispersionMeasure) = 0;
      54             :     virtual std::string getMessage() = 0;
      55             :     void setKeyPrefix(std::string val) {
      56         128 :         myKeyPrefix = val;
      57         128 :     }
      58             :     std::string getKeyPrefix() {
      59             :         return myKeyPrefix;
      60             :     }
      61             : 
      62             : };

Generated by: LCOV version 1.14