Scheduler
simpleTemperatureModel.h
Go to the documentation of this file.
1 
10 #ifndef SIMPLETEMPERATUREMODEL_H
11 #define SIMPLETEMPERATUREMODEL_H
12 
13 #include <string>
14 #include <utility>
15 
16 #include <utils/configuration.h>
17 
18 #include "temperatureModel.h"
19 #include <scheduler/processor.h>
20 
21 namespace Scheduler
22 {
23 
25 {
26 public:
27  static constexpr const char *configKey = "simpleTemperatureModel";
28 public:
29  SimpleTemperatureModel(std::shared_ptr<Utils::Configuration> conf);
31  double updateTemperature(double timeInterval, struct PowerParams *params,
32  double taskPowerCoeff, double freq) override;
33  void printTemperatureHistory(std::string filename) override;
34  void printEnergyHistory(std::string filename) override;
35  double getTemperature() override;
36 private:
37  double T0{20.0}; /*previous temperature*/
38  const double Ta{20.0}; /*ambient temperature*/
39  const double R{1.5}; /*thermal resistance*/
40  const double C{150}; /*thermal capacity*/
41  double A{0.0};
42  double T{0.0};
43  double power{0.0};
44  double previousTime{0.0};
45  Utils::Record temperatureHistory;
46  Utils::Record energyHistory;
47  bool logTemperature{false};
48  bool logEnergy{false};
49  const double endTime{0.0};
50  double recordingTimeRatio{0.0};
51  void computeAndLog();
52 };
53 
54 }
55 
56 
57 
58 #endif
static constexpr const char * configKey
double updateTemperature(double timeInterval, struct PowerParams *params, double taskPowerCoeff, double freq) override
SimpleTemperatureModel(std::shared_ptr< Utils::Configuration > conf)
string filename
Definition: aging.py:5
void printEnergyHistory(std::string filename) override
void printTemperatureHistory(std::string filename) override