-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSEPS_States_Plot.py
21 lines (21 loc) · 3.12 KB
/
SEPS_States_Plot.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import numpy as np
import matplotlib.pyplot as plt
x = np.linspace(0,25,25)
sac_states=[[0.7621238116657905, 5.281581818717286, 2.7377083513118916, 0.0, 0.037185331795093646, 0.0, 0],[3.0163747309998525, 12.721705548915194, 0.24541631460744817, 0.0, 1.1871411797319014, 0, 0],[1.9447836208701679, 4.537473880409535, 1.2566483383917255, 0.0, 1.347262452523901, 0, 0],[0.13743173340697035, 0.12578023946307984, 1.691321719725334, 0.0, 0.1523474733660699, 0, 0],[1.8786814354475263, 14.958926488325325, 1.3069836196189755, 0.0, 0.5748687840764666, 0, 0],[1.4928763143456103, 13.591302674952505, 1.0332101753356815, 0.0, 0.5191437094978928, 0, 0],[2.33168445908707, 4.2974035994049355, 0.45087974151176136, 0.0, 1.9016070263497313, 0, 0],[3.1967691103889697, 13.607580403736378, 1.4165327716303442, 0.0, 0.8473087455998494, 0, 0],[0.3077053530966787, 10.804972545515104, 0.9546397236541018, 0.0, 0.06121458468570995, 0, 0],[0.5905288081376343, 2.794060284893178, 0.25736014485803005, 0.0, 0.8753380926727365, 0, 0],[2.173042663580955, 6.3327407338155, 1.0546711421986457, 0.0, 0.9996662181867781, 0, 0],[2.589026680769977, 10.66997735599331, 1.853774295126722, 0.0, 0.32846454842640904, 0, 0],[3.145404086588319, 3.097686679758304, 0.30230076940817363, 0.0, 1.5978581801181908, 0, 0],[1.1176816620682763, 15.03875637077624, 1.0883388523347903, 0.0, 0.36249909151544313, 0, 0],[4.330621156872968, 14.15628214417476, 1.4104602179470007, 0.0, 0.3136881775162863, 0, 0],[0.7729213929653274, 12.74901576709547, 1.3624168808460277, 0.0, 1.4899741150133794, 0.3306211568729678, 0],[4.643697528513679, 12.218622894405243, 1.7109862535448719, 0.0, 1.4177966228423222, 0, 0],[1.1987101016506445, 6.304227562751548, 0.7620324418772655, 0.0, 0.7758069070054519, 0.017399248339185713, 1],[3.15679024874489, 1.5764487828284723, 1.7116096330577306, 0.0, 1.065617874438357, 0, 0],[5.362843979078903, 0.16137520828805366, 1.4937540439342238, 0.0, 0.48605982580328644, 0, 0],[4.044593823363861, 15.065691433925346, 1.9459620020582267, 0.0, 1.3236746698065867, 0.21796475716270436, 1],[0.459810997211614, 11.65939207757294, 1.172063011566856, 0.0, 1.4815393121525182, 0.2625585805265658, 0],[4.569636934438373, 0.8210014456697972, 1.6182153681968863, 0.0, 1.386244884822596, 0, 0],[4.260838006941495, 13.723990194867408, 1.3230061849130539, 0.0, 1.1996443365048708, 0.0, 1],[1.7349277591776147, 9.154994569423483, 0.7024012009329859, 0.0, 0.7159589136693745, 0.26083800694149506, 0]]
sac_states=np.transpose(np.asarray(sac_states))
plt.plot(x, sac_states[0], color='palevioletred', label='W_t')
plt.plot(x, sac_states[1], color='lightsalmon', label='PS_t')
plt.plot(x, sac_states[2], color='gold', label='R_t')
plt.plot(x, sac_states[3], color='lightsteelblue', label='H_t')
plt.plot(x, sac_states[4], color='cadetblue', label='WS_t')
plt.plot(x, sac_states[5], color='lightblue', label='EP_t')
plt.xticks(np.arange(min(x), max(x)+1, 2.0))
ax = plt.axes()
ax.set_xlim(left=0,right=24)
ax.set_ylim(bottom=0,top=21)
ax.legend(loc='upper left')
plt.title("SEPS Scheduler agent states at t=15")
plt.xlabel("Episodes")
plt.ylabel("States")
plt.savefig("./plots/SAC_States_plot.jpg",dpi=300)
plt.close()