Scheduler
rlDiscipline.h
Go to the documentation of this file.
1 
10 #ifndef RL_DISCIPLINE_H
11 #define RL_DISCIPLINE_H
12 
13 #include <memory>
14 
16 
17 
18 namespace Scheduler
19 {
20  class Process;
21  class Queue;
22 }
23 
24 namespace Mdp
25 {
26  class MdpModel;
27  class MdpConfiguration;
28 }
29 
30 namespace RlScheduler
31 {
32 
33 class DomainModel;
34 class RlDisciplineBuilder;
35 class Configuration;
36 
38 {
39 friend RlDisciplineBuilder;
40 public:
41  static constexpr const char *configKey = "rlDiscipline";
42 public:
43  RlDiscipline(std::shared_ptr<Configuration> conf);
44  ~RlDiscipline();
45  std::shared_ptr<Scheduler::Process> selectNextTask(Scheduler::Queue *readyQueue,
46  std::shared_ptr<Scheduler::Process> running, unsigned int deadlineMisses);
47  bool preempts(Scheduler::TriggeringEvent trigger);
48  std::string getName(){return "Reinforcement learning real-time discipline";};
49  void end() override;
50 private:
51  void construct();
52  void updateReward();
53  std::shared_ptr<DomainModel> model;
54  Mdp::MdpModel *mdpModel{nullptr};
55  unsigned int previousDeadlineMisses{0};
56  unsigned int currentDeadlineMisses{0};
57  std::shared_ptr<Mdp::MdpConfiguration> mdpConf; /*FIXME*/
58 };
59 
60 
61 }
62 #endif
TriggeringEvent
Definition: eventType.h:16
This class implements the ready queue and the wait queue. Those queues contain processes ready to run...
Definition: queue.h:28
The main class of the MDP framework.
Definition: mdpModel.h:35
Definition: action.h:18
std::string getName()
returns the name of that discipline
Definition: rlDiscipline.h:48
def deadlineMisses(reportsFolder, configFilename, reportFilename, runningTime)
Definition: shortReport.py:36