-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_example_lyon.sh
72 lines (61 loc) · 2.66 KB
/
run_example_lyon.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
65
66
67
68
69
70
71
72
set -e
## Prepare
cd /home/ubuntu/irtx-jsprit
mkdir /home/ubuntu/irtx-jsprit/output
## Create environment
conda create -f environment.yml -n jsprit
## Activate environment
conda activate jsprit
## Prepare perimeter
python3 prepare_perimeter.py \
--input-path /home/ubuntu/irtx-jsprit/data/perimeter_lyon.gpkg \
--output-path /home/ubuntu/irtx-jsprit/output/perimeter_lyon.poly
## Cut OSM data
sh prepare_osm.sh \
/home/ubuntu/irtx-jsprit/input/rhone-alpes-latest.osm.pbf \
/home/ubuntu/irtx-jsprit/output/perimeter_lyon.poly \
/home/ubuntu/irtx-jsprit/output/scenario_lyon.osm.pbf
## Prepare scenarios
python3 prepare_scenario.py \
--scenario-path /home/ubuntu/irtx-jsprit/data/template_lyon.json \
--output-path /home/ubuntu/irtx-jsprit/output/scenario_baseline_2022.json \
--operator-path /home/ubuntu/irtx-jsprit/data/rexel_lyon.json \
--operator-path /home/ubuntu/irtx-parcels-jsprit-connector/output/laposte_2022.json \
--shipment-type:rexel pickup \
--shipment-type:laposte delivery \
--consolidation-type:rexel none \
--consolidation-type:laposte none \
--driver-salary:rexel 0.0
python3 prepare_scenario.py \
--scenario-path /home/ubuntu/irtx-jsprit/data/template_lyon.json \
--output-path /home/ubuntu/irtx-jsprit/output/scenario_ucc_2022.json \
--operator-path /home/ubuntu/irtx-jsprit/data/rexel_lyon.json \
--operator-path /home/ubuntu/irtx-parcels-jsprit-connector/output/laposte_2022.json \
--shipment-type:rexel delivery \
--shipment-type:laposte none \
--consolidation-type:rexel delivery \
--consolidation-type:laposte delivery
python3 prepare_scenario.py \
--scenario-path /home/ubuntu/irtx-jsprit/data/template_lyon.json \
--output-path /home/ubuntu/irtx-jsprit/output/scenario_ucc_2030.json \
--operator-path /home/ubuntu/irtx-jsprit/data/rexel_lyon.json \
--operator-path /home/ubuntu/irtx-parcels-jsprit-connector/output/laposte_2030.json \
--shipment-type:rexel delivery \
--shipment-type:laposte none \
--consolidation-type:rexel delivery \
--consolidation-type:laposte delivery
## Build JSprit
cd /home/ubuntu/irtx-jsprit/java
mvn package
cd /home/ubuntu/irtx-jsprit
## Run verification
java -cp /home/ubuntu/irtx-jsprit/java/target/lead-jsprit-1.0.0.jar fr.irtx.lead.jsprit.RunVerification
## Run scenarios
for scenario in baseline_2022 ucc_2022 ucc_2030; do
java -cp /home/ubuntu/irtx-jsprit/java/target/lead-jsprit-1.0.0.jar fr.irtx.lead.jsprit.RunSolver \
--problem-path /home/ubuntu/irtx-jsprit/output/scenario_${scenario}.json \
--solution-path /home/ubuntu/irtx-jsprit/output/solution_${scenario}.json \
--crs EPSG:2154 \
--osm-path /home/ubuntu/irtx-jsprit/output/scenario.osm.pbf \
--threads 12
done