-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
373 lines (260 loc) · 26.4 KB
/
Makefile
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
DATA_DIR=data
CACHE_DIR ?=cache
RESULTS_DIR=results
DATASET ?=switzerland
GRAPH_PROVIDER ?=osm
CHARGING_PROVIDER ?=tesla
CHARGING_PENALTY ?=60
GRAPH_TYPE ?=unexpanded
CAPACITY ?=16000
HOST ?=$(shell hostname)
THREADS ?=1
PREFIX_CMD=$(if $(DEBUG), gdb --ex "r" --args)
SEED ?=1337
NUM_RUNS ?=1
NUM_QUERIES ?=100
X_EPS ?=0.1
Y_EPS ?=1
SAMPLE_RATE ?=10
MAX_TIME ?=infinity
POSTFIX ?=
BUILD_DIR ?=./build
POTENTIAL ?=lazy_omega
$(info **********************************)
$(info *** DATASET is [${DATASET}])
$(info *** GRAPH_PROVIDER is [${GRAPH_PROVIDER}])
$(info *** CHARGING_PROVIDER is [${CHARGING_PROVIDER}])
$(info *** GRAPH_TYPE is [${GRAPH_TYPE}])
$(info *** CAPACITY is [${CAPACITY}] Wh)
$(info *** CHARGING_PENALTY is [${CHARGING_PENALTY}] s)
$(info *** THREADS is [${THREADS}])
$(info *** NUM_RUNS is [${NUM_RUNS}])
$(info *** NUM_QUERIES is [${NUM_QUERIES}])
$(info *** X_EPS is [${X_EPS}])
$(info *** Y_EPS is [${Y_EPS}])
$(info *** SAMPLE_RATE is [${SAMPLE_RATE}])
$(info *** SEED is [${SEED}])
$(info *** POTENTIAL is [${POTENTIAL}])
$(info **********************************)
DATA_BASE=$(DATA_DIR)/graphs/$(DATASET)
SRTM_BASE=$(DATA_DIR)/srtm
RESULTS_BASE=$(RESULTS_DIR)/$(HOST)/$(GRAPH_PROVIDER)_$(CHARGING_PROVIDER)/$(DATASET)/$(GRAPH_TYPE)
OSM_NETWORK=$(DATA_BASE).osm.pbf
CACHE_BASE=$(CACHE_DIR)/$(GRAPH_PROVIDER)_$(CHARGING_PROVIDER)/$(DATASET)/$(GRAPH_TYPE)
BASE_GRAPH=$(CACHE_BASE)/first_out $(CACHE_BASE)/head $(CACHE_BASE)/weight $(CACHE_BASE)/coordinates
CHARGERS=$(CACHE_BASE)/charger
UNEXPANDED_CACHE_BASE=$(CACHE_DIR)/$(GRAPH_PROVIDER)_$(CHARGING_PROVIDER)/$(DATASET)/unexpanded
UNEXPANDED_BASE_GRAPH=$(UNEXPANDED_CACHE_BASE)/first_out $(UNEXPANDED_CACHE_BASE)/head $(UNEXPANDED_CACHE_BASE)/weight $(UNEXPANDED_CACHE_BASE)/coordinates
UNEXPANDED_OSM_CACHE_BASE=$(CACHE_DIR)/osm_$(CHARGING_PROVIDER)/$(DATASET)/unexpanded
UNEXPANDED_OSM_BASE_GRAPH=$(UNEXPANDED_OSM_CACHE_BASE)/first_out $(UNEXPANDED_OSM_CACHE_BASE)/head $(UNEXPANDED_OSM_CACHE_BASE)/weight $(UNEXPANDED_OSM_CACHE_BASE)/coordinates
UNEXPANDED_TESLA_CACHE_BASE=$(CACHE_DIR)/$(GRAPH_PROVIDER)_tesla/$(DATASET)/unexpanded
UNEXPANDED_TESLA_BASE_GRAPH=$(UNEXPANDED_TESLA_CACHE_BASE)/first_out $(UNEXPANDED_TESLA_CACHE_BASE)/head $(UNEXPANDED_TESLA_CACHE_BASE)/weight $(UNEXPANDED_TESLA_CACHE_BASE)/coordinates
EXPANDED_CACHE_BASE=$(CACHE_DIR)/$(GRAPH_PROVIDER)_$(CHARGING_PROVIDER)/$(DATASET)/expanded
.PHONY: clean experiments run verify
all: graph zero_turn_graph static_turn_graph max_turn_graph avg_consumption_turn_graph avg_consumption_turn_graph
# Data
graph: $(UNEXPANDED_BASE_GRAPH) $(UNEXPANDED_CACHE_BASE)/charger
zero_turn_graph: $(EXPANDED_CACHE_BASE)/zero/first_out $(EXPANDED_CACHE_BASE)/zero/charger
static_turn_graph: $(EXPANDED_CACHE_BASE)/static/first_out $(EXPANDED_CACHE_BASE)/static/charger
max_turn_graph: $(EXPANDED_CACHE_BASE)/max/first_out $(EXPANDED_CACHE_BASE)/max/charger
avg_consumption_turn_graph: $(EXPANDED_CACHE_BASE)/avg_consumption/first_out $(EXPANDED_CACHE_BASE)/avg_consumption/charger
avg_consumption_static_turn_graph: $(EXPANDED_CACHE_BASE)/avg_consumption_static/first_out $(EXPANDED_CACHE_BASE)/avg_consumption_static/charger
$(DATA_DIR)/tesla_charger.geojson:
./scripts/tesla_download.py > $@
$(UNEXPANDED_OSM_BASE_GRAPH): $(BUILD_DIR)/osm2graph
mkdir -p $(UNEXPANDED_OSM_CACHE_BASE)
$(PREFIX_CMD) $(BUILD_DIR)/osm2graph $(DATA_BASE) $(SRTM_BASE) $(UNEXPANDED_OSM_CACHE_BASE)
$(UNEXPANDED_TESLA_CACHE_BASE)/charger: $(DATA_DIR)/tesla_charger.geojson $(UNEXPANDED_BASE_GRAPH)
mkdir -p $(UNEXPANDED_TESLA_CACHE_BASE)
$(PREFIX_CMD) $(BUILD_DIR)/geojson2charger $< $(UNEXPANDED_TESLA_CACHE_BASE) $(UNEXPANDED_TESLA_CACHE_BASE)
$(EXPANDED_TESLA_CACHE_BASE)/%/charger: $(DATA_DIR)/tesla_charger.geojson $(EXPANDED_CACHE_BASE)/%/first_out
mkdir -p $(EXPANDED_TESLA_CACHE_BASE)/$*
$(PREFIX_CMD) $(BUILD_DIR)/geojson2charger $< $(EXPANDED_TESLA_CACHE_BASE)/$* $(EXPANDED_TESLA_CACHE_BASE)/$*
$(EXPANDED_CACHE_BASE)/%/first_out\
$(EXPANDED_CACHE_BASE)/%/head\
$(EXPANDED_CACHE_BASE)/%/weight\
$(EXPANDED_CACHE_BASE)/%/heights\
$(EXPANDED_CACHE_BASE)/%/coordinates: $(UNEXPANDED_BASE_GRAPH) $(BUILD_DIR)/graph2turngraph
mkdir -p $(EXPANDED_CACHE_BASE)/$*
$(PREFIX_CMD) $(BUILD_DIR)/graph2turngraph $* $(UNEXPANDED_CACHE_BASE) $(EXPANDED_CACHE_BASE)/$*
# Queries
$(CACHE_BASE)/random_$(NUM_QUERIES).csv: $(BASE_GRAPH) $(CHARGERS) $(BUILD_DIR)/generate_queries
$(PREFIX_CMD) $(BUILD_DIR)/generate_queries random $(SEED) $(NUM_QUERIES) $(THREADS) $(CACHE_BASE) $(CAPACITY) $@
$(CACHE_BASE)/random_in_range_%wh_$(NUM_QUERIES).csv: $(BASE_GRAPH) $(CHARGERS) $(BUILD_DIR)/generate_queries
$(PREFIX_CMD) $(BUILD_DIR)/generate_queries random_in_range $(SEED) $(NUM_QUERIES) $(THREADS) $(CACHE_BASE) $* $@
$(CACHE_BASE)/random_in_charger_range_%wh_$(NUM_QUERIES).csv: $(BASE_GRAPH) $(CHARGERS) $(BUILD_DIR)/generate_queries
$(PREFIX_CMD) $(BUILD_DIR)/generate_queries random_in_charger_range $(SEED) $(NUM_QUERIES) $(THREADS) $(CACHE_BASE) $* $@
$(CACHE_BASE)/rank_in_charger_range_%wh_$(NUM_QUERIES).csv: $(BASE_GRAPH) $(CHARGERS) $(BUILD_DIR)/generate_queries
$(PREFIX_CMD) $(BUILD_DIR)/generate_queries rank_in_charger_range $(SEED) $(NUM_QUERIES) $(THREADS) $(CACHE_BASE) $* $@
$(CACHE_BASE)/random_in_charger_range_%wh_$(NUM_QUERIES)_ranks.csv: $(CACHE_BASE)/random_in_charger_range_%wh_$(NUM_QUERIES).csv $(BUILD_DIR)/generate_ranks
$(PREFIX_CMD) $(BUILD_DIR)/generate_ranks $(THREADS) $(CACHE_BASE) $< $@
ranks: $(CACHE_BASE)/random_in_charger_range_$(CAPACITY)wh_$(NUM_QUERIES)_ranks.csv
.PRECIOUS: $(CACHE_BASE)/random_in_charger_range_%wh_$(NUM_QUERIES).csv \
$(CACHE_BASE)/random_in_charger_range_%wh_$(NUM_QUERIES)_ranks.csv \
$(CACHE_BASE)/rank_in_charger_range_%wh_$(NUM_QUERIES).csv \
$(CACHE_BASE)/random_in_range_%wh_$(NUM_QUERIES).csv \
$(CACHE_BASE)/random_$(NUM_QUERIES).csv
# Experiments
$(RESULTS_BASE)/random_in_range_%wh_dijkstra$(POSTFIX): $(CACHE_BASE)/random_in_range_%wh_$(NUM_QUERIES).csv $(BASE_GRAPH) $(BUILD_DIR)/dijkstra_experiment
mkdir -p $(RESULTS_BASE)
$(PREFIX_CMD) $(BUILD_DIR)/dijkstra_experiment $(CACHE_BASE)/random_in_range_$*wh_$(NUM_QUERIES).csv $(NUM_RUNS) $(THREADS) $@ $(CACHE_BASE)
# Battery Range
$(RESULTS_BASE)/random_in_range_%wh_mc_dijkstra_fastest_$(X_EPS)_$(Y_EPS)$(POSTFIX): $(CACHE_BASE)/random_in_range_%wh_$(NUM_QUERIES).csv $(BASE_GRAPH) $(BUILD_DIR)/mc_dijkstra_experiment $(X_EPS) $(Y_EPS)
mkdir -p $(RESULTS_BASE)
$(PREFIX_CMD) $(BUILD_DIR)/mc_dijkstra_experiment $(CACHE_BASE)/random_in_range_$*wh_$(NUM_QUERIES).csv $(NUM_RUNS) $(THREADS) $@ $(CACHE_BASE) $* 10 $(X_EPS) $(Y_EPS)
$(RESULTS_BASE)/random_in_range_%wh_mcc_dijkstra_fastest_$(X_EPS)_$(Y_EPS)$(POSTFIX): $(CACHE_BASE)/random_in_range_%wh_$(NUM_QUERIES).csv $(BASE_GRAPH) $(CHARGERS) $(BUILD_DIR)/mcc_dijkstra_experiment
mkdir -p $(RESULTS_BASE)
$(PREFIX_CMD) $(BUILD_DIR)/mcc_dijkstra_experiment $(CACHE_BASE)/random_in_range_$*wh_$(NUM_QUERIES).csv $(NUM_RUNS) $(THREADS) $@ $(CACHE_BASE) $* fastest 10 $(X_EPS) $(Y_EPS) $(SAMPLE_RATE) $(MAX_TIME)
$(RESULTS_BASE)/random_in_range_%wh_fp_dijkstra_fastest_$(X_EPS)_$(Y_EPS)$(POSTFIX): $(CACHE_BASE)/random_in_range_%wh_$(NUM_QUERIES).csv $(BASE_GRAPH) $(BUILD_DIR)/fp_dijkstra_experiment
mkdir -p $(RESULTS_BASE)
$(PREFIX_CMD) $(BUILD_DIR)/fp_dijkstra_experiment $(CACHE_BASE)/random_in_range_$*wh_$(NUM_QUERIES).csv $(NUM_RUNS) $(THREADS) $@ $(CACHE_BASE) $* fastest $(X_EPS) $(Y_EPS)
$(RESULTS_BASE)/random_in_range_%wh_fpc_dijkstra_fastest_$(X_EPS)_$(Y_EPS)$(POSTFIX): $(CACHE_BASE)/random_in_range_%wh_$(NUM_QUERIES).csv $(BASE_GRAPH) $(CHARGERS) $(BUILD_DIR)/fpc_dijkstra_experiment
mkdir -p $(RESULTS_BASE)
$(PREFIX_CMD) $(BUILD_DIR)/fpc_dijkstra_experiment $(CACHE_BASE)/random_in_range_$*wh_$(NUM_QUERIES).csv $(NUM_RUNS) $(THREADS) $@ $(CACHE_BASE) $* fastest $(X_EPS) $(Y_EPS) $(CHARGING_PENALTY) none $(MAX_TIME)
$(RESULTS_BASE)/random_in_range_%wh_fpc_dijkstra_omega_$(X_EPS)_$(Y_EPS)$(POSTFIX): $(CACHE_BASE)/random_in_range_%wh_$(NUM_QUERIES).csv $(BASE_GRAPH) $(CHARGERS) $(BUILD_DIR)/fpc_dijkstra_experiment
mkdir -p $(RESULTS_BASE)
$(PREFIX_CMD) $(BUILD_DIR)/fpc_dijkstra_experiment $(CACHE_BASE)/random_in_range_$*wh_$(NUM_QUERIES).csv $(NUM_RUNS) $(THREADS) $@ $(CACHE_BASE) $* omega $(X_EPS) $(Y_EPS) $(CHARGING_PENALTY) none $(MAX_TIME)
# Charger Range
$(RESULTS_BASE)/random_in_charger_range_%wh_dijkstra$(POSTFIX): $(CACHE_BASE)/random_in_charger_range_%wh_$(NUM_QUERIES).csv $(BASE_GRAPH) $(BUILD_DIR)/dijkstra_experiment
mkdir -p $(RESULTS_BASE)
$(PREFIX_CMD) $(BUILD_DIR)/dijkstra_experiment $(CACHE_BASE)/random_in_charger_range_$*wh_$(NUM_QUERIES).csv $(NUM_RUNS) $(THREADS) $@ $(CACHE_BASE)
$(RESULTS_BASE)/random_in_charger_range_%wh_mcc_dijkstra_fastest_$(X_EPS)_$(Y_EPS)_$(SAMPLE_RATE)$(POSTFIX): $(CACHE_BASE)/random_in_charger_range_%wh_$(NUM_QUERIES).csv $(BASE_GRAPH) $(CHARGERS) $(BUILD_DIR)/mcc_dijkstra_experiment
mkdir -p $(RESULTS_BASE)
$(PREFIX_CMD) $(BUILD_DIR)/mcc_dijkstra_experiment $(CACHE_BASE)/random_in_charger_range_$*wh_$(NUM_QUERIES).csv $(NUM_RUNS) $(THREADS) $@ $(CACHE_BASE) $* fastest 10 $(X_EPS) $(Y_EPS) $(SAMPLE_RATE) $(MAX_TIME)
$(RESULTS_BASE)/random_in_charger_range_%wh_mcc_dijkstra_lazy_fastest_$(X_EPS)_$(Y_EPS)_$(SAMPLE_RATE)$(POSTFIX): $(CACHE_BASE)/random_in_charger_range_%wh_$(NUM_QUERIES).csv $(BASE_GRAPH) $(CHARGERS) $(BUILD_DIR)/mcc_dijkstra_experiment
mkdir -p $(RESULTS_BASE)
$(PREFIX_CMD) $(BUILD_DIR)/mcc_dijkstra_experiment $(CACHE_BASE)/random_in_charger_range_$*wh_$(NUM_QUERIES).csv $(NUM_RUNS) $(THREADS) $@ $(CACHE_BASE) $* lazy_fastest 10 $(X_EPS) $(Y_EPS) $(SAMPLE_RATE) $(MAX_TIME)
$(RESULTS_BASE)/random_in_charger_range_%wh_fpc_dijkstra_fastest_$(X_EPS)_$(Y_EPS)$(POSTFIX): $(CACHE_BASE)/random_in_charger_range_%wh_$(NUM_QUERIES).csv $(BASE_GRAPH) $(CHARGERS) $(BUILD_DIR)/fpc_dijkstra_experiment
mkdir -p $(RESULTS_BASE)
$(PREFIX_CMD) $(BUILD_DIR)/fpc_dijkstra_experiment $(CACHE_BASE)/random_in_charger_range_$*wh_$(NUM_QUERIES).csv $(NUM_RUNS) $(THREADS) $@ $(CACHE_BASE) $* fastest $(X_EPS) $(Y_EPS) $(CHARGING_PENALTY) none $(MAX_TIME)
$(RESULTS_BASE)/random_in_charger_range_%wh_fpc_dijkstra_omega_$(X_EPS)_$(Y_EPS)$(POSTFIX): $(CACHE_BASE)/random_in_charger_range_%wh_$(NUM_QUERIES).csv $(BASE_GRAPH) $(CHARGERS) $(BUILD_DIR)/fpc_dijkstra_experiment
mkdir -p $(RESULTS_BASE)
$(PREFIX_CMD) $(BUILD_DIR)/fpc_dijkstra_experiment $(CACHE_BASE)/random_in_charger_range_$*wh_$(NUM_QUERIES).csv $(NUM_RUNS) $(THREADS) $@ $(CACHE_BASE) $* omega $(X_EPS) $(Y_EPS) $(CHARGING_PENALTY) none $(MAX_TIME)
$(RESULTS_BASE)/random_in_charger_range_%wh_fpc_dijkstra_lazy_omega_$(X_EPS)_$(Y_EPS)$(POSTFIX): $(CACHE_BASE)/random_in_charger_range_%wh_$(NUM_QUERIES).csv $(BASE_GRAPH) $(CHARGERS) $(BUILD_DIR)/fpc_dijkstra_experiment
mkdir -p $(RESULTS_BASE)
$(PREFIX_CMD) $(BUILD_DIR)/fpc_dijkstra_experiment $(CACHE_BASE)/random_in_charger_range_$*wh_$(NUM_QUERIES).csv $(NUM_RUNS) $(THREADS) $@ $(CACHE_BASE) $* lazy_omega $(X_EPS) $(Y_EPS) $(CHARGING_PENALTY) none $(MAX_TIME)
$(RESULTS_BASE)/random_in_charger_range_%wh_fpc_dijkstra_lazy_fastest_$(X_EPS)_$(Y_EPS)$(POSTFIX): $(CACHE_BASE)/random_in_charger_range_%wh_$(NUM_QUERIES).csv $(BASE_GRAPH) $(CHARGERS) $(BUILD_DIR)/fpc_dijkstra_experiment
mkdir -p $(RESULTS_BASE)
$(PREFIX_CMD) $(BUILD_DIR)/fpc_dijkstra_experiment $(CACHE_BASE)/random_in_charger_range_$*wh_$(NUM_QUERIES).csv $(NUM_RUNS) $(THREADS) $@ $(CACHE_BASE) $* lazy_fastest $(X_EPS) $(Y_EPS) $(CHARGING_PENALTY) none $(MAX_TIME)
$(RESULTS_BASE)/random_in_charger_range_%wh_fpc_dijkstra_none_$(X_EPS)_$(Y_EPS)$(POSTFIX): $(CACHE_BASE)/random_in_charger_range_%wh_$(NUM_QUERIES).csv $(BASE_GRAPH) $(CHARGERS) $(BUILD_DIR)/fpc_dijkstra_experiment
mkdir -p $(RESULTS_BASE)
$(PREFIX_CMD) $(BUILD_DIR)/fpc_dijkstra_experiment $(CACHE_BASE)/random_in_charger_range_$*wh_$(NUM_QUERIES).csv $(NUM_RUNS) $(THREADS) $@ $(CACHE_BASE) $* none $(X_EPS) $(Y_EPS) $(CHARGING_PENALTY) none $(MAX_TIME)
# Rank
$(RESULTS_BASE)/rank_in_charger_range_%wh_mcc_dijkstra_fastest_$(X_EPS)_$(Y_EPS)_$(SAMPLE_RATE)$(POSTFIX): $(CACHE_BASE)/rank_in_charger_range_%wh_$(NUM_QUERIES).csv $(BASE_GRAPH) $(CHARGERS) $(BUILD_DIR)/mcc_dijkstra_experiment
mkdir -p $(RESULTS_BASE)
$(PREFIX_CMD) $(BUILD_DIR)/mcc_dijkstra_experiment $(CACHE_BASE)/rank_in_charger_range_$*wh_$(NUM_QUERIES).csv $(NUM_RUNS) $(THREADS) $@ $(CACHE_BASE) $* fastest 10 $(X_EPS) $(Y_EPS) $(SAMPLE_RATE) $(MAX_TIME)
$(RESULTS_BASE)/rank_in_charger_range_%wh_mcc_dijkstra_lazy_fastest_$(X_EPS)_$(Y_EPS)_$(SAMPLE_RATE)$(POSTFIX): $(CACHE_BASE)/rank_in_charger_range_%wh_$(NUM_QUERIES).csv $(BASE_GRAPH) $(CHARGERS) $(BUILD_DIR)/mcc_dijkstra_experiment
mkdir -p $(RESULTS_BASE)
$(PREFIX_CMD) $(BUILD_DIR)/mcc_dijkstra_experiment $(CACHE_BASE)/rank_in_charger_range_$*wh_$(NUM_QUERIES).csv $(NUM_RUNS) $(THREADS) $@ $(CACHE_BASE) $* lazy_fastest 10 $(X_EPS) $(Y_EPS) $(SAMPLE_RATE) $(MAX_TIME)
$(RESULTS_BASE)/rank_in_charger_range_%wh_fpc_dijkstra_fastest_$(X_EPS)_$(Y_EPS)$(POSTFIX): $(CACHE_BASE)/rank_in_charger_range_%wh_$(NUM_QUERIES).csv $(BASE_GRAPH) $(CHARGERS) $(BUILD_DIR)/fpc_dijkstra_experiment
mkdir -p $(RESULTS_BASE)
$(PREFIX_CMD) $(BUILD_DIR)/fpc_dijkstra_experiment $(CACHE_BASE)/rank_in_charger_range_$*wh_$(NUM_QUERIES).csv $(NUM_RUNS) $(THREADS) $@ $(CACHE_BASE) $* fastest $(X_EPS) $(Y_EPS) $(CHARGING_PENALTY) none $(MAX_TIME)
$(RESULTS_BASE)/rank_in_charger_range_%wh_fpc_dijkstra_omega_$(X_EPS)_$(Y_EPS)$(POSTFIX): $(CACHE_BASE)/rank_in_charger_range_%wh_$(NUM_QUERIES).csv $(BASE_GRAPH) $(CHARGERS) $(BUILD_DIR)/fpc_dijkstra_experiment
mkdir -p $(RESULTS_BASE)
$(PREFIX_CMD) $(BUILD_DIR)/fpc_dijkstra_experiment $(CACHE_BASE)/rank_in_charger_range_$*wh_$(NUM_QUERIES).csv $(NUM_RUNS) $(THREADS) $@ $(CACHE_BASE) $* omega $(X_EPS) $(Y_EPS) $(CHARGING_PENALTY) none $(MAX_TIME)
$(RESULTS_BASE)/rank_in_charger_range_%wh_fpc_dijkstra_lazy_omega_$(X_EPS)_$(Y_EPS)$(POSTFIX): $(CACHE_BASE)/rank_in_charger_range_%wh_$(NUM_QUERIES).csv $(BASE_GRAPH) $(CHARGERS) $(BUILD_DIR)/fpc_dijkstra_experiment
mkdir -p $(RESULTS_BASE)
$(PREFIX_CMD) $(BUILD_DIR)/fpc_dijkstra_experiment $(CACHE_BASE)/rank_in_charger_range_$*wh_$(NUM_QUERIES).csv $(NUM_RUNS) $(THREADS) $@ $(CACHE_BASE) $* lazy_omega $(X_EPS) $(Y_EPS) $(CHARGING_PENALTY) none $(MAX_TIME)
$(RESULTS_BASE)/rank_in_charger_range_%wh_fpc_dijkstra_lazy_fastest_$(X_EPS)_$(Y_EPS)$(POSTFIX): $(CACHE_BASE)/rank_in_charger_range_%wh_$(NUM_QUERIES).csv $(BASE_GRAPH) $(CHARGERS) $(BUILD_DIR)/fpc_dijkstra_experiment
mkdir -p $(RESULTS_BASE)
$(PREFIX_CMD) $(BUILD_DIR)/fpc_dijkstra_experiment $(CACHE_BASE)/rank_in_charger_range_$*wh_$(NUM_QUERIES).csv $(NUM_RUNS) $(THREADS) $@ $(CACHE_BASE) $* lazy_fastest $(X_EPS) $(Y_EPS) $(CHARGING_PENALTY) none $(MAX_TIME)
$(RESULTS_BASE)/rank_in_charger_range_%wh_fpc_dijkstra_none_$(X_EPS)_$(Y_EPS)$(POSTFIX): $(CACHE_BASE)/rank_in_charger_range_%wh_$(NUM_QUERIES).csv $(BASE_GRAPH) $(CHARGERS) $(BUILD_DIR)/fpc_dijkstra_experiment
mkdir -p $(RESULTS_BASE)
$(PREFIX_CMD) $(BUILD_DIR)/fpc_dijkstra_experiment $(CACHE_BASE)/rank_in_charger_range_$*wh_$(NUM_QUERIES).csv $(NUM_RUNS) $(THREADS) $@ $(CACHE_BASE) $* none $(X_EPS) $(Y_EPS) $(CHARGING_PENALTY) none $(MAX_TIME)
# Heuristic Experiments
$(RESULTS_BASE)/random_in_charger_range_%wh_fpc_dijkstra_$(POTENTIAL)_$(X_EPS)_$(Y_EPS)_linear$(POSTFIX): $(CACHE_BASE)/random_in_charger_range_%wh_$(NUM_QUERIES).csv $(BASE_GRAPH) $(CHARGERS) $(BUILD_DIR)/fpc_dijkstra_experiment
mkdir -p $(RESULTS_BASE)
$(PREFIX_CMD) $(BUILD_DIR)/fpc_dijkstra_experiment $(CACHE_BASE)/random_in_charger_range_$*wh_$(NUM_QUERIES).csv $(NUM_RUNS) $(THREADS) $@ $(CACHE_BASE) $* $(POTENTIAL) $(X_EPS) $(Y_EPS) $(CHARGING_PENALTY) linear $(MAX_TIME)
$(RESULTS_BASE)/random_in_charger_range_%wh_fpc_dijkstra_$(POTENTIAL)_$(X_EPS)_$(Y_EPS)_min_rate$(POSTFIX): $(CACHE_BASE)/random_in_charger_range_%wh_$(NUM_QUERIES).csv $(BASE_GRAPH) $(CHARGERS) $(BUILD_DIR)/fpc_dijkstra_experiment
mkdir -p $(RESULTS_BASE)
$(PREFIX_CMD) $(BUILD_DIR)/fpc_dijkstra_experiment $(CACHE_BASE)/random_in_charger_range_$*wh_$(NUM_QUERIES).csv $(NUM_RUNS) $(THREADS) $@ $(CACHE_BASE) $* $(POTENTIAL) $(X_EPS) $(Y_EPS) $(CHARGING_PENALTY) min_rate $(MAX_TIME)
$(RESULTS_BASE)/random_in_charger_range_%wh_fpc_dijkstra_$(POTENTIAL)_$(X_EPS)_$(Y_EPS)_fast$(POSTFIX): $(CACHE_BASE)/random_in_charger_range_%wh_$(NUM_QUERIES).csv $(BASE_GRAPH) $(CHARGERS) $(BUILD_DIR)/fpc_dijkstra_experiment
mkdir -p $(RESULTS_BASE)
$(PREFIX_CMD) $(BUILD_DIR)/fpc_dijkstra_experiment $(CACHE_BASE)/random_in_charger_range_$*wh_$(NUM_QUERIES).csv $(NUM_RUNS) $(THREADS) $@ $(CACHE_BASE) $* $(POTENTIAL) $(X_EPS) $(Y_EPS) $(CHARGING_PENALTY) only_fast $(MAX_TIME)
$(RESULTS_BASE)/random_in_charger_range_%wh_fpc_dijkstra_$(POTENTIAL)_$(X_EPS)_$(Y_EPS)_no_super_charger$(POSTFIX): $(CACHE_BASE)/random_in_charger_range_%wh_$(NUM_QUERIES).csv $(BASE_GRAPH) $(CHARGERS) $(BUILD_DIR)/fpc_dijkstra_experiment
mkdir -p $(RESULTS_BASE)
$(PREFIX_CMD) $(BUILD_DIR)/fpc_dijkstra_experiment $(CACHE_BASE)/random_in_charger_range_$*wh_$(NUM_QUERIES).csv $(NUM_RUNS) $(THREADS) $@ $(CACHE_BASE) $* $(POTENTIAL) $(X_EPS) $(Y_EPS) $(CHARGING_PENALTY) no_super_charger $(MAX_TIME)
$(RESULTS_BASE)/random_in_charger_range_%wh_fpc_dijkstra_$(POTENTIAL)_$(X_EPS)_$(Y_EPS)_no_slow_charger$(POSTFIX): $(CACHE_BASE)/random_in_charger_range_%wh_$(NUM_QUERIES).csv $(BASE_GRAPH) $(CHARGERS) $(BUILD_DIR)/fpc_dijkstra_experiment
mkdir -p $(RESULTS_BASE)
$(PREFIX_CMD) $(BUILD_DIR)/fpc_dijkstra_experiment $(CACHE_BASE)/random_in_charger_range_$*wh_$(NUM_QUERIES).csv $(NUM_RUNS) $(THREADS) $@ $(CACHE_BASE) $* $(POTENTIAL) $(X_EPS) $(Y_EPS) $(CHARGING_PENALTY) no_slow_charger $(MAX_TIME)
$(RESULTS_BASE)/rank_in_charger_range_%wh_fpc_dijkstra_$(POTENTIAL)_$(X_EPS)_$(Y_EPS)_linear$(POSTFIX): $(CACHE_BASE)/rank_in_charger_range_%wh_$(NUM_QUERIES).csv $(BASE_GRAPH) $(CHARGERS) $(BUILD_DIR)/fpc_dijkstra_experiment
mkdir -p $(RESULTS_BASE)
$(PREFIX_CMD) $(BUILD_DIR)/fpc_dijkstra_experiment $(CACHE_BASE)/rank_in_charger_range_$*wh_$(NUM_QUERIES).csv $(NUM_RUNS) $(THREADS) $@ $(CACHE_BASE) $* $(POTENTIAL) $(X_EPS) $(Y_EPS) $(CHARGING_PENALTY) linear $(MAX_TIME)
$(RESULTS_BASE)/rank_in_charger_range_%wh_fpc_dijkstra_$(POTENTIAL)_$(X_EPS)_$(Y_EPS)_min_rate$(POSTFIX): $(CACHE_BASE)/rank_in_charger_range_%wh_$(NUM_QUERIES).csv $(BASE_GRAPH) $(CHARGERS) $(BUILD_DIR)/fpc_dijkstra_experiment
mkdir -p $(RESULTS_BASE)
$(PREFIX_CMD) $(BUILD_DIR)/fpc_dijkstra_experiment $(CACHE_BASE)/rank_in_charger_range_$*wh_$(NUM_QUERIES).csv $(NUM_RUNS) $(THREADS) $@ $(CACHE_BASE) $* $(POTENTIAL) $(X_EPS) $(Y_EPS) $(CHARGING_PENALTY) min_rate $(MAX_TIME)
$(RESULTS_BASE)/rank_in_charger_range_%wh_fpc_dijkstra_$(POTENTIAL)_$(X_EPS)_$(Y_EPS)_fast$(POSTFIX): $(CACHE_BASE)/rank_in_charger_range_%wh_$(NUM_QUERIES).csv $(BASE_GRAPH) $(CHARGERS) $(BUILD_DIR)/fpc_dijkstra_experiment
mkdir -p $(RESULTS_BASE)
$(PREFIX_CMD) $(BUILD_DIR)/fpc_dijkstra_experiment $(CACHE_BASE)/rank_in_charger_range_$*wh_$(NUM_QUERIES).csv $(NUM_RUNS) $(THREADS) $@ $(CACHE_BASE) $* $(POTENTIAL) $(X_EPS) $(Y_EPS) $(CHARGING_PENALTY) only_fast $(MAX_TIME)
$(RESULTS_BASE)/rank_in_charger_range_%wh_fpc_dijkstra_$(POTENTIAL)_$(X_EPS)_$(Y_EPS)_no_super_charger$(POSTFIX): $(CACHE_BASE)/rank_in_charger_range_%wh_$(NUM_QUERIES).csv $(BASE_GRAPH) $(CHARGERS) $(BUILD_DIR)/fpc_dijkstra_experiment
mkdir -p $(RESULTS_BASE)
$(PREFIX_CMD) $(BUILD_DIR)/fpc_dijkstra_experiment $(CACHE_BASE)/rank_in_charger_range_$*wh_$(NUM_QUERIES).csv $(NUM_RUNS) $(THREADS) $@ $(CACHE_BASE) $* $(POTENTIAL) $(X_EPS) $(Y_EPS) $(CHARGING_PENALTY) no_super_charger $(MAX_TIME)
$(RESULTS_BASE)/rank_in_charger_range_%wh_fpc_dijkstra_$(POTENTIAL)_$(X_EPS)_$(Y_EPS)_no_slow_charger$(POSTFIX): $(CACHE_BASE)/rank_in_charger_range_%wh_$(NUM_QUERIES).csv $(BASE_GRAPH) $(CHARGERS) $(BUILD_DIR)/fpc_dijkstra_experiment
mkdir -p $(RESULTS_BASE)
$(PREFIX_CMD) $(BUILD_DIR)/fpc_dijkstra_experiment $(CACHE_BASE)/rank_in_charger_range_$*wh_$(NUM_QUERIES).csv $(NUM_RUNS) $(THREADS) $@ $(CACHE_BASE) $* $(POTENTIAL) $(X_EPS) $(Y_EPS) $(CHARGING_PENALTY) no_slow_charger $(MAX_TIME)
$(RESULTS_BASE)/rank_in_charger_range_%wh_fpc_dijkstra_$(POTENTIAL)_$(X_EPS)_$(Y_EPS)_no_slow_charger_min_rate$(POSTFIX): $(CACHE_BASE)/rank_in_charger_range_%wh_$(NUM_QUERIES).csv $(BASE_GRAPH) $(CHARGERS) $(BUILD_DIR)/fpc_dijkstra_experiment
mkdir -p $(RESULTS_BASE)
$(PREFIX_CMD) $(BUILD_DIR)/fpc_dijkstra_experiment $(CACHE_BASE)/rank_in_charger_range_$*wh_$(NUM_QUERIES).csv $(NUM_RUNS) $(THREADS) $@ $(CACHE_BASE) $* $(POTENTIAL) $(X_EPS) $(Y_EPS) $(CHARGING_PENALTY) no_slow_charger_min_rate $(MAX_TIME)
# Experiment aliases
range_dijkstra_experiments: $(RESULTS_BASE)/random_in_range_$(CAPACITY)wh_dijkstra$(POSTFIX)
range_mc_experiments: $(RESULTS_BASE)/random_in_range_$(CAPACITY)wh_mc_dijkstra_fastest_$(X_EPS)_$(Y_EPS)$(POSTFIX)
range_mcc_experiments: $(RESULTS_BASE)/random_in_range_$(CAPACITY)wh_mcc_dijkstra_fastest_$(X_EPS)_$(Y_EPS)$(POSTFIX)
range_fp_experiments: $(RESULTS_BASE)/random_in_range_$(CAPACITY)wh_fp_dijkstra_fastest_$(X_EPS)_$(Y_EPS)$(POSTFIX)
range_fpc_experiments: $(RESULTS_BASE)/random_in_range_$(CAPACITY)wh_fpc_dijkstra_fastest_$(X_EPS)_$(Y_EPS)$(POSTFIX)
charger_range_dijkstra_experiments: $(RESULTS_BASE)/random_in_charger_range_$(CAPACITY)wh_dijkstra
charger_range_mcc_fastest_experiments: $(RESULTS_BASE)/random_in_charger_range_$(CAPACITY)wh_mcc_dijkstra_fastest_$(X_EPS)_$(Y_EPS)_$(SAMPLE_RATE)
charger_range_mcc_lazy_fastest_experiments: $(RESULTS_BASE)/random_in_charger_range_$(CAPACITY)wh_mcc_dijkstra_lazy_fastest_$(X_EPS)_$(Y_EPS)_$(SAMPLE_RATE)
charger_range_fpc_fastest_experiments: $(RESULTS_BASE)/random_in_charger_range_$(CAPACITY)wh_fpc_dijkstra_fastest_$(X_EPS)_$(Y_EPS)
charger_range_fpc_omega_experiments: $(RESULTS_BASE)/random_in_charger_range_$(CAPACITY)wh_fpc_dijkstra_omega_$(X_EPS)_$(Y_EPS)$(POSTFIX)
charger_range_fpc_lazy_fastest_experiments: $(RESULTS_BASE)/random_in_charger_range_$(CAPACITY)wh_fpc_dijkstra_lazy_fastest_$(X_EPS)_$(Y_EPS)$(POSTFIX)
charger_range_fpc_lazy_omega_experiments: $(RESULTS_BASE)/random_in_charger_range_$(CAPACITY)wh_fpc_dijkstra_lazy_omega_$(X_EPS)_$(Y_EPS)$(POSTFIX)
charger_range_fpc_none_experiments: $(RESULTS_BASE)/random_in_charger_range_$(CAPACITY)wh_fpc_dijkstra_none_$(X_EPS)_$(Y_EPS)$(POSTFIX)
charger_range_fpc_linear_experiments: $(RESULTS_BASE)/random_in_charger_range_$(CAPACITY)wh_fpc_dijkstra_$(POTENTIAL)_$(X_EPS)_$(Y_EPS)_linear$(POSTFIX)
charger_range_fpc_min_rate_experiments: $(RESULTS_BASE)/random_in_charger_range_$(CAPACITY)wh_fpc_dijkstra_$(POTENTIAL)_$(X_EPS)_$(Y_EPS)_min_rate$(POSTFIX)
charger_range_fpc_fast_experiments: $(RESULTS_BASE)/random_in_charger_range_$(CAPACITY)wh_fpc_dijkstra_$(POTENTIAL)_$(X_EPS)_$(Y_EPS)_fast$(POSTFIX)
charger_range_fpc_no_super_charger_experiments: $(RESULTS_BASE)/random_in_charger_range_$(CAPACITY)wh_fpc_dijkstra_$(POTENTIAL)_$(X_EPS)_$(Y_EPS)_no_super_charger$(POSTFIX)
charger_range_fpc_no_slow_charger_experiments: $(RESULTS_BASE)/random_in_charger_range_$(CAPACITY)wh_fpc_dijkstra_$(POTENTIAL)_$(X_EPS)_$(Y_EPS)_no_slow_charger$(POSTFIX)
rank_fpc_linear_experiments: $(RESULTS_BASE)/rank_in_charger_range_$(CAPACITY)wh_fpc_dijkstra_$(POTENTIAL)_$(X_EPS)_$(Y_EPS)_linear$(POSTFIX)
rank_fpc_min_rate_experiments: $(RESULTS_BASE)/rank_in_charger_range_$(CAPACITY)wh_fpc_dijkstra_$(POTENTIAL)_$(X_EPS)_$(Y_EPS)_min_rate$(POSTFIX)
rank_fpc_fast_experiments: $(RESULTS_BASE)/rank_in_charger_range_$(CAPACITY)wh_fpc_dijkstra_$(POTENTIAL)_$(X_EPS)_$(Y_EPS)_fast$(POSTFIX)
rank_fpc_no_slow_charger_experiments: $(RESULTS_BASE)/rank_in_charger_range_$(CAPACITY)wh_fpc_dijkstra_$(POTENTIAL)_$(X_EPS)_$(Y_EPS)_no_slow_charger$(POSTFIX)
rank_fpc_no_slow_charger_min_rate_experiments: $(RESULTS_BASE)/rank_in_charger_range_$(CAPACITY)wh_fpc_dijkstra_$(POTENTIAL)_$(X_EPS)_$(Y_EPS)_no_slow_charger_min_rate$(POSTFIX)
rank_fpc_no_super_charger_experiments: $(RESULTS_BASE)/rank_in_charger_range_$(CAPACITY)wh_fpc_dijkstra_$(POTENTIAL)_$(X_EPS)_$(Y_EPS)_no_super_charger$(POSTFIX)
rank_mcc_fastest_experiments: $(RESULTS_BASE)/rank_in_charger_range_$(CAPACITY)wh_mcc_dijkstra_fastest_$(X_EPS)_$(Y_EPS)_$(SAMPLE_RATE)$(POSTFIX)
rank_mcc_lazy_fastest_experiments: $(RESULTS_BASE)/rank_in_charger_range_$(CAPACITY)wh_mcc_dijkstra_lazy_fastest_$(X_EPS)_$(Y_EPS)_$(SAMPLE_RATE)$(POSTFIX)
rank_fpc_fastest_experiments: $(RESULTS_BASE)/rank_in_charger_range_$(CAPACITY)wh_fpc_dijkstra_fastest_$(X_EPS)_$(Y_EPS)$(POSTFIX)
rank_fpc_none_experiments: $(RESULTS_BASE)/rank_in_charger_range_$(CAPACITY)wh_fpc_dijkstra_none_$(X_EPS)_$(Y_EPS)$(POSTFIX)
rank_fpc_omega_experiments: $(RESULTS_BASE)/rank_in_charger_range_$(CAPACITY)wh_fpc_dijkstra_omega_$(X_EPS)_$(Y_EPS)$(POSTFIX)
rank_fpc_lazy_fastest_experiments: $(RESULTS_BASE)/rank_in_charger_range_$(CAPACITY)wh_fpc_dijkstra_lazy_fastest_$(X_EPS)_$(Y_EPS)$(POSTFIX)
rank_fpc_lazy_omega_experiments: $(RESULTS_BASE)/rank_in_charger_range_$(CAPACITY)wh_fpc_dijkstra_lazy_omega_$(X_EPS)_$(Y_EPS)$(POSTFIX)
all_dijkstra_experiments: range_dijkstra_experiments
all_mc_experiments: range_mc_experiments
all_mcc_experiments: range_mcc_experiments charger_range_mcc_fastest_experiments rank_mcc_fastest_experiments
all_fp_experiments: range_fp_experiments
all_fpc_experiments: range_fpc_experiments \
charger_range_fpc_fastest_experiments \
charger_range_fpc_omega_experiments \
charger_range_fpc_linear_experiments \
charger_range_fpc_fastest_experiments \
charger_range_fpc_fast_experiments \
rank_fpc_fastest_experiments \
rank_fpc_omega_experiments \
rank_fpc_linear_experiments \
rank_fpc_fastest_experiments \
rank_fpc_fast_experiments
experiments: all_dijkstra_experiments all_fp_experiments all_mcc_experiments all_mc_experiments all_fpc_experiments
# Emperical verification by comparing the results of different algorithms
verify_fp:
./test/is_better.py $(RESULTS_BASE)/random_in_range_$(CAPACITY)wh_fp_dijkstra_fastest_0.1_1.json $(RESULTS_BASE)/random_in_range_$(CAPACITY)wh_mc_dijkstra_0.1_1.json
verify_fpc:
./test/is_better.py $(RESULTS_BASE)/random_in_charger_range_$(CAPACITY)wh_fpc_dijkstra_omega_0.1_1.json $(RESULTS_BASE)/random_in_charger_range_$(CAPACITY)wh_fpc_dijkstra_fastest_0.1_1.json
./test/is_better.py $(RESULTS_BASE)/random_in_charger_range_$(CAPACITY)wh_fpc_dijkstra_fastest_0.1_1.json $(RESULTS_BASE)/random_in_charger_range_$(CAPACITY)wh_mcc_dijkstra_fastest_0.1_1.json
./test/is_better.py $(RESULTS_BASE)/random_in_charger_range_$(CAPACITY)wh_fpc_dijkstra_omega_0.1_1.json $(RESULTS_BASE)/random_in_charger_range_$(CAPACITY)wh_mcc_dijkstra_fastest_0.1_1.json
verify_mcc:
./test/is_better.py $(RESULTS_BASE)/random_in_range_$(CAPACITY)wh_mcc_dijkstra_fastest_0.1_1.json $(RESULTS_BASE)/random_in_range_$(CAPACITY)wh_mc_dijkstra_fastest_0.1_1.json
verify: verify_fp verify_mcc verify_fpc
run: $(BASE_GRAPH) $(CHARGERS)
$(PREFIX_CMD) $(BUILD_DIR)/routed $(CACHE_BASE) $(CAPACITY)
clean:
rm -f $(BASE_GRAPH)
rm -f $(CHARGERS)