6
6
7
7
# ## Imports and Data loading
8
8
9
- # In[3 ]:
9
+ # In[1 ]:
10
10
11
11
12
12
# Display plots inline
17
17
get_ipython ().run_line_magic ('autoreload' , '2' )
18
18
19
19
20
- # In[13 ]:
20
+ # In[2 ]:
21
21
22
22
23
23
from datetime import datetime
29
29
from evsim .data import load
30
30
31
31
32
- # In[14 ]:
32
+ # In[3 ]:
33
33
34
34
35
35
pd .set_option ('display.float_format' , '{:.4f}' .format )
@@ -47,7 +47,7 @@ def read_results(path):
47
47
48
48
# ## Regular Profit
49
49
50
- # In[15 ]:
50
+ # In[4 ]:
51
51
52
52
53
53
df_car2go = pd .read_pickle ("../data/processed/trips_big.pkl" )
@@ -59,7 +59,7 @@ def read_results(path):
59
59
60
60
# ## Charging Stations
61
61
62
- # In[17 ]:
62
+ # In[5 ]:
63
63
64
64
65
65
df_c = df_car2go .loc [df_car2go ["end_charging" ] == 1 , ["end_lat" , "end_lon" ]].round (3 )
@@ -69,7 +69,7 @@ def read_results(path):
69
69
70
70
# # Baseline Charging
71
71
72
- # In[11 ]:
72
+ # In[6 ]:
73
73
74
74
75
75
df = read_results ("../results/baseline.csv" )
@@ -80,7 +80,7 @@ def read_results(path):
80
80
81
81
# ## Benchmark
82
82
83
- # In[4 ]:
83
+ # In[7 ]:
84
84
85
85
86
86
df_i = read_results ("../results/intraday-benchmark.csv" )
@@ -89,7 +89,7 @@ def read_results(path):
89
89
90
90
# ## Risk Averse (r=0.3, acc=90)
91
91
92
- # In[5 ]:
92
+ # In[8 ]:
93
93
94
94
95
95
df_i = read_results ("../results/intraday-risk-averse.csv" )
@@ -100,7 +100,7 @@ def read_results(path):
100
100
101
101
# ## Benchmark
102
102
103
- # In[6 ]:
103
+ # In[9 ]:
104
104
105
105
106
106
df_b = read_results ("../results/balancing-benchmark.csv" )
@@ -109,7 +109,7 @@ def read_results(path):
109
109
110
110
# ## Risk Averse (r=0.5, acc=70)
111
111
112
- # In[7 ]:
112
+ # In[10 ]:
113
113
114
114
115
115
df_b = read_results ("../results/balancing-risk-averse.csv" )
@@ -118,25 +118,32 @@ def read_results(path):
118
118
119
119
# # Integrated
120
120
121
- # In[21 ]:
121
+ # In[33 ]:
122
122
123
123
124
124
df_in = read_results ("../results/integrated-benchmark-acc-1.csv" )
125
125
df_in .sum ()/ 1000
126
126
127
127
128
+ # In[43]:
129
+
130
+
131
+ df_in = read_results ("../results/integrated-rl-1.csv" )
132
+ df_in .sum ()/ 1000
133
+
134
+
128
135
# ## Risk Averse (r=0.5,0.3, acc=70,90)
129
136
130
- # In[20 ]:
137
+ # In[17 ]:
131
138
132
139
133
140
df_in = read_results ("../results/integrated-risk-averse.csv" )
134
- df_in . sum () / 1000
141
+ len ( df_in )
135
142
136
143
137
144
# ## Risk Seeking (r=0.2,0.00, acc=70,90)
138
145
139
- # In[9 ]:
146
+ # In[32 ]:
140
147
141
148
142
149
df_in = read_results ("../results/integrated-risk-seeking.csv" )
@@ -147,7 +154,7 @@ def read_results(path):
147
154
148
155
# ## Style
149
156
150
- # In[9 ]:
157
+ # In[14 ]:
151
158
152
159
153
160
sns .set (rc = {'figure.figsize' :(10 ,6 )})
@@ -166,7 +173,7 @@ def read_results(path):
166
173
167
174
# ## Fleet Utilization
168
175
169
- # In[10 ]:
176
+ # In[42 ]:
170
177
171
178
172
179
df_stats = read_results ("../results/stats-baseline.csv" )
@@ -181,11 +188,11 @@ def labels(y):
181
188
182
189
Y = ["available_evs" , "charging_evs" , "vpp_evs" ]
183
190
for y in Y :
184
- ax = sns .lineplot (x = "hour" , y = y , ci = "sd" , data = df_stats , label = labels (y ))
191
+ ax = sns .lineplot (x = "hour" , y = y , ci = "sd" , markers = [ 'X' ], data = df_stats , label = labels (y ))
185
192
186
193
sns .despine (offset = 10 )
187
194
ax .set (xlabel = 'Hour' , ylabel = 'Number EVs' )
188
- plt .xticks (np .arange (0 , 24 , 2 ));
195
+ plt .xticks (np .arange (0 , 24 , 2 ), rotation = 90 );
189
196
plt .yticks (np .arange (0 , 500 , 50 ));
190
197
plt .savefig ("../results/fig/fleet-utilization.png" )
191
198
0 commit comments