Scheduler
bothTemp.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 import matplotlib
3 import matplotlib.pyplot as plt
4 import sys
5 
6 filename1 = "rmsTempProfile"
7 filename2 = "rlTempProfile"
8 
9 
10 with open(filename1) as f:
11  time1 = []
12  temp1 = []
13  for line in f:
14  entry = line.split(":")
15  time1.append(float(entry[0]))
16  temp1.append(float(entry[1]))
17 with open(filename2) as f:
18  time2 = []
19  temp2 = []
20  for line in f:
21  entry = line.split(":")
22  time2.append(float(entry[0]))
23  temp2.append(float(entry[1]))
24 
25 matplotlib.rcParams.update({'font.size': 22})
26 plt.plot(time1, temp1, 'r', linewidth=3, linestyle='dashed', label="rate-monotonic scheduling")
27 plt.plot(time2, temp2, 'b', linewidth=2, label="reinforcement learning")
28 plt.legend(loc='lower right')
29 plt.xlabel("time")
30 plt.ylabel("temperature (Celsius)")
31 plt.show()