LCOV - code coverage report
Current view: top level - app/src/Dynamic/Policy/RewardFunction - RewardFunctionGreedy.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 9 0.0 %
Date: 2023-08-17 16:45:52 Functions: 0 1 0.0 %

          Line data    Source code
       1             : #include "Dynamic/Policy/RewardFunction/RewardFunctionGreedy.hpp"
       2             : 
       3             : #include "Dynamic/Env/Env.hpp"
       4             : 
       5             : using namespace std;
       6             : using namespace Dynamic;
       7             : 
       8           0 : Reward Dynamic::RewardFunctionGreedy::operator()(const Env::Env &env, const Env::Vehicle &vehicle) {
       9           0 :     Time leftLane = env.getTime();
      10             : 
      11           0 : #pragma GCC diagnostic push
      12           0 : #pragma GCC diagnostic ignored "-Wfloat-equal"
      13           0 :     assert(vehicle.enteredLane == vehicle.path.back().first);
      14           0 : #pragma GCC diagnostic pop
      15             : 
      16           0 :     Time t = leftLane - vehicle.enteredLane;
      17             : 
      18           0 :     Reward r = -t;
      19             : 
      20           0 :     return r;
      21             : }
      22             : 
      23             : RewardFunctionGreedy Dynamic::RewardFunctionGreedy::INSTANCE;

Generated by: LCOV version 1.14