-
Notifications
You must be signed in to change notification settings - Fork 9
/
run_all.sh
executable file
·64 lines (46 loc) · 1.53 KB
/
run_all.sh
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
#!/bin/bash
echo "You probably don't want to run this script, unless you're regenerating all benchmarks. See https://github.com/Urban-Analytics-Technology-Platform/od2net/blob/main/docs/tutorial_examples.md if you're trying to run one example.";
exit 1
function run_example {
echo "Running example ${1}"
cd $1
# Clean up everything from previous runs
rm -rf input/ intermediate/ output/
# Create input data
python3 setup.py
# Run the pipeline
cargo run --release -- config.json --output-metadata
# Host example output
rclone copyto output/rnet.pmtiles cloudflare:od2net/output/$1.pmtiles
cd ..
}
# A special case with two cost functions. Maybe generalize.
function run_liverpool_example {
echo "Running example liverpool"
cd liverpool
# Clean up everything from previous runs
rm -rf input/ intermediate/ output/
# Create input data
python3 setup.py
# Run the pipeline for the first case and host example output
cargo run --release -- config_direct.json --output-metadata
rclone copyto output/rnet.pmtiles cloudflare:od2net/output/liverpool_direct.pmtiles
# Rerun for the other cost function
rm -rf intermediate/ output/
cargo run --release -- config_quiet.json --output-metadata
rclone copyto output/rnet.pmtiles cloudflare:od2net/output/liverpool_quiet.pmtiles
cd ..
}
set -e
set -x
# Small ones
run_example york
run_liverpool_example
# Moderate
run_example edinburgh
run_example london
run_example lisbon
# Huge
run_example england_2011_home_to_work
run_example seattle
python3 summarize_results.py */output/metadata.json