-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot_result.py
More file actions
44 lines (42 loc) · 1.87 KB
/
Copy pathplot_result.py
File metadata and controls
44 lines (42 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
def plot_queues(queue_status, time_log):
plt.style.use('seaborn')
plt.subplot(5,1,1)
plt.step(time_log, queue_status['m1'])
plt.yticks(list(range(max(queue_status['m1']))))
plt.title('Q status of Machine A')
plt.grid(True)
plt.subplot(5,2,3)
plt.step(time_log , queue_status['m2']['p1'])
plt.yticks(list(range(max(queue_status['m2']['p1']))))
plt.title('Q status of Machine B for part 1')
plt.grid(True)
plt.subplot(5,2,4)
plt.step(time_log , queue_status['m2']['p2'])
plt.yticks(list(range(0,max(queue_status['m2']['p2'])+1,2)))
plt.title('Q status of Machine B for part 2')
plt.grid(True)
plt.subplot(5,1,3)
plt.step(time_log , [queue_status['m2']['p1'][i]+queue_status['m2']['p2'][i] for i in range(len(queue_status['m2']['p2']))])
plt.yticks(list(range(0,max([queue_status['m2']['p1'][i]+queue_status['m2']['p2'][i] for i in range(len(queue_status['m2']['p2']))])+1,2)))
plt.title('Q status of Machine B for both parts')
plt.grid(True)
plt.subplot(5,2,7)
plt.step(time_log , queue_status['m3']['p1'])
plt.yticks(list(range(max(queue_status['m3']['p1']))))
plt.title('Q status of Machine C for part 1')
plt.grid(True)
plt.subplot(5,2,8)
plt.step(time_log , queue_status['m3']['p2'])
plt.yticks(list(range(0,max(queue_status['m3']['p2'])+1,2)))
plt.title('Q status of Machine C for part 2')
plt.grid(True)
plt.subplot(5,1,5)
plt.step(time_log , [queue_status['m3']['p1'][i]+queue_status['m3']['p2'][i] for i in range(len(queue_status['m3']['p2']))])
plt.yticks(list(range(0,max([queue_status['m3']['p1'][i]+queue_status['m3']['p2'][i] for i in range(len(queue_status['m3']['p2']))])+1,2)))
plt.title('Q status of Machine C for both parts')
plt.grid(True)
plt.tight_layout(pad=0.5)
plt.show()