Minwei Kong commited on
Commit
ae8f934
·
verified ·
1 Parent(s): 37ccd8b

Clear old FrontierOR files 1-900 of 5583

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +0 -156
  2. README.md +0 -91
  3. adulyasak2015/feasibility_check.py +0 -683
  4. adulyasak2015/gurobi_code.py +0 -366
  5. adulyasak2015/gurobi_feasi_result/large_feasi_result_1.json +0 -6
  6. adulyasak2015/gurobi_feasi_result/large_feasi_result_2.json +0 -6
  7. adulyasak2015/gurobi_feasi_result/large_feasi_result_3.json +0 -6
  8. adulyasak2015/gurobi_feasi_result/large_feasi_result_4.json +0 -6
  9. adulyasak2015/gurobi_feasi_result/large_feasi_result_5.json +0 -6
  10. adulyasak2015/gurobi_feasi_result/tiny_feasi_result.json +0 -6
  11. adulyasak2015/gurobi_solution/large_solution_1.json +0 -45
  12. adulyasak2015/gurobi_solution/large_solution_2.json +0 -15
  13. adulyasak2015/gurobi_solution/large_solution_3.json +0 -15
  14. adulyasak2015/gurobi_solution/large_solution_4.json +0 -15
  15. adulyasak2015/gurobi_solution/large_solution_5.json +0 -15
  16. adulyasak2015/gurobi_solution/tiny_solution.json +0 -44
  17. adulyasak2015/gurobi_solution_log/tiny_log.jsonl +0 -4
  18. adulyasak2015/instance/large_instance_1.json +0 -0
  19. adulyasak2015/instance/large_instance_2.json +0 -0
  20. adulyasak2015/instance/large_instance_3.json +0 -0
  21. adulyasak2015/instance/large_instance_4.json +0 -0
  22. adulyasak2015/instance/large_instance_5.json +0 -0
  23. adulyasak2015/instance/tiny_instance.json +0 -2954
  24. adulyasak2015/instance_schema.json +0 -21
  25. adulyasak2015/mathematical_formulation.md +0 -109
  26. adulyasak2015/problem_description.txt +0 -9
  27. adulyasak2015/solution_logger.py +0 -61
  28. adulyasak2015/solution_schema.json +0 -6
  29. alba2013/feasibility_check.py +0 -466
  30. alba2013/gurobi_code.py +0 -988
  31. alba2013/gurobi_feasi_result/large_feasi_result_1.json +0 -6
  32. alba2013/gurobi_feasi_result/large_feasi_result_2.json +0 -6
  33. alba2013/gurobi_feasi_result/large_feasi_result_3.json +0 -6
  34. alba2013/gurobi_feasi_result/large_feasi_result_4.json +0 -6
  35. alba2013/gurobi_feasi_result/large_feasi_result_5.json +0 -6
  36. alba2013/gurobi_feasi_result/tiny_feasi_result.json +0 -6
  37. alba2013/gurobi_solution/large_solution_1.json +0 -56
  38. alba2013/gurobi_solution/large_solution_2.json +0 -56
  39. alba2013/gurobi_solution/large_solution_3.json +0 -56
  40. alba2013/gurobi_solution/large_solution_4.json +0 -56
  41. alba2013/gurobi_solution/large_solution_5.json +0 -56
  42. alba2013/gurobi_solution/tiny_solution.json +0 -32
  43. alba2013/gurobi_solution_log/large_log_1.jsonl +0 -1
  44. alba2013/gurobi_solution_log/large_log_2.jsonl +0 -1
  45. alba2013/gurobi_solution_log/large_log_3.jsonl +0 -1
  46. alba2013/gurobi_solution_log/large_log_4.jsonl +0 -1
  47. alba2013/gurobi_solution_log/large_log_5.jsonl +0 -1
  48. alba2013/gurobi_solution_log/tiny_log.jsonl +0 -1
  49. alba2013/instance/large_instance_1.json +0 -1331
  50. alba2013/instance/large_instance_2.json +0 -1332
.gitattributes DELETED
@@ -1,156 +0,0 @@
1
- # Large binary / data files go through Git LFS.
2
- # Code, schemas, descriptions and the meta CSV stay as normal git blobs
3
- # so they are diffable and previewable on the Hub.
4
-
5
- instance/** filter=lfs diff=lfs merge=lfs -text
6
- gurobi_solution/** filter=lfs diff=lfs merge=lfs -text
7
- gurobi_solution_log/** filter=lfs diff=lfs merge=lfs -text
8
- gurobi_feasi_result/** filter=lfs diff=lfs merge=lfs -text
9
-
10
- *.zip filter=lfs diff=lfs merge=lfs -text
11
- *.tar filter=lfs diff=lfs merge=lfs -text
12
- *.tar.gz filter=lfs diff=lfs merge=lfs -text
13
- *.npz filter=lfs diff=lfs merge=lfs -text
14
- *.parquet filter=lfs diff=lfs merge=lfs -text
15
- yang2013/instance/large_instance_3.json filter=lfs diff=lfs merge=lfs -text
16
- yang2013/instance/large_instance_2.json filter=lfs diff=lfs merge=lfs -text
17
- wangy2020/instance/large_instance_1.json filter=lfs diff=lfs merge=lfs -text
18
- yang2013/instance/large_instance_5.json filter=lfs diff=lfs merge=lfs -text
19
- yang2013/instance/large_instance_4.json filter=lfs diff=lfs merge=lfs -text
20
- wangy2020/instance/large_instance_4.json filter=lfs diff=lfs merge=lfs -text
21
- wangy2020/instance/large_instance_2.json filter=lfs diff=lfs merge=lfs -text
22
- wangy2020/instance/large_instance_3.json filter=lfs diff=lfs merge=lfs -text
23
- wu2022/instance/large_instance_1.json filter=lfs diff=lfs merge=lfs -text
24
- sansegundo2023/instance/large_instance_31.json.pre_shrink_20260518_n3333 filter=lfs diff=lfs merge=lfs -text
25
- sansegundo2023/instance/large_instance_51.json.pre_shrink_20260518_n3333 filter=lfs diff=lfs merge=lfs -text
26
- sansegundo2023/instance/large_instance_41.json.pre_shrink_20260518_n3333 filter=lfs diff=lfs merge=lfs -text
27
- sansegundo2023/instance/large_instance_11.json.pre_shrink_20260518_n3333 filter=lfs diff=lfs merge=lfs -text
28
- castro2021/gurobi_solution/large_solution_4.json filter=lfs diff=lfs merge=lfs -text
29
- wangk2020/instance/large_instance_1.json filter=lfs diff=lfs merge=lfs -text
30
- wangk2020/instance/large_instance_4.json filter=lfs diff=lfs merge=lfs -text
31
- wangk2020/instance/large_instance_3.json filter=lfs diff=lfs merge=lfs -text
32
- wangk2020/instance/large_instance_2.json filter=lfs diff=lfs merge=lfs -text
33
- wangk2020/instance/large_instance_5.json filter=lfs diff=lfs merge=lfs -text
34
- wangk2020/gurobi_solution/large_solution_1.json filter=lfs diff=lfs merge=lfs -text
35
- martello1999/gurobi_solution/large_solution_3.json filter=lfs diff=lfs merge=lfs -text
36
- martello1999/gurobi_solution/large_solution_2.json filter=lfs diff=lfs merge=lfs -text
37
- martello1999/gurobi_solution/large_solution_4.json filter=lfs diff=lfs merge=lfs -text
38
- klose2005/instance/large_instance_1.json filter=lfs diff=lfs merge=lfs -text
39
- klose2005/instance/large_instance_4.json filter=lfs diff=lfs merge=lfs -text
40
- martello1999/gurobi_solution/large_solution_1.json filter=lfs diff=lfs merge=lfs -text
41
- wangk2020/gurobi_solution/large_solution_5.json filter=lfs diff=lfs merge=lfs -text
42
- wangk2020/gurobi_solution/large_solution_3.json filter=lfs diff=lfs merge=lfs -text
43
- wangk2020/gurobi_solution/large_solution_4.json filter=lfs diff=lfs merge=lfs -text
44
- wangk2020/gurobi_solution/large_solution_2.json filter=lfs diff=lfs merge=lfs -text
45
- wu2022/instance/large_instance_5.json filter=lfs diff=lfs merge=lfs -text
46
- wu2022/instance/large_instance_4.json filter=lfs diff=lfs merge=lfs -text
47
- klose2005/instance/large_instance_2.json filter=lfs diff=lfs merge=lfs -text
48
- martello1999/gurobi_solution/large_solution_5.json filter=lfs diff=lfs merge=lfs -text
49
- klose2005/instance/large_instance_3.json filter=lfs diff=lfs merge=lfs -text
50
- klose2005/instance/large_instance_5.json filter=lfs diff=lfs merge=lfs -text
51
- wu2022/instance/large_instance_2.json filter=lfs diff=lfs merge=lfs -text
52
- wu2022/instance/large_instance_3.json filter=lfs diff=lfs merge=lfs -text
53
- sansegundo2023/instance/large_instance_21.json.pre_shrink_20260518_n3333 filter=lfs diff=lfs merge=lfs -text
54
- taninmis2022/gurobi_solution/large_solution_1.json filter=lfs diff=lfs merge=lfs -text
55
- castro2021/gurobi_solution/large_solution_1.json filter=lfs diff=lfs merge=lfs -text
56
- castro2021/gurobi_solution/large_solution_2.json filter=lfs diff=lfs merge=lfs -text
57
- kobayashi2021/instance/large_instance_1.json filter=lfs diff=lfs merge=lfs -text
58
- castro2021/gurobi_solution/large_solution_3.json filter=lfs diff=lfs merge=lfs -text
59
- pedersen2024/instance/large_instance_1.json filter=lfs diff=lfs merge=lfs -text
60
- cordeau2019/instance/large_instance_1.json filter=lfs diff=lfs merge=lfs -text
61
- cordeau2019/instance/large_instance_2.json filter=lfs diff=lfs merge=lfs -text
62
- hadjar2006/instance/large_instance_1.json filter=lfs diff=lfs merge=lfs -text
63
- cordeau2019/instance/large_instance_3.json filter=lfs diff=lfs merge=lfs -text
64
- cordeau2019/instance/large_instance_4.json filter=lfs diff=lfs merge=lfs -text
65
- hadjar2006/instance/large_instance_3.json filter=lfs diff=lfs merge=lfs -text
66
- pedersen2024/instance/large_instance_4.json filter=lfs diff=lfs merge=lfs -text
67
- hadjar2006/instance/large_instance_5.json filter=lfs diff=lfs merge=lfs -text
68
- pedersen2024/instance/large_instance_3.json filter=lfs diff=lfs merge=lfs -text
69
- pedersen2024/instance/large_instance_5.json filter=lfs diff=lfs merge=lfs -text
70
- hadjar2006/instance/large_instance_4.json filter=lfs diff=lfs merge=lfs -text
71
- pedersen2024/instance/large_instance_2.json filter=lfs diff=lfs merge=lfs -text
72
- pettersson2020/gurobi_solution/large_solution_1.json filter=lfs diff=lfs merge=lfs -text
73
- pettersson2020/gurobi_solution/large_solution_4.json filter=lfs diff=lfs merge=lfs -text
74
- pettersson2020/gurobi_solution/large_solution_3.json filter=lfs diff=lfs merge=lfs -text
75
- hewitt2024/instance/large_instance_4.json filter=lfs diff=lfs merge=lfs -text
76
- hewitt2024/instance/large_instance_5.json filter=lfs diff=lfs merge=lfs -text
77
- hewitt2024/instance/large_instance_1.json filter=lfs diff=lfs merge=lfs -text
78
- pettersson2020/gurobi_solution/large_solution_2.json filter=lfs diff=lfs merge=lfs -text
79
- pettersson2020/gurobi_solution/large_solution_5.json filter=lfs diff=lfs merge=lfs -text
80
- hewitt2024/instance/large_instance_2.json filter=lfs diff=lfs merge=lfs -text
81
- hewitt2024/instance/large_instance_3.json filter=lfs diff=lfs merge=lfs -text
82
- segundo2019b/instance/large_instance_3.json filter=lfs diff=lfs merge=lfs -text
83
- segundo2019b/instance/large_instance_4.json filter=lfs diff=lfs merge=lfs -text
84
- segundo2019b/instance/large_instance_1.json filter=lfs diff=lfs merge=lfs -text
85
- segundo2019b/instance/large_instance_2.json filter=lfs diff=lfs merge=lfs -text
86
- segundo2019b/instance/large_instance_5.json filter=lfs diff=lfs merge=lfs -text
87
- belhoul2014/gurobi_solution/large_solution_1.json filter=lfs diff=lfs merge=lfs -text
88
- belhoul2014/gurobi_solution/large_solution_2.json filter=lfs diff=lfs merge=lfs -text
89
- belhoul2014/gurobi_solution/large_solution_3.json filter=lfs diff=lfs merge=lfs -text
90
- belhoul2014/gurobi_solution/large_solution_4.json filter=lfs diff=lfs merge=lfs -text
91
- belhoul2014/gurobi_solution/large_solution_5.json filter=lfs diff=lfs merge=lfs -text
92
- pettersson2020/instance/large_instance_1.json filter=lfs diff=lfs merge=lfs -text
93
- belhoul2014/instance/large_instance_1.json filter=lfs diff=lfs merge=lfs -text
94
- pettersson2020/instance/large_instance_4.json filter=lfs diff=lfs merge=lfs -text
95
- pettersson2020/instance/large_instance_2.json filter=lfs diff=lfs merge=lfs -text
96
- pettersson2020/instance/large_instance_5.json filter=lfs diff=lfs merge=lfs -text
97
- belhoul2014/instance/large_instance_3.json filter=lfs diff=lfs merge=lfs -text
98
- belhoul2014/instance/large_instance_2.json filter=lfs diff=lfs merge=lfs -text
99
- belhoul2014/instance/large_instance_4.json filter=lfs diff=lfs merge=lfs -text
100
- belhoul2014/instance/large_instance_5.json filter=lfs diff=lfs merge=lfs -text
101
- pettersson2020/instance/large_instance_3.json filter=lfs diff=lfs merge=lfs -text
102
- damcikurt2016/gurobi_solution/large_solution_2.json filter=lfs diff=lfs merge=lfs -text
103
- damcikurt2016/gurobi_solution/large_solution_3.json filter=lfs diff=lfs merge=lfs -text
104
- damcikurt2016/gurobi_solution/large_solution_5.json filter=lfs diff=lfs merge=lfs -text
105
- segundo2019/instance/large_instance_1.json filter=lfs diff=lfs merge=lfs -text
106
- segundo2019/instance/large_instance_5.json filter=lfs diff=lfs merge=lfs -text
107
- segundo2019/instance/large_instance_2.json filter=lfs diff=lfs merge=lfs -text
108
- delorme2020/gurobi_solution/large_solution_1.json filter=lfs diff=lfs merge=lfs -text
109
- delorme2020/gurobi_solution/large_solution_4.json filter=lfs diff=lfs merge=lfs -text
110
- delorme2020/gurobi_solution/large_solution_3.json filter=lfs diff=lfs merge=lfs -text
111
- delorme2020/gurobi_solution/large_solution_5.json filter=lfs diff=lfs merge=lfs -text
112
- lozano2017/instance/large_instance_1.json filter=lfs diff=lfs merge=lfs -text
113
- lozano2017/instance/large_instance_2.json filter=lfs diff=lfs merge=lfs -text
114
- lozano2017/instance/large_instance_4.json filter=lfs diff=lfs merge=lfs -text
115
- lozano2017/instance/large_instance_3.json filter=lfs diff=lfs merge=lfs -text
116
- lozano2017/instance/large_instance_5.json filter=lfs diff=lfs merge=lfs -text
117
- damcikurt2016/instance/large_instance_1.json filter=lfs diff=lfs merge=lfs -text
118
- damcikurt2016/instance/large_instance_4.json filter=lfs diff=lfs merge=lfs -text
119
- damcikurt2016/instance/large_instance_3.json filter=lfs diff=lfs merge=lfs -text
120
- gangammanavar2020/gurobi_solution/large_solution_2.json filter=lfs diff=lfs merge=lfs -text
121
- gangammanavar2020/gurobi_solution/large_solution_3.json filter=lfs diff=lfs merge=lfs -text
122
- gangammanavar2020/gurobi_solution/large_solution_5.json filter=lfs diff=lfs merge=lfs -text
123
- damcikurt2016/instance/large_instance_2.json filter=lfs diff=lfs merge=lfs -text
124
- gangammanavar2020/gurobi_solution/large_solution_4.json filter=lfs diff=lfs merge=lfs -text
125
- damcikurt2016/instance/large_instance_5.json filter=lfs diff=lfs merge=lfs -text
126
- yang2013/instance/large_instance_1.json filter=lfs diff=lfs merge=lfs -text
127
- kobayashi2021/instance/large_instance_4.json filter=lfs diff=lfs merge=lfs -text
128
- hadjar2006/instance/large_instance_2.json filter=lfs diff=lfs merge=lfs -text
129
- kobayashi2021/instance/large_instance_2.json filter=lfs diff=lfs merge=lfs -text
130
- kobayashi2021/instance/large_instance_5.json filter=lfs diff=lfs merge=lfs -text
131
- kobayashi2021/instance/large_instance_3.json filter=lfs diff=lfs merge=lfs -text
132
- taninmis2022/gurobi_solution/large_solution_4.json filter=lfs diff=lfs merge=lfs -text
133
- taninmis2022/gurobi_solution/large_solution_5.json filter=lfs diff=lfs merge=lfs -text
134
- mansini2020/instance/large_instance_4.json filter=lfs diff=lfs merge=lfs -text
135
- mansini2020/instance/large_instance_2.json filter=lfs diff=lfs merge=lfs -text
136
- mansini2020/instance/large_instance_3.json filter=lfs diff=lfs merge=lfs -text
137
- taninmis2022/gurobi_solution/large_solution_3.json filter=lfs diff=lfs merge=lfs -text
138
- taninmis2022/gurobi_solution/large_solution_2.json filter=lfs diff=lfs merge=lfs -text
139
- martello1999/instance/large_instance_1.json filter=lfs diff=lfs merge=lfs -text
140
- mansini2020/instance/large_instance_1.json filter=lfs diff=lfs merge=lfs -text
141
- mansini2020/instance/large_instance_5.json filter=lfs diff=lfs merge=lfs -text
142
- martello1999/instance/large_instance_2.json filter=lfs diff=lfs merge=lfs -text
143
- martello1999/instance/large_instance_4.json filter=lfs diff=lfs merge=lfs -text
144
- martello1999/instance/large_instance_3.json filter=lfs diff=lfs merge=lfs -text
145
- martello1999/instance/large_instance_5.json filter=lfs diff=lfs merge=lfs -text
146
- fragkos2021/instance/large_instance_1.json filter=lfs diff=lfs merge=lfs -text
147
- castro2021/instance/large_instance_1.json filter=lfs diff=lfs merge=lfs -text
148
- castro2021/gurobi_solution/large_solution_5.json filter=lfs diff=lfs merge=lfs -text
149
- castro2021/instance/large_instance_2.json filter=lfs diff=lfs merge=lfs -text
150
- castro2021/instance/large_instance_3.json filter=lfs diff=lfs merge=lfs -text
151
- fragkos2021/instance/large_instance_4.json filter=lfs diff=lfs merge=lfs -text
152
- fragkos2021/instance/large_instance_5.json filter=lfs diff=lfs merge=lfs -text
153
- fragkos2021/instance/large_instance_3.json filter=lfs diff=lfs merge=lfs -text
154
- fragkos2021/instance/large_instance_2.json filter=lfs diff=lfs merge=lfs -text
155
- castro2021/instance/large_instance_4.json filter=lfs diff=lfs merge=lfs -text
156
- castro2021/instance/large_instance_5.json filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
README.md DELETED
@@ -1,91 +0,0 @@
1
- ---
2
- license: cc-by-4.0
3
- language:
4
- - en
5
- pretty_name: Frontier-OR Benchmark
6
- size_categories:
7
- - n<1K
8
- task_categories:
9
- - other
10
- tags:
11
- - operations-research
12
- - optimization
13
- - mixed-integer-programming
14
- - gurobi
15
- - benchmark
16
- - llm-for-or
17
- configs:
18
- - config_name: meta
19
- data_files: paper_meta_info.json
20
- ---
21
-
22
- # Frontier-OR Benchmark
23
-
24
- A benchmark of **180 literature-grounded OR tasks**, each packaged as a
25
- self-contained reproducible unit: natural-language problem description,
26
- mathematical formulation, reference Gurobi implementation, test instances,
27
- reference solutions, and an automated feasibility checker.
28
-
29
- Designed for evaluating LLMs on the end-to-end task of turning a research
30
- paper's OR problem into runnable, verifiably-correct optimization code.
31
-
32
- ## What's in each paper folder
33
-
34
- | File / dir | Purpose |
35
- | --- | --- |
36
- | `problem_description.txt` | Natural-language problem statement |
37
- | `mathematical_formulation.md` | Mathematical model (variables, constraints, objective) |
38
- | `gurobi_code.py` | Reference Gurobi implementation |
39
- | `feasibility_check.py` | Automated solution validator |
40
- | `solution_logger.py` | Utility for serializing solutions |
41
- | `instance_schema.json` | JSON schema for input instances |
42
- | `solution_schema.json` | JSON schema for solutions |
43
- | `instance/` | Test instances (JSON) |
44
- | `gurobi_solution/` | Reference solutions produced by `gurobi_code.py` |
45
- | `gurobi_solution_log/` | Anytime objective trajectory from the reference Gurobi run |
46
- | `gurobi_feasi_result/` | Output of `feasibility_check.py` on the reference solutions |
47
-
48
- <!-- ## Top-level files
49
-
50
- - `paper_meta_info.csv` / `paper_meta_info.json` — metadata for all 180 papers
51
- (problem class, formulation type, application field, average instance size, etc.). -->
52
-
53
- <!-- ## Source PDFs
54
-
55
- The original paper PDFs are **not redistributed** here because copyright belongs
56
- to the respective publishers (INFORMS, Elsevier, Springer, etc.). Use the
57
- `paper_id`, `paper_title`, `publication`, and `year` columns in
58
- `paper_meta_info.csv` to look them up via your institution. -->
59
-
60
- ## Loading the metadata
61
-
62
- ```python
63
- from datasets import load_dataset
64
- meta = load_dataset("SmartOR/FrontierOR", "meta", split="train")
65
- print(meta[0])
66
- ```
67
-
68
- For the per-paper instance / solution data, clone or download the full
69
- repository — the structure is intentionally a file tree, not a flat HF
70
- dataset, because each paper is its own reproducible package.
71
-
72
- ```bash
73
- hf download SmartOR/FrontierOR --repo-type dataset --local-dir frontier-or
74
- ```
75
-
76
- <!-- ## License
77
-
78
- Released under **CC-BY-4.0**. If you use this benchmark, please cite the
79
- accompanying paper (citation below) and respect the original publishers'
80
- copyright on the source PDFs. -->
81
-
82
- <!-- ## Citation
83
-
84
- ```bibtex
85
- @misc{frontier-or-2026,
86
- title = {Frontier-OR: A Benchmark for LLM-Based Operations Research Code Generation},
87
- author = {Kong, Minwei and others},
88
- year = {2026},
89
- url = {https://huggingface.co/datasets/SmartOR/FrontierOR}
90
- }
91
- ``` -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
adulyasak2015/feasibility_check.py DELETED
@@ -1,683 +0,0 @@
1
- #!/usr/bin/env python3
2
- """
3
- Feasibility checker for the Two-Stage Stochastic Production Routing Problem (2-SPRP).
4
- Reference: Adulyasak, Cordeau, Jans (2015), Operations Research.
5
-
6
- Checks all hard constraints from the mathematical formulation.
7
- Constraint numbering follows the paper's formulation section, counted from top to bottom:
8
- Constraint 1 = Eq.(2): Plant inventory flow balance (=)
9
- Constraint 2 = Eq.(3): Customer inventory flow balance (=)
10
- Constraint 3 = Eq.(4): Maximum inventory at plant (<=)
11
- Constraint 4 = Eq.(5): Maximum inventory at customers (<=)
12
- Constraint 5 = Eq.(6): Production capacity / setup (<=)
13
- Constraint 6 = Eq.(7): Vehicle load capacity (<=)
14
- Constraint 7 = Eq.(8): Delivery only if customer visited (<=)
15
- Constraint 8 = Eq.(9): Each customer visited at most once per period (<=)
16
- Constraint 9 = Eq.(10): Degree constraints (=)
17
- Constraint 10 = Eq.(11): Subtour elimination (<=)
18
- Constraint 11 = Eq.(12): Nonnegativity of second-stage variables (>=)
19
- Constraint 12 = Eq.(13): Binary y, z (domain)
20
- Constraint 13 = Eq.(14): Binary x for non-depot edges (domain)
21
- Constraint 14 = Eq.(15): x at depot edges in {0,1,2} (domain)
22
- Constraint 15 = Eq.(16): Customer visit requires vehicle dispatch (<=)
23
- Constraint 16 = Eq.(17): Edge implies both endpoints visited (<=)
24
- Constraint 17 = Eq.(18): Vehicle symmetry breaking (>=)
25
- Constraint 18 = Eq.(19): Lexicographic ordering of visits (>=)
26
- Constraint 19 = Eq.(20): Nonanticipativity for p (=, M-SPRP only)
27
- Constraint 20 = Eq.(21): Nonanticipativity for I (=, M-SPRP only)
28
- Constraint 21 = Eq.(22): Nonanticipativity for e (=, M-SPRP only)
29
- Constraint 22 = Eq.(23): Nonanticipativity for q (=, M-SPRP only)
30
- Constraint 23 = Objective consistency (lower-bound check on reported obj)
31
- """
32
-
33
- import argparse
34
- import json
35
- from collections import defaultdict
36
-
37
-
38
- def check_feasibility(data, sol):
39
- tol = 1e-5
40
- eps = 1e-5
41
-
42
- n = data['n']
43
- T = data['T']
44
- m = data['m']
45
- Q = data['Q']
46
- C = data['C']
47
- L = data['L']
48
- I0 = data['I0']
49
- demand_sc = data['demand_scenarios']
50
- n_omega = data['n_scenarios']
51
- problem_type = data.get('problem_type', '2-SPRP')
52
-
53
- Nc = list(range(1, n + 1))
54
- N = list(range(0, n + 1))
55
- periods = list(range(1, T + 1))
56
- vehicles = list(range(1, m + 1))
57
- scenarios = list(range(n_omega))
58
-
59
- edges = [(i, j) for i in N for j in N if i < j]
60
- edges_Nc = [(i, j) for i in Nc for j in Nc if i < j]
61
-
62
- def d(omega, i, t):
63
- return demand_sc[omega][i - 1][t - 1]
64
-
65
- def M_t_val(t, omega):
66
- rem = sum(d(omega, ci, s) for ci in Nc for s in range(t, T + 1))
67
- return min(C, Q, rem)
68
-
69
- def M_prime_val(i, t, omega):
70
- rem = sum(d(omega, i, s) for s in range(t, T + 1))
71
- return min(L[i], Q, rem)
72
-
73
- # --- Parse solution ---
74
- y = {}
75
- for key, val in sol.get('y', {}).items():
76
- y[int(key)] = val
77
- for t in periods:
78
- y.setdefault(t, 0)
79
-
80
- z = {}
81
- for key, val in sol.get('z', {}).items():
82
- parts = key.split('_')
83
- i, k, t = int(parts[0]), int(parts[1]), int(parts[2])
84
- z[i, k, t] = val
85
- for i in N:
86
- for k in vehicles:
87
- for t in periods:
88
- z.setdefault((i, k, t), 0)
89
-
90
- x = {}
91
- for key, val in sol.get('x', {}).items():
92
- parts = key.split('_')
93
- i, j, k, t = int(parts[0]), int(parts[1]), int(parts[2]), int(parts[3])
94
- x[i, j, k, t] = val
95
- for (i, j) in edges:
96
- for k in vehicles:
97
- for t in periods:
98
- x.setdefault((i, j, k, t), 0)
99
-
100
- violations_list = [] # list of (constraint_idx, message, lhs, rhs, raw_excess, normalizer, ratio)
101
- violated_set = set()
102
-
103
- def record_violation(constraint_idx, lhs, rhs, op, msg):
104
- if op == '<=':
105
- violation_amount = max(0.0, lhs - rhs)
106
- elif op == '>=':
107
- violation_amount = max(0.0, rhs - lhs)
108
- elif op == '=':
109
- violation_amount = abs(lhs - rhs)
110
- else:
111
- return
112
-
113
- if violation_amount > tol:
114
- normalizer = max(abs(rhs), eps)
115
- ratio = violation_amount / normalizer
116
- violated_set.add(constraint_idx)
117
- violations_list.append({
118
- 'constraint': constraint_idx,
119
- 'msg': msg,
120
- 'lhs': float(lhs),
121
- 'rhs': float(rhs),
122
- 'raw_excess': float(violation_amount),
123
- 'normalizer': float(normalizer),
124
- 'ratio': float(ratio),
125
- })
126
-
127
- # =====================================================================
128
- # Constraints 1-7 (Eqs. 2-8): Second-stage constraints
129
- # These involve second-stage variables (p, I, q, e) not present in the
130
- # solution. We construct feasible second-stage variables to verify.
131
- # For any first-stage (y, z, x), feasible second-stage always exists
132
- # because unmet demand variable e acts as slack.
133
- # =====================================================================
134
-
135
- # Construct feasible second-stage variables for each scenario
136
- for omega in scenarios:
137
- # Determine maximum production and delivery given first-stage decisions
138
- # Greedy: produce as much as allowed, deliver as much as possible
139
- # to minimize unmet demand (which always makes constraints feasible).
140
-
141
- # Production capacity per period
142
- p_max = {}
143
- for t in periods:
144
- p_max[t] = M_t_val(t, omega) * y[t]
145
-
146
- # Delivery capacity per customer/vehicle/period
147
- q_max = {}
148
- for i_c in Nc:
149
- for k in vehicles:
150
- for t in periods:
151
- q_max[i_c, k, t] = M_prime_val(i_c, t, omega) * z[i_c, k, t]
152
-
153
- # Vehicle load limit per vehicle/period
154
- veh_cap = {}
155
- for k in vehicles:
156
- for t in periods:
157
- veh_cap[k, t] = Q * z[0, k, t]
158
-
159
- # Forward simulation: allocate production and deliveries
160
- I_plant = {0: float(I0[0])}
161
- I_cust = {}
162
- for i_c in Nc:
163
- I_cust[i_c, 0] = float(I0[i_c])
164
-
165
- p_val = {}
166
- q_val = {}
167
- e_val = {}
168
-
169
- for t in periods:
170
- # Determine total demand and delivery needs
171
- total_need = 0.0
172
- for i_c in Nc:
173
- need = max(0.0, d(omega, i_c, t) - I_cust[i_c, t - 1])
174
- total_need += need
175
-
176
- # Production: produce up to capacity, limited by plant storage
177
- produce = min(p_max[t], total_need, L[0] - I_plant[t - 1] + total_need)
178
- produce = max(0.0, produce)
179
- p_val[t] = produce
180
-
181
- # Available at plant for delivery
182
- available = I_plant[t - 1] + produce
183
-
184
- # Allocate deliveries: respect vehicle capacity and customer visit
185
- total_delivered = 0.0
186
- for k in vehicles:
187
- veh_remaining = veh_cap[k, t]
188
- for i_c in Nc:
189
- cap = min(q_max[i_c, k, t], veh_remaining,
190
- max(0.0, available - total_delivered))
191
- # Deliver up to demand shortfall
192
- need = max(0.0, d(omega, i_c, t) - I_cust[i_c, t - 1])
193
- deliver = min(cap, need)
194
- q_val[i_c, k, t] = deliver
195
- veh_remaining -= deliver
196
- total_delivered += deliver
197
-
198
- # Update plant inventory
199
- I_plant[t] = I_plant[t - 1] + p_val[t] - total_delivered
200
-
201
- # Update customer inventories and unmet demand
202
- for i_c in Nc:
203
- delivery = sum(q_val[i_c, k, t] for k in vehicles)
204
- dem = d(omega, i_c, t)
205
- prev = I_cust[i_c, t - 1]
206
- # Balance: prev + delivery + e = dem + I_new
207
- I_cust[i_c, t] = max(0.0, prev + delivery - dem)
208
- e_val[i_c, t] = max(0.0, dem - prev - delivery)
209
-
210
- # --- Constraint 1 (Eq.2): Plant inventory balance ---
211
- lhs = I_plant[t - 1] + p_val[t]
212
- rhs = total_delivered + I_plant[t]
213
- record_violation(1, lhs, rhs, '=',
214
- f"Constraint 1 (Eq.2): Plant balance violated in period {t}, scenario {omega}: "
215
- f"LHS={lhs:.6f} != RHS={rhs:.6f}")
216
-
217
- # --- Constraint 3 (Eq.4): Plant inventory capacity ---
218
- record_violation(3, I_plant[t], float(L[0]), '<=',
219
- f"Constraint 3 (Eq.4): Plant inventory {I_plant[t]:.4f} > capacity {L[0]} "
220
- f"in period {t}, scenario {omega}")
221
-
222
- # --- Constraint 5 (Eq.6): Production capacity ---
223
- record_violation(5, p_val[t], p_max[t], '<=',
224
- f"Constraint 5 (Eq.6): Production {p_val[t]:.4f} > capacity {p_max[t]:.4f} "
225
- f"in period {t}, scenario {omega}")
226
-
227
- for i_c in Nc:
228
- delivery = sum(q_val[i_c, k, t] for k in vehicles)
229
- dem = d(omega, i_c, t)
230
-
231
- # --- Constraint 2 (Eq.3): Customer inventory balance ---
232
- lhs2 = I_cust[i_c, t - 1] + delivery + e_val[i_c, t]
233
- rhs2 = dem + I_cust[i_c, t]
234
- record_violation(2, lhs2, rhs2, '=',
235
- f"Constraint 2 (Eq.3): Customer {i_c} balance violated in period {t}, "
236
- f"scenario {omega}: LHS={lhs2:.6f} != RHS={rhs2:.6f}")
237
-
238
- # --- Constraint 4 (Eq.5): Customer inventory capacity ---
239
- record_violation(4, I_cust[i_c, t] + dem, float(L[i_c]), '<=',
240
- f"Constraint 4 (Eq.5): Customer {i_c} inventory+demand "
241
- f"{I_cust[i_c, t] + dem:.4f} > capacity {L[i_c]} "
242
- f"in period {t}, scenario {omega}")
243
-
244
- # --- Constraint 7 (Eq.8): Delivery only if visited ---
245
- for k in vehicles:
246
- mp = M_prime_val(i_c, t, omega) * z[i_c, k, t]
247
- record_violation(7, q_val[i_c, k, t], mp, '<=',
248
- f"Constraint 7 (Eq.8): Delivery to customer {i_c} by vehicle {k} "
249
- f"in period {t}, scenario {omega}: {q_val[i_c, k, t]:.4f} > {mp:.4f}")
250
-
251
- # --- Constraint 6 (Eq.7): Vehicle load capacity ---
252
- for k in vehicles:
253
- total_load = sum(q_val[i_c, k, t] for i_c in Nc)
254
- cap_rhs = Q * z[0, k, t]
255
- record_violation(6, total_load, float(cap_rhs), '<=',
256
- f"Constraint 6 (Eq.7): Vehicle {k} load {total_load:.4f} > capacity "
257
- f"{cap_rhs:.4f} in period {t}, scenario {omega}")
258
-
259
- # --- Constraint 11 (Eq.12): Nonnegativity ---
260
- for t in periods:
261
- record_violation(11, 0.0, p_val[t], '<=',
262
- f"Constraint 11 (Eq.12): p_{t} negative ({p_val[t]:.6f}) in scenario {omega}")
263
- record_violation(11, 0.0, I_plant[t], '<=',
264
- f"Constraint 11 (Eq.12): I_plant_{t} negative ({I_plant[t]:.6f}) in scenario {omega}")
265
- for i_c in Nc:
266
- record_violation(11, 0.0, I_cust[i_c, t], '<=',
267
- f"Constraint 11 (Eq.12): I_{i_c}_{t} negative ({I_cust[i_c, t]:.6f}) "
268
- f"in scenario {omega}")
269
- record_violation(11, 0.0, e_val[i_c, t], '<=',
270
- f"Constraint 11 (Eq.12): e_{i_c}_{t} negative ({e_val[i_c, t]:.6f}) "
271
- f"in scenario {omega}")
272
- for k in vehicles:
273
- record_violation(11, 0.0, q_val[i_c, k, t], '<=',
274
- f"Constraint 11 (Eq.12): q_{i_c}_{k}_{t} negative "
275
- f"({q_val[i_c, k, t]:.6f}) in scenario {omega}")
276
-
277
- # =====================================================================
278
- # Constraint 8 (Eq.9): Each customer visited at most once per period
279
- # sum_k z_{ikt} <= 1 for all i in Nc, t in T
280
- # =====================================================================
281
- for i_c in Nc:
282
- for t in periods:
283
- lhs = sum(z[i_c, k, t] for k in vehicles)
284
- record_violation(8, float(lhs), 1.0, '<=',
285
- f"Constraint 8 (Eq.9): Customer {i_c} visited {lhs} times "
286
- f"(> 1) in period {t}")
287
-
288
- # =====================================================================
289
- # Constraint 9 (Eq.10): Degree constraints
290
- # sum_{(j,j') in delta(i)} x_{jj'kt} = 2 * z_{ikt}
291
- # =====================================================================
292
- for i_node in N:
293
- for k in vehicles:
294
- for t in periods:
295
- inc_edges = [(a, b) for (a, b) in edges if a == i_node or b == i_node]
296
- lhs = sum(x[a, b, k, t] for (a, b) in inc_edges)
297
- rhs = 2.0 * z[i_node, k, t]
298
- record_violation(9, float(lhs), float(rhs), '=',
299
- f"Constraint 9 (Eq.10): Degree of node {i_node} by vehicle {k} "
300
- f"in period {t}: sum_edges={lhs} != 2*z={rhs}")
301
-
302
- # =====================================================================
303
- # Constraint 10 (Eq.11): Subtour elimination
304
- # For each vehicle k and period t, check that visited customers form
305
- # a connected component through the depot (no customer-only subtours).
306
- # =====================================================================
307
- for k in vehicles:
308
- for t in periods:
309
- visited = [i_c for i_c in Nc if z[i_c, k, t] > 0.5]
310
- if len(visited) < 2:
311
- continue
312
-
313
- # Build adjacency among all nodes with edges
314
- adj = defaultdict(set)
315
- for (a, b) in edges:
316
- if x[a, b, k, t] > 0.5:
317
- adj[a].add(b)
318
- adj[b].add(a)
319
-
320
- # BFS from depot to find reachable customers
321
- reachable = set()
322
- stack = [0]
323
- seen = set()
324
- while stack:
325
- node = stack.pop()
326
- if node in seen:
327
- continue
328
- seen.add(node)
329
- if node in visited:
330
- reachable.add(node)
331
- for nb in adj[node]:
332
- if nb not in seen:
333
- stack.append(nb)
334
-
335
- # Customers visited but not reachable from depot form subtours
336
- subtour_nodes = set(visited) - reachable
337
- if subtour_nodes:
338
- # Find the subtour components
339
- remaining = set(subtour_nodes)
340
- while remaining:
341
- start = next(iter(remaining))
342
- comp = set()
343
- stack = [start]
344
- while stack:
345
- node = stack.pop()
346
- if node in comp:
347
- continue
348
- comp.add(node)
349
- for nb in adj[node]:
350
- if nb in remaining and nb not in comp:
351
- stack.append(nb)
352
- remaining -= comp
353
- S = comp
354
- # Compute violation: sum x_{ij} for (i,j) in E(S) <= sum z - z_e
355
- E_S = [(a, b) for (a, b) in edges if a in S and b in S]
356
- sum_x = sum(x[a, b, k, t] for (a, b) in E_S)
357
- for e_node in S:
358
- rhs_val = sum(z[i_c, k, t] for i_c in S) - z[e_node, k, t]
359
- violation_amount = max(0.0, sum_x - rhs_val)
360
- if violation_amount > tol:
361
- normalizer = max(abs(rhs_val), eps)
362
- ratio = violation_amount / normalizer
363
- violated_set.add(10)
364
- violations_list.append({
365
- 'constraint': 10,
366
- 'msg': (f"Constraint 10 (Eq.11): Subtour among customers "
367
- f"{sorted(S)} by vehicle {k} in period {t}"),
368
- 'lhs': float(sum_x),
369
- 'rhs': float(rhs_val),
370
- 'raw_excess': float(violation_amount),
371
- 'normalizer': float(normalizer),
372
- 'ratio': float(ratio),
373
- })
374
- break # one violation per component suffices
375
-
376
- # =====================================================================
377
- # Constraint 12 (Eq.13): Binary y_t, z_{ikt}
378
- # =====================================================================
379
- for t in periods:
380
- val = y[t]
381
- if abs(val - round(val)) > tol or round(val) not in (0, 1):
382
- record_violation(12, float(val), float(round(val)), '=',
383
- f"Constraint 12 (Eq.13): y_{t} = {val} is not binary")
384
-
385
- for i_node in N:
386
- for k in vehicles:
387
- for t in periods:
388
- val = z[i_node, k, t]
389
- if abs(val - round(val)) > tol or round(val) not in (0, 1):
390
- record_violation(12, float(val), float(round(val)), '=',
391
- f"Constraint 12 (Eq.13): z_{i_node}_{k}_{t} = {val} is not binary")
392
-
393
- # =====================================================================
394
- # Constraint 13 (Eq.14): Binary x for non-depot edges (i != 0)
395
- # =====================================================================
396
- for (i_e, j_e) in edges:
397
- if i_e == 0:
398
- continue
399
- for k in vehicles:
400
- for t in periods:
401
- val = x[i_e, j_e, k, t]
402
- if abs(val - round(val)) > tol or round(val) not in (0, 1):
403
- record_violation(13, float(val), float(round(val)), '=',
404
- f"Constraint 13 (Eq.14): x_{i_e}_{j_e}_{k}_{t} = {val} "
405
- f"is not binary (non-depot edge)")
406
-
407
- # =====================================================================
408
- # Constraint 14 (Eq.15): x at depot edges in {0, 1, 2}
409
- # =====================================================================
410
- for j_e in Nc:
411
- for k in vehicles:
412
- for t in periods:
413
- val = x[0, j_e, k, t]
414
- if abs(val - round(val)) > tol or round(val) not in (0, 1, 2):
415
- record_violation(14, float(val), float(round(val)), '=',
416
- f"Constraint 14 (Eq.15): x_0_{j_e}_{k}_{t} = {val} "
417
- f"not in {{0,1,2}} (depot edge)")
418
-
419
- # =====================================================================
420
- # Constraint 15 (Eq.16): z_{ikt} <= z_{0kt} for i in Nc
421
- # =====================================================================
422
- for i_c in Nc:
423
- for k in vehicles:
424
- for t in periods:
425
- lhs = float(z[i_c, k, t])
426
- rhs = float(z[0, k, t])
427
- record_violation(15, lhs, rhs, '<=',
428
- f"Constraint 15 (Eq.16): z_{i_c}_{k}_{t}={lhs} > "
429
- f"z_0_{k}_{t}={rhs} (customer visited without vehicle dispatch)")
430
-
431
- # =====================================================================
432
- # Constraint 16 (Eq.17): x_{ijkt} <= z_{ikt} and x_{ijkt} <= z_{jkt}
433
- # for (i,j) in E(Nc)
434
- # =====================================================================
435
- for (i_e, j_e) in edges_Nc:
436
- for k in vehicles:
437
- for t in periods:
438
- val = float(x[i_e, j_e, k, t])
439
- zi = float(z[i_e, k, t])
440
- zj = float(z[j_e, k, t])
441
- record_violation(16, val, zi, '<=',
442
- f"Constraint 16 (Eq.17): x_{i_e}_{j_e}_{k}_{t}={val} > "
443
- f"z_{i_e}_{k}_{t}={zi}")
444
- record_violation(16, val, zj, '<=',
445
- f"Constraint 16 (Eq.17): x_{i_e}_{j_e}_{k}_{t}={val} > "
446
- f"z_{j_e}_{k}_{t}={zj}")
447
-
448
- # =====================================================================
449
- # Constraint 17 (Eq.18): z_{0kt} >= z_{0,k+1,t} (vehicle symmetry)
450
- # Only applies when m > 1
451
- # =====================================================================
452
- if m > 1:
453
- for k in range(1, m):
454
- for t in periods:
455
- lhs = float(z[0, k, t])
456
- rhs = float(z[0, k + 1, t])
457
- record_violation(17, lhs, rhs, '>=',
458
- f"Constraint 17 (Eq.18): z_0_{k}_{t}={lhs} < "
459
- f"z_0_{k+1}_{t}={rhs} (vehicle ordering violated)")
460
-
461
- # =====================================================================
462
- # Constraint 18 (Eq.19): Lexicographic ordering
463
- # sum_{i=1}^{j} 2^{j-i} z_{ikt} >= sum_{i=1}^{j} 2^{j-i} z_{i,k+1,t}
464
- # Only applies when m > 1
465
- # =====================================================================
466
- if m > 1:
467
- for j_node in Nc:
468
- for k in range(1, m):
469
- for t in periods:
470
- lhs = sum(2 ** (j_node - i_c) * z[i_c, k, t]
471
- for i_c in range(1, j_node + 1))
472
- rhs = sum(2 ** (j_node - i_c) * z[i_c, k + 1, t]
473
- for i_c in range(1, j_node + 1))
474
- record_violation(18, float(lhs), float(rhs), '>=',
475
- f"Constraint 18 (Eq.19): Lexicographic ordering violated "
476
- f"for j={j_node}, k={k}, t={t}: {lhs} < {rhs}")
477
-
478
- # =====================================================================
479
- # Constraints 19-22 (Eqs.20-23): Nonanticipativity (M-SPRP only)
480
- # These only apply to multistage problems. For 2-SPRP, first-stage
481
- # variables are scenario-independent by construction, so these are
482
- # trivially satisfied.
483
- # =====================================================================
484
- # (Skipped for 2-SPRP; the solution format already has scenario-independent y, z, x.)
485
-
486
- # =====================================================================
487
- # Constraint 23: Objective-value consistency (Tier C anti-exploit check)
488
- # Envelope check: reported objective_value must fall in [obj_lower,
489
- # obj_upper], where both bounds are derivable from the first-stage
490
- # variables (y, z, x) and instance data alone (the second-stage
491
- # p, I, q, e are not in the solution schema).
492
- #
493
- # LOWER BOUND (rejects obj=0 / "do-nothing" exploit):
494
- # setup_floor = f * sum_t y_t (exact)
495
- # transp_floor = sum_{i,j,k,t} c_{ij} * x_{ijkt} (exact)
496
- # production cost >= 0, holding cost >= 0 (omitted)
497
- # unmet penalty (general case): >= 0 (omitted)
498
- # unmet penalty (do-nothing, sum_y == 0): EXACTLY
499
- # sum_w prob_w * sum_i sigma_i * max(0, total_demand_iw - I0_i)
500
- # because with no production, all customer demand beyond initial
501
- # inventory must be unmet -> the bound is tight in this case.
502
- #
503
- # UPPER BOUND (rejects obj=MAX_FLOAT / arbitrarily-huge exploit):
504
- # setup = exact (as above)
505
- # transp = exact (as above)
506
- # production <= u * C * sum_y (capacity-bound, scenario-indep)
507
- # unmet <= sum_w prob_w * sum_i sigma_i * sum_t d_itw
508
- # holding <= T * (h_0 * L_0 + sum_{i in Nc} h_i * L_i)
509
- # =====================================================================
510
- reported_obj = sol.get('objective_value')
511
- try:
512
- reported = float(reported_obj) if reported_obj is not None else None
513
- except (TypeError, ValueError):
514
- reported = None
515
-
516
- if reported is not None:
517
- f_cost = float(data.get('f', 0.0))
518
- u_cost = float(data.get('u', 0.0))
519
- h_vec = data.get('h')
520
- transp_costs = data.get('transportation_costs')
521
- probs = data.get('scenario_probabilities')
522
- sigma = data.get('sigma')
523
-
524
- sum_y = sum(float(y[t]) for t in periods)
525
- setup = f_cost * sum_y
526
-
527
- transp = 0.0
528
- if transp_costs is not None:
529
- for (i_e, j_e) in edges:
530
- for k in vehicles:
531
- for t in periods:
532
- transp += float(transp_costs[i_e][j_e]) * float(x[i_e, j_e, k, t])
533
-
534
- # Tight unmet-demand floor in the do-nothing case (no production at all).
535
- unmet_floor = 0.0
536
- if (abs(sum_y) <= tol and probs is not None and sigma is not None):
537
- for w in scenarios:
538
- pw = float(probs[w])
539
- for i_c in Nc:
540
- total_d = sum(float(d(w, i_c, t)) for t in periods)
541
- unmet_floor += pw * float(sigma[i_c - 1]) * max(0.0, total_d - float(I0[i_c]))
542
-
543
- obj_lower = setup + transp + unmet_floor
544
-
545
- # Worst-case upper bound from first-stage decisions + instance data.
546
- prod_upper = u_cost * float(C) * sum_y
547
- unmet_upper = 0.0
548
- if probs is not None and sigma is not None:
549
- for w in scenarios:
550
- pw = float(probs[w])
551
- for i_c in Nc:
552
- total_d = sum(float(d(w, i_c, t)) for t in periods)
553
- unmet_upper += pw * float(sigma[i_c - 1]) * total_d
554
- hold_upper = 0.0
555
- if h_vec is not None:
556
- hold_upper = float(T) * (
557
- float(h_vec[0]) * float(L[0])
558
- + sum(float(h_vec[i_c]) * float(L[i_c]) for i_c in Nc)
559
- )
560
- obj_upper = setup + transp + prod_upper + unmet_upper + hold_upper
561
-
562
- tol_obj_lo = max(1e-3, 1e-3 * abs(obj_lower))
563
- tol_obj_hi = max(1e-3, 1e-3 * abs(obj_upper))
564
-
565
- shortfall = obj_lower - reported
566
- overshoot = reported - obj_upper
567
-
568
- if shortfall > tol_obj_lo:
569
- normalizer = max(abs(obj_lower), eps)
570
- ratio = shortfall / normalizer
571
- violated_set.add(23)
572
- bound_components = (
573
- f"setup={setup:.4f}, transp={transp:.4f}, "
574
- f"unmet(do-nothing)={unmet_floor:.4f}"
575
- if abs(sum_y) <= tol
576
- else f"setup={setup:.4f}, transp={transp:.4f}, unmet>=0"
577
- )
578
- violations_list.append({
579
- 'constraint': 23,
580
- 'msg': (
581
- f"Constraint 23 (Objective consistency): reported objective_value="
582
- f"{reported:.6f} is below the lower bound obj_lower={obj_lower:.6f} "
583
- f"({bound_components}); shortfall={shortfall:.6g}, tol={tol_obj_lo:.6g}"
584
- ),
585
- 'lhs': float(obj_lower),
586
- 'rhs': float(reported),
587
- 'raw_excess': float(shortfall),
588
- 'normalizer': float(normalizer),
589
- 'ratio': float(ratio),
590
- })
591
-
592
- if overshoot > tol_obj_hi:
593
- normalizer = max(abs(obj_upper), eps)
594
- ratio = overshoot / normalizer
595
- violated_set.add(23)
596
- violations_list.append({
597
- 'constraint': 23,
598
- 'msg': (
599
- f"Constraint 23 (Objective consistency): reported objective_value="
600
- f"{reported:.6f} exceeds worst-case upper bound obj_upper={obj_upper:.6f} "
601
- f"(setup={setup:.4f}, transp={transp:.4f}, prod_max={prod_upper:.4f}, "
602
- f"unmet_max={unmet_upper:.4f}, hold_max={hold_upper:.4f}); "
603
- f"overshoot={overshoot:.6g}, tol={tol_obj_hi:.6g}"
604
- ),
605
- 'lhs': float(reported),
606
- 'rhs': float(obj_upper),
607
- 'raw_excess': float(overshoot),
608
- 'normalizer': float(normalizer),
609
- 'ratio': float(ratio),
610
- })
611
-
612
- # =====================================================================
613
- # Aggregate results
614
- # =====================================================================
615
- # Build unique violation messages per constraint
616
- msg_per_constraint = defaultdict(list)
617
- for v in violations_list:
618
- msg_per_constraint[v['constraint']].append(v['msg'])
619
-
620
- # Deduplicate messages: summarize if too many
621
- final_messages = []
622
- for c_idx in sorted(violated_set):
623
- msgs = msg_per_constraint[c_idx]
624
- if len(msgs) <= 3:
625
- final_messages.extend(msgs)
626
- else:
627
- final_messages.append(msgs[0])
628
- final_messages.append(f" ... and {len(msgs) - 1} more violations of Constraint {c_idx}")
629
-
630
- # Build violation_magnitudes (all entries)
631
- final_magnitudes = []
632
- for v in violations_list:
633
- final_magnitudes.append({
634
- 'constraint': v['constraint'],
635
- 'lhs': v['lhs'],
636
- 'rhs': v['rhs'],
637
- 'raw_excess': v['raw_excess'],
638
- 'normalizer': v['normalizer'],
639
- 'ratio': v['ratio'],
640
- })
641
-
642
- result = {
643
- 'feasible': len(violated_set) == 0,
644
- 'violated_constraints': sorted(violated_set),
645
- 'violations': final_messages,
646
- 'violation_magnitudes': final_magnitudes,
647
- }
648
- return result
649
-
650
-
651
- def main():
652
- parser = argparse.ArgumentParser(
653
- description="Feasibility checker for the Stochastic Production Routing Problem"
654
- )
655
- parser.add_argument('--instance_path', type=str, required=True,
656
- help="Path to JSON instance file")
657
- parser.add_argument('--solution_path', type=str, required=True,
658
- help="Path to JSON solution file")
659
- parser.add_argument('--result_path', type=str, required=True,
660
- help="Path to write JSON feasibility result")
661
- args = parser.parse_args()
662
-
663
- with open(args.instance_path) as f:
664
- data = json.load(f)
665
- with open(args.solution_path) as f:
666
- sol = json.load(f)
667
-
668
- result = check_feasibility(data, sol)
669
-
670
- with open(args.result_path, 'w') as f:
671
- json.dump(result, f, indent=2)
672
-
673
- if result['feasible']:
674
- print("FEASIBLE: All hard constraints satisfied.")
675
- else:
676
- print(f"INFEASIBLE: {len(result['violated_constraints'])} constraint(s) violated: "
677
- f"{result['violated_constraints']}")
678
- for msg in result['violations']:
679
- print(f" - {msg}")
680
-
681
-
682
- if __name__ == '__main__':
683
- main()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
adulyasak2015/gurobi_code.py DELETED
@@ -1,366 +0,0 @@
1
- """
2
- Gurobi implementation of the Two-Stage Stochastic Production Routing Problem (2-SPRP).
3
- Model (1)-(19): 2-BF (Two-Stage Base Formulation).
4
- Reference: Adulyasak, Cordeau, Jans (2015), Operations Research.
5
- """
6
- import argparse
7
- import json
8
- import math
9
- import gurobipy as gp
10
- from gurobipy import GRB
11
- import os as _os, sys as _sys
12
- # Walk up from this file's directory to find repo root (containing scripts/).
13
- _repo = _os.path.dirname(_os.path.abspath(__file__))
14
- while _repo != _os.path.dirname(_repo) and not _os.path.isdir(_os.path.join(_repo, 'scripts', 'utils')):
15
- _repo = _os.path.dirname(_repo)
16
- if _os.path.isdir(_os.path.join(_repo, 'scripts', 'utils')):
17
- _sys.path.insert(0, _repo)
18
- try:
19
- from scripts.utils.gurobi_log_helper import install_gurobi_logger
20
- except ImportError:
21
- def install_gurobi_logger(log_path): # no-op fallback when scripts/ unavailable
22
- pass
23
-
24
-
25
- def load_instance(path):
26
- with open(path) as f:
27
- return json.load(f)
28
-
29
-
30
- def solve(instance_path, solution_path, time_limit):
31
- data = load_instance(instance_path)
32
-
33
- n = data['n'] # number of customers
34
- T = data['T'] # number of periods
35
- m = data['m'] # number of vehicles
36
- Q = data['Q'] # vehicle capacity
37
- C = data['C'] # production capacity per period
38
- f_cost = data['f'] # fixed production setup cost
39
- u = data['u'] # unit production cost
40
- h = data['h'] # holding costs, h[0]=plant, h[1..n]=customers
41
- L = data['L'] # inventory capacities, L[0]=plant, L[1..n]=customers
42
- I0 = data['I0'] # initial inventories
43
- sigma = data['sigma'] # penalty costs for customers (list of length n)
44
- c = data['transportation_costs'] # c[i][j], i,j in 0..n
45
- rho = data['scenario_probabilities'] # rho[omega]
46
- demand_sc = data['demand_scenarios'] # demand_sc[omega][cust_idx][period_idx] (0-indexed)
47
- n_omega = data['n_scenarios']
48
-
49
- # Index sets (1-indexed periods, vehicles; 0-indexed customers shifted by 1)
50
- Nc = list(range(1, n + 1)) # customers
51
- N = list(range(0, n + 1)) # all nodes (0=plant)
52
- periods = list(range(1, T + 1))
53
- vehicles = list(range(1, m + 1))
54
- scenarios = list(range(n_omega))
55
-
56
- # All undirected edges (i<j)
57
- edges = [(i, j) for i in N for j in N if i < j]
58
- edges_Nc = [(i, j) for i in Nc for j in Nc if i < j]
59
-
60
- def d(omega, i, t):
61
- """Demand of customer i (1-indexed) in period t (1-indexed) under scenario omega."""
62
- return demand_sc[omega][i - 1][t - 1]
63
-
64
- def M_t(t, omega):
65
- """M_{t,omega} = min{C, Q, sum_{s>=t, i in Nc} d_{is,omega}}"""
66
- rem = sum(d(omega, i, s) for i in Nc for s in range(t, T + 1))
67
- return min(C, Q, rem)
68
-
69
- def M_prime(i, t, omega):
70
- """M'_{it,omega} = min{L_i, Q, sum_{s>=t} d_{is,omega}}"""
71
- rem = sum(d(omega, i, s) for s in range(t, T + 1))
72
- return min(L[i], Q, rem)
73
-
74
- # ----------------------------------------------------------------
75
- model = gp.Model("2SPRP_2BF")
76
- model.setParam("Threads", 1)
77
- model.setParam("TimeLimit", time_limit)
78
- model.setParam("LazyConstraints", 1)
79
-
80
- # --- First-stage variables ---
81
- y = {t: model.addVar(vtype=GRB.BINARY, name=f"y_{t}") for t in periods}
82
-
83
- z = {}
84
- for i in N:
85
- for k in vehicles:
86
- for t in periods:
87
- z[i, k, t] = model.addVar(vtype=GRB.BINARY, name=f"z_{i}_{k}_{t}")
88
-
89
- x = {}
90
- for (i, j) in edges:
91
- for k in vehicles:
92
- for t in periods:
93
- if i == 0:
94
- # Depot edge: can be traversed 0,1,2 times (out-and-back)
95
- x[i, j, k, t] = model.addVar(vtype=GRB.INTEGER, lb=0, ub=2,
96
- name=f"x_{i}_{j}_{k}_{t}")
97
- else:
98
- x[i, j, k, t] = model.addVar(vtype=GRB.BINARY,
99
- name=f"x_{i}_{j}_{k}_{t}")
100
-
101
- # --- Second-stage variables ---
102
- p = {}
103
- I_var = {}
104
- q_var = {}
105
- e_var = {}
106
-
107
- for omega in scenarios:
108
- for t in periods:
109
- p[t, omega] = model.addVar(lb=0.0, name=f"p_{t}_{omega}")
110
- for i in N:
111
- for t in periods:
112
- I_var[i, t, omega] = model.addVar(lb=0.0, name=f"I_{i}_{t}_{omega}")
113
- for i in Nc:
114
- for t in periods:
115
- e_var[i, t, omega] = model.addVar(lb=0.0, name=f"e_{i}_{t}_{omega}")
116
- for k in vehicles:
117
- for t in periods:
118
- q_var[i, k, t, omega] = model.addVar(lb=0.0, name=f"q_{i}_{k}_{t}_{omega}")
119
-
120
- model.update()
121
-
122
- # --- Objective (1) ---
123
- routing_cost = gp.quicksum(
124
- c[i][j] * x[i, j, k, t]
125
- for (i, j) in edges for k in vehicles for t in periods
126
- )
127
- setup_cost = gp.quicksum(f_cost * y[t] for t in periods)
128
-
129
- second_stage = gp.quicksum(
130
- rho[omega] * (
131
- gp.quicksum(u * p[t, omega] for t in periods)
132
- + gp.quicksum(h[i] * I_var[i, t, omega] for i in N for t in periods)
133
- + gp.quicksum(sigma[i - 1] * e_var[i, t, omega] for i in Nc for t in periods)
134
- )
135
- for omega in scenarios
136
- )
137
-
138
- model.setObjective(setup_cost + routing_cost + second_stage, GRB.MINIMIZE)
139
-
140
- # --- Constraint (2): Plant inventory balance ---
141
- for t in periods:
142
- for omega in scenarios:
143
- I_prev = I0[0] if t == 1 else I_var[0, t - 1, omega]
144
- model.addConstr(
145
- I_prev + p[t, omega]
146
- == gp.quicksum(q_var[i, k, t, omega] for i in Nc for k in vehicles)
147
- + I_var[0, t, omega],
148
- name=f"plant_bal_{t}_{omega}"
149
- )
150
-
151
- # --- Constraint (3): Customer inventory balance ---
152
- for i in Nc:
153
- for t in periods:
154
- for omega in scenarios:
155
- I_prev = I0[i] if t == 1 else I_var[i, t - 1, omega]
156
- model.addConstr(
157
- I_prev + gp.quicksum(q_var[i, k, t, omega] for k in vehicles)
158
- + e_var[i, t, omega]
159
- == d(omega, i, t) + I_var[i, t, omega],
160
- name=f"cust_bal_{i}_{t}_{omega}"
161
- )
162
-
163
- # --- Constraint (4): Max plant inventory ---
164
- for t in periods:
165
- for omega in scenarios:
166
- model.addConstr(I_var[0, t, omega] <= L[0], name=f"plant_inv_{t}_{omega}")
167
-
168
- # --- Constraint (5): Max customer inventory ---
169
- for i in Nc:
170
- for t in periods:
171
- for omega in scenarios:
172
- model.addConstr(
173
- I_var[i, t, omega] + d(omega, i, t) <= L[i],
174
- name=f"cust_inv_{i}_{t}_{omega}"
175
- )
176
-
177
- # --- Constraint (6): Production capacity ---
178
- for t in periods:
179
- for omega in scenarios:
180
- model.addConstr(
181
- p[t, omega] <= M_t(t, omega) * y[t],
182
- name=f"prod_cap_{t}_{omega}"
183
- )
184
-
185
- # --- Constraint (7): Vehicle load capacity ---
186
- for k in vehicles:
187
- for t in periods:
188
- for omega in scenarios:
189
- model.addConstr(
190
- gp.quicksum(q_var[i, k, t, omega] for i in Nc) <= Q * z[0, k, t],
191
- name=f"veh_load_{k}_{t}_{omega}"
192
- )
193
-
194
- # --- Constraint (8): Delivery only if customer visited ---
195
- for i in Nc:
196
- for k in vehicles:
197
- for t in periods:
198
- for omega in scenarios:
199
- model.addConstr(
200
- q_var[i, k, t, omega] <= M_prime(i, t, omega) * z[i, k, t],
201
- name=f"del_cap_{i}_{k}_{t}_{omega}"
202
- )
203
-
204
- # --- Constraint (9): Each customer visited at most once per period ---
205
- for i in Nc:
206
- for t in periods:
207
- model.addConstr(
208
- gp.quicksum(z[i, k, t] for k in vehicles) <= 1,
209
- name=f"visit_{i}_{t}"
210
- )
211
-
212
- # --- Constraint (10): Degree constraints ---
213
- for i in N:
214
- for k in vehicles:
215
- for t in periods:
216
- inc = [(a, b) for (a, b) in edges if a == i or b == i]
217
- model.addConstr(
218
- gp.quicksum(x[a, b, k, t] for (a, b) in inc) == 2 * z[i, k, t],
219
- name=f"degree_{i}_{k}_{t}"
220
- )
221
-
222
- # --- Valid inequality (16): z_{ikt} <= z_{0kt} ---
223
- for i in Nc:
224
- for k in vehicles:
225
- for t in periods:
226
- model.addConstr(z[i, k, t] <= z[0, k, t], name=f"dispatch_{i}_{k}_{t}")
227
-
228
- # --- Valid inequality (17): edge implies both endpoints visited ---
229
- for (i, j) in edges_Nc:
230
- for k in vehicles:
231
- for t in periods:
232
- model.addConstr(x[i, j, k, t] <= z[i, k, t], name=f"ev_i_{i}_{j}_{k}_{t}")
233
- model.addConstr(x[i, j, k, t] <= z[j, k, t], name=f"ev_j_{i}_{j}_{k}_{t}")
234
-
235
- # --- Valid inequalities (18)-(19): symmetry breaking for multiple vehicles ---
236
- if m > 1:
237
- for k in range(1, m):
238
- for t in periods:
239
- model.addConstr(z[0, k, t] >= z[0, k + 1, t], name=f"sym_use_{k}_{t}")
240
- for j_node in Nc:
241
- for k in range(1, m):
242
- for t in periods:
243
- model.addConstr(
244
- gp.quicksum(2 ** (j_node - i) * z[i, k, t] for i in range(1, j_node + 1))
245
- >= gp.quicksum(2 ** (j_node - i) * z[i, k + 1, t] for i in range(1, j_node + 1)),
246
- name=f"lex_{j_node}_{k}_{t}"
247
- )
248
-
249
- # --- Lazy SEC callback (constraint 11) ---
250
- def find_subtours(x_val, z_val, k, t):
251
- """Find customer-only subtours (not connected to depot) in solution."""
252
- visited = [i for i in Nc if z_val.get((i, k, t), 0) > 0.5]
253
- if len(visited) < 2:
254
- return []
255
-
256
- # Build adjacency among visited customers
257
- adj = {i: [] for i in visited}
258
- for (a, b) in edges_Nc:
259
- if a in visited and b in visited:
260
- val = x_val.get((a, b, k, t), 0)
261
- if val > 0.5:
262
- adj[a].append(b)
263
- adj[b].append(a)
264
-
265
- # Find connected components (ignoring depot)
266
- seen = set()
267
- components = []
268
- for start in visited:
269
- if start not in seen:
270
- comp = []
271
- stack = [start]
272
- while stack:
273
- node = stack.pop()
274
- if node not in seen:
275
- seen.add(node)
276
- comp.append(node)
277
- for nb in adj.get(node, []):
278
- if nb not in seen:
279
- stack.append(nb)
280
- components.append(comp)
281
- # Only components not connected to depot are subtours
282
- # Check depot connectivity
283
- depot_neighbors = set()
284
- for (a, b) in edges:
285
- if a == 0 and b in visited and x_val.get((a, b, k, t), 0) > 0.5:
286
- depot_neighbors.add(b)
287
- elif b == 0 and a in visited and x_val.get((a, b, k, t), 0) > 0.5:
288
- depot_neighbors.add(a)
289
-
290
- subtours = []
291
- for comp in components:
292
- if not any(v in depot_neighbors for v in comp):
293
- subtours.append(comp)
294
- return subtours
295
-
296
- def callback(model, where):
297
- if where == GRB.Callback.MIPSOL:
298
- x_vals = {key: model.cbGetSolution(x[key]) for key in x}
299
- z_vals = {key: model.cbGetSolution(z[key]) for key in z}
300
-
301
- for k in vehicles:
302
- for t in periods:
303
- subtours = find_subtours(x_vals, z_vals, k, t)
304
- for comp in subtours:
305
- S = set(comp)
306
- E_S = [(a, b) for (a, b) in edges if a in S and b in S]
307
- e_node = comp[0]
308
- model.cbLazy(
309
- gp.quicksum(x[a, b, k, t] for (a, b) in E_S)
310
- <= gp.quicksum(z[i, k, t] for i in S) - z[e_node, k, t]
311
- )
312
-
313
- model.optimize(callback)
314
-
315
- # --- Extract and write solution ---
316
- result = {"objective_value": None}
317
-
318
- if model.SolCount > 0:
319
- result["objective_value"] = model.ObjVal
320
- result["gap"] = model.MIPGap
321
- result["status"] = model.Status
322
-
323
- y_sol = {str(t): round(y[t].X) for t in periods}
324
- result["y"] = y_sol
325
-
326
- z_sol = {}
327
- for i in N:
328
- for k in vehicles:
329
- for t in periods:
330
- v = z[i, k, t].X
331
- if v > 0.5:
332
- z_sol[f"{i}_{k}_{t}"] = 1
333
- result["z"] = z_sol
334
-
335
- x_sol = {}
336
- for (i, j) in edges:
337
- for k in vehicles:
338
- for t in periods:
339
- v = x[i, j, k, t].X
340
- if v > 0.5:
341
- x_sol[f"{i}_{j}_{k}_{t}"] = round(v)
342
- result["x"] = x_sol
343
-
344
- with open(solution_path, 'w') as fp:
345
- json.dump(result, fp, indent=2)
346
-
347
- print(f"Objective value: {result['objective_value']}")
348
- return result
349
-
350
-
351
- def main():
352
- parser = argparse.ArgumentParser(description="Solve 2-SPRP with Gurobi (2-BF formulation)")
353
- parser.add_argument("--instance_path", type=str, required=True,
354
- help="Path to JSON instance file")
355
- parser.add_argument("--solution_path", type=str, required=True,
356
- help="Path to write solution JSON")
357
- parser.add_argument("--time_limit", type=int, default=3600,
358
- help="Solver time limit in seconds")
359
- parser.add_argument("--log_path", type=str, default=None, help="Path to log incumbent solutions")
360
- args = parser.parse_args()
361
- install_gurobi_logger(args.log_path)
362
- solve(args.instance_path, args.solution_path, args.time_limit)
363
-
364
-
365
- if __name__ == "__main__":
366
- main()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
adulyasak2015/gurobi_feasi_result/large_feasi_result_1.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "feasible": true,
3
- "violated_constraints": [],
4
- "violations": [],
5
- "violation_magnitudes": []
6
- }
 
 
 
 
 
 
 
adulyasak2015/gurobi_feasi_result/large_feasi_result_2.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "feasible": true,
3
- "violated_constraints": [],
4
- "violations": [],
5
- "violation_magnitudes": []
6
- }
 
 
 
 
 
 
 
adulyasak2015/gurobi_feasi_result/large_feasi_result_3.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "feasible": true,
3
- "violated_constraints": [],
4
- "violations": [],
5
- "violation_magnitudes": []
6
- }
 
 
 
 
 
 
 
adulyasak2015/gurobi_feasi_result/large_feasi_result_4.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "feasible": true,
3
- "violated_constraints": [],
4
- "violations": [],
5
- "violation_magnitudes": []
6
- }
 
 
 
 
 
 
 
adulyasak2015/gurobi_feasi_result/large_feasi_result_5.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "feasible": true,
3
- "violated_constraints": [],
4
- "violations": [],
5
- "violation_magnitudes": []
6
- }
 
 
 
 
 
 
 
adulyasak2015/gurobi_feasi_result/tiny_feasi_result.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "feasible": true,
3
- "violated_constraints": [],
4
- "violations": [],
5
- "violation_magnitudes": []
6
- }
 
 
 
 
 
 
 
adulyasak2015/gurobi_solution/large_solution_1.json DELETED
@@ -1,45 +0,0 @@
1
- {
2
- "objective_value": 24264.431698905697,
3
- "gap": 0.2828023453586586,
4
- "status": 9,
5
- "y": {
6
- "1": 1,
7
- "2": 1,
8
- "3": 1,
9
- "4": 1,
10
- "5": 1,
11
- "6": 1
12
- },
13
- "z": {
14
- "0_1_1": 1,
15
- "0_1_2": 1,
16
- "0_1_3": 1,
17
- "0_1_4": 1,
18
- "0_1_5": 1,
19
- "0_1_6": 1,
20
- "1_1_6": 1,
21
- "6_1_6": 1,
22
- "10_1_1": 1,
23
- "10_1_2": 1,
24
- "10_1_3": 1,
25
- "12_1_5": 1,
26
- "17_1_5": 1,
27
- "20_1_5": 1,
28
- "21_1_6": 1,
29
- "28_1_4": 1
30
- },
31
- "x": {
32
- "0_6_1_6": 1,
33
- "0_10_1_1": 2,
34
- "0_10_1_2": 2,
35
- "0_10_1_3": 2,
36
- "0_12_1_5": 1,
37
- "0_17_1_5": 1,
38
- "0_21_1_6": 1,
39
- "0_28_1_4": 2,
40
- "1_6_1_6": 1,
41
- "1_21_1_6": 1,
42
- "12_20_1_5": 1,
43
- "17_20_1_5": 1
44
- }
45
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
adulyasak2015/gurobi_solution/large_solution_2.json DELETED
@@ -1,15 +0,0 @@
1
- {
2
- "objective_value": 159840.11349897826,
3
- "gap": 0.2965734591727916,
4
- "status": 9,
5
- "y": {
6
- "1": 0,
7
- "2": 0,
8
- "3": 0,
9
- "4": 0,
10
- "5": 0,
11
- "6": 0
12
- },
13
- "z": {},
14
- "x": {}
15
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
adulyasak2015/gurobi_solution/large_solution_3.json DELETED
@@ -1,15 +0,0 @@
1
- {
2
- "objective_value": 47553.855849755346,
3
- "gap": 1.0,
4
- "status": 9,
5
- "y": {
6
- "1": 0,
7
- "2": 0,
8
- "3": 0,
9
- "4": 0,
10
- "5": 0,
11
- "6": 0
12
- },
13
- "z": {},
14
- "x": {}
15
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
adulyasak2015/gurobi_solution/large_solution_4.json DELETED
@@ -1,15 +0,0 @@
1
- {
2
- "objective_value": 24414.72888062327,
3
- "gap": 1.0,
4
- "status": 9,
5
- "y": {
6
- "1": 0,
7
- "2": 0,
8
- "3": 0,
9
- "4": 0,
10
- "5": 0,
11
- "6": 0
12
- },
13
- "z": {},
14
- "x": {}
15
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
adulyasak2015/gurobi_solution/large_solution_5.json DELETED
@@ -1,15 +0,0 @@
1
- {
2
- "objective_value": 48829.45785608655,
3
- "gap": 0.3428716206683382,
4
- "status": 9,
5
- "y": {
6
- "1": 0,
7
- "2": 0,
8
- "3": 0,
9
- "4": 0,
10
- "5": 0,
11
- "6": 0
12
- },
13
- "z": {},
14
- "x": {}
15
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
adulyasak2015/gurobi_solution/tiny_solution.json DELETED
@@ -1,44 +0,0 @@
1
- {
2
- "objective_value": 1395.7593777311158,
3
- "gap": 0.0,
4
- "status": 2,
5
- "y": {
6
- "1": 1,
7
- "2": 1,
8
- "3": 1
9
- },
10
- "z": {
11
- "0_1_1": 1,
12
- "0_1_2": 1,
13
- "0_1_3": 1,
14
- "1_1_1": 1,
15
- "1_1_2": 1,
16
- "2_1_1": 1,
17
- "2_1_2": 1,
18
- "3_1_1": 1,
19
- "3_1_3": 1,
20
- "4_1_1": 1,
21
- "4_1_2": 1,
22
- "4_1_3": 1,
23
- "5_1_1": 1,
24
- "5_1_2": 1,
25
- "5_1_3": 1
26
- },
27
- "x": {
28
- "0_1_1_1": 1,
29
- "0_1_1_2": 1,
30
- "0_3_1_3": 1,
31
- "0_4_1_1": 1,
32
- "0_4_1_2": 1,
33
- "0_4_1_3": 1,
34
- "1_2_1_2": 1,
35
- "1_3_1_1": 1,
36
- "2_3_1_1": 1,
37
- "2_5_1_1": 1,
38
- "2_5_1_2": 1,
39
- "3_5_1_3": 1,
40
- "4_5_1_1": 1,
41
- "4_5_1_2": 1,
42
- "4_5_1_3": 1
43
- }
44
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
adulyasak2015/gurobi_solution_log/tiny_log.jsonl DELETED
@@ -1,4 +0,0 @@
1
- {"time": 0.081, "objective_value": 3915.763025824631}
2
- {"time": 0.198, "objective_value": 1465.990467930001}
3
- {"time": 0.326, "objective_value": 1411.0225539300009}
4
- {"time": 0.655, "objective_value": 1395.9876434378402}
 
 
 
 
 
adulyasak2015/instance/large_instance_1.json DELETED
The diff for this file is too large to render. See raw diff
 
adulyasak2015/instance/large_instance_2.json DELETED
The diff for this file is too large to render. See raw diff
 
adulyasak2015/instance/large_instance_3.json DELETED
The diff for this file is too large to render. See raw diff
 
adulyasak2015/instance/large_instance_4.json DELETED
The diff for this file is too large to render. See raw diff
 
adulyasak2015/instance/large_instance_5.json DELETED
The diff for this file is too large to render. See raw diff
 
adulyasak2015/instance/tiny_instance.json DELETED
@@ -1,2954 +0,0 @@
1
- {
2
- "problem_type": "2-SPRP",
3
- "description": "Two-Stage Stochastic PRP: n=5 customers, T=3 periods, m=1 vehicles, |Omega|=100 scenarios",
4
- "n": 5,
5
- "T": 3,
6
- "m": 1,
7
- "Q": 98,
8
- "C": 147,
9
- "f": 200.0,
10
- "u": 1.0,
11
- "epsilon": 0.2,
12
- "alpha_hat": 5,
13
- "coordinates": [
14
- [
15
- 50.0,
16
- 50.0
17
- ],
18
- [
19
- 86.1666,
20
- 84.1695
21
- ],
22
- [
23
- 50.9078,
24
- 18.0208
25
- ],
26
- [
27
- 97.3473,
28
- 41.1356
29
- ],
30
- [
31
- 39.9462,
32
- 48.3138
33
- ],
34
- [
35
- 34.9522,
36
- 36.9818
37
- ]
38
- ],
39
- "transportation_costs": [
40
- [
41
- 0.0,
42
- 49.755177,
43
- 31.992082,
44
- 48.169953,
45
- 10.194222,
46
- 19.897483
47
- ],
48
- [
49
- 49.755177,
50
- 0.0,
51
- 74.958879,
52
- 44.46262,
53
- 58.497492,
54
- 69.639025
55
- ],
56
- [
57
- 31.992082,
58
- 74.958879,
59
- 0.0,
60
- 51.874089,
61
- 32.215253,
62
- 24.781055
63
- ],
64
- [
65
- 48.169953,
66
- 44.46262,
67
- 51.874089,
68
- 0.0,
69
- 57.848188,
70
- 62.533212
71
- ],
72
- [
73
- 10.194222,
74
- 58.497492,
75
- 32.215253,
76
- 57.848188,
77
- 0.0,
78
- 12.383629
79
- ],
80
- [
81
- 19.897483,
82
- 69.639025,
83
- 24.781055,
84
- 62.533212,
85
- 12.383629,
86
- 0.0
87
- ]
88
- ],
89
- "h": [
90
- 0.5,
91
- 1.0,
92
- 1.0,
93
- 1.0,
94
- 1.0,
95
- 1.0
96
- ],
97
- "L": [
98
- 441,
99
- 78,
100
- 63,
101
- 75,
102
- 90,
103
- 75
104
- ],
105
- "I0": [
106
- 0,
107
- 0,
108
- 0,
109
- 0,
110
- 0,
111
- 0
112
- ],
113
- "d_bar": [
114
- [
115
- 20,
116
- 26,
117
- 11
118
- ],
119
- [
120
- 10,
121
- 21,
122
- 7
123
- ],
124
- [
125
- 19,
126
- 21,
127
- 25
128
- ],
129
- [
130
- 11,
131
- 19,
132
- 30
133
- ],
134
- [
135
- 6,
136
- 8,
137
- 25
138
- ]
139
- ],
140
- "sigma": [
141
- 16.87978,
142
- 15.067219,
143
- 16.718022,
144
- 12.842948,
145
- 13.833076
146
- ],
147
- "n_scenarios": 100,
148
- "scenario_probabilities": [
149
- 0.01,
150
- 0.01,
151
- 0.01,
152
- 0.01,
153
- 0.01,
154
- 0.01,
155
- 0.01,
156
- 0.01,
157
- 0.01,
158
- 0.01,
159
- 0.01,
160
- 0.01,
161
- 0.01,
162
- 0.01,
163
- 0.01,
164
- 0.01,
165
- 0.01,
166
- 0.01,
167
- 0.01,
168
- 0.01,
169
- 0.01,
170
- 0.01,
171
- 0.01,
172
- 0.01,
173
- 0.01,
174
- 0.01,
175
- 0.01,
176
- 0.01,
177
- 0.01,
178
- 0.01,
179
- 0.01,
180
- 0.01,
181
- 0.01,
182
- 0.01,
183
- 0.01,
184
- 0.01,
185
- 0.01,
186
- 0.01,
187
- 0.01,
188
- 0.01,
189
- 0.01,
190
- 0.01,
191
- 0.01,
192
- 0.01,
193
- 0.01,
194
- 0.01,
195
- 0.01,
196
- 0.01,
197
- 0.01,
198
- 0.01,
199
- 0.01,
200
- 0.01,
201
- 0.01,
202
- 0.01,
203
- 0.01,
204
- 0.01,
205
- 0.01,
206
- 0.01,
207
- 0.01,
208
- 0.01,
209
- 0.01,
210
- 0.01,
211
- 0.01,
212
- 0.01,
213
- 0.01,
214
- 0.01,
215
- 0.01,
216
- 0.01,
217
- 0.01,
218
- 0.01,
219
- 0.01,
220
- 0.01,
221
- 0.01,
222
- 0.01,
223
- 0.01,
224
- 0.01,
225
- 0.01,
226
- 0.01,
227
- 0.01,
228
- 0.01,
229
- 0.01,
230
- 0.01,
231
- 0.01,
232
- 0.01,
233
- 0.01,
234
- 0.01,
235
- 0.01,
236
- 0.01,
237
- 0.01,
238
- 0.01,
239
- 0.01,
240
- 0.01,
241
- 0.01,
242
- 0.01,
243
- 0.01,
244
- 0.01,
245
- 0.01,
246
- 0.01,
247
- 0.01,
248
- 0.01
249
- ],
250
- "demand_scenarios": [
251
- [
252
- [
253
- 23.414811,
254
- 22.331715,
255
- 10.910332
256
- ],
257
- [
258
- 11.985142,
259
- 22.315765,
260
- 8.307613
261
- ],
262
- [
263
- 19.346771,
264
- 24.370234,
265
- 21.333765
266
- ],
267
- [
268
- 10.596761,
269
- 17.076772,
270
- 29.056597
271
- ],
272
- [
273
- 6.636302,
274
- 8.250868,
275
- 27.754488
276
- ]
277
- ],
278
- [
279
- [
280
- 23.514908,
281
- 23.765403,
282
- 9.284341
283
- ],
284
- [
285
- 9.387014,
286
- 17.932042,
287
- 7.146689
288
- ],
289
- [
290
- 17.747769,
291
- 17.017504,
292
- 23.101671
293
- ],
294
- [
295
- 10.315937,
296
- 19.895854,
297
- 33.600628
298
- ],
299
- [
300
- 5.865259,
301
- 9.157291,
302
- 25.336502
303
- ]
304
- ],
305
- [
306
- [
307
- 21.712267,
308
- 24.527725,
309
- 9.22822
310
- ],
311
- [
312
- 9.80027,
313
- 23.032735,
314
- 6.613888
315
- ],
316
- [
317
- 19.246692,
318
- 21.697953,
319
- 24.397858
320
- ],
321
- [
322
- 10.988758,
323
- 17.261601,
324
- 25.855674
325
- ],
326
- [
327
- 4.877891,
328
- 9.419191,
329
- 27.088174
330
- ]
331
- ],
332
- [
333
- [
334
- 19.34632,
335
- 22.782412,
336
- 10.994473
337
- ],
338
- [
339
- 10.019128,
340
- 19.208887,
341
- 6.651501
342
- ],
343
- [
344
- 16.410276,
345
- 22.946674,
346
- 27.686056
347
- ],
348
- [
349
- 12.308899,
350
- 20.678981,
351
- 31.762251
352
- ],
353
- [
354
- 5.116567,
355
- 6.467806,
356
- 25.719954
357
- ]
358
- ],
359
- [
360
- [
361
- 20.351067,
362
- 23.877089,
363
- 10.714762
364
- ],
365
- [
366
- 11.630146,
367
- 22.028157,
368
- 5.957964
369
- ],
370
- [
371
- 20.858081,
372
- 23.945169,
373
- 24.808431
374
- ],
375
- [
376
- 9.52341,
377
- 17.445733,
378
- 30.973643
379
- ],
380
- [
381
- 5.032151,
382
- 6.89898,
383
- 24.618519
384
- ]
385
- ],
386
- [
387
- [
388
- 16.191731,
389
- 30.617562,
390
- 9.073308
391
- ],
392
- [
393
- 9.991882,
394
- 22.16522,
395
- 8.000937
396
- ],
397
- [
398
- 20.753303,
399
- 20.435603,
400
- 21.838371
401
- ],
402
- [
403
- 13.118296,
404
- 19.170798,
405
- 27.261646
406
- ],
407
- [
408
- 6.554156,
409
- 8.1509,
410
- 23.542575
411
- ]
412
- ],
413
- [
414
- [
415
- 19.409959,
416
- 30.751444,
417
- 10.798354
418
- ],
419
- [
420
- 8.810531,
421
- 22.842684,
422
- 6.239905
423
- ],
424
- [
425
- 18.307151,
426
- 18.122559,
427
- 25.51278
428
- ],
429
- [
430
- 11.840996,
431
- 19.249886,
432
- 34.162787
433
- ],
434
- [
435
- 6.305265,
436
- 7.629305,
437
- 21.115251
438
- ]
439
- ],
440
- [
441
- [
442
- 20.817057,
443
- 30.605544,
444
- 11.530846
445
- ],
446
- [
447
- 9.270021,
448
- 22.679857,
449
- 7.257358
450
- ],
451
- [
452
- 21.351447,
453
- 20.761648,
454
- 20.112704
455
- ],
456
- [
457
- 10.962103,
458
- 19.54281,
459
- 25.320824
460
- ],
461
- [
462
- 6.887755,
463
- 8.621358,
464
- 25.666031
465
- ]
466
- ],
467
- [
468
- [
469
- 16.096172,
470
- 28.098123,
471
- 9.551498
472
- ],
473
- [
474
- 11.547496,
475
- 19.651385,
476
- 7.158537
477
- ],
478
- [
479
- 17.882326,
480
- 19.344655,
481
- 21.810333
482
- ],
483
- [
484
- 10.620455,
485
- 18.844537,
486
- 35.634102
487
- ],
488
- [
489
- 5.771951,
490
- 8.509022,
491
- 26.778458
492
- ]
493
- ],
494
- [
495
- [
496
- 17.269615,
497
- 25.893997,
498
- 9.769813
499
- ],
500
- [
501
- 10.980171,
502
- 23.974244,
503
- 7.13522
504
- ],
505
- [
506
- 17.149807,
507
- 19.319086,
508
- 23.862819
509
- ],
510
- [
511
- 11.281568,
512
- 21.697368,
513
- 35.638753
514
- ],
515
- [
516
- 5.265452,
517
- 7.424523,
518
- 21.441993
519
- ]
520
- ],
521
- [
522
- [
523
- 19.318145,
524
- 25.505291,
525
- 11.243952
526
- ],
527
- [
528
- 11.522126,
529
- 16.825998,
530
- 6.710623
531
- ],
532
- [
533
- 21.592223,
534
- 20.807867,
535
- 27.73416
536
- ],
537
- [
538
- 10.420311,
539
- 15.307539,
540
- 27.105369
541
- ],
542
- [
543
- 5.79108,
544
- 9.479524,
545
- 22.835405
546
- ]
547
- ],
548
- [
549
- [
550
- 20.235399,
551
- 21.02303,
552
- 9.623782
553
- ],
554
- [
555
- 10.479343,
556
- 18.580337,
557
- 7.169475
558
- ],
559
- [
560
- 15.406908,
561
- 21.705429,
562
- 24.676681
563
- ],
564
- [
565
- 9.643389,
566
- 19.320751,
567
- 30.143841
568
- ],
569
- [
570
- 5.36876,
571
- 9.059462,
572
- 25.361607
573
- ]
574
- ],
575
- [
576
- [
577
- 22.187816,
578
- 21.020594,
579
- 13.048666
580
- ],
581
- [
582
- 10.602534,
583
- 17.090829,
584
- 8.269465
585
- ],
586
- [
587
- 18.871334,
588
- 22.57548,
589
- 21.963265
590
- ],
591
- [
592
- 11.84924,
593
- 19.636836,
594
- 28.530412
595
- ],
596
- [
597
- 5.76586,
598
- 7.861677,
599
- 21.076793
600
- ]
601
- ],
602
- [
603
- [
604
- 21.437212,
605
- 26.446765,
606
- 11.63738
607
- ],
608
- [
609
- 8.197451,
610
- 18.006953,
611
- 7.408329
612
- ],
613
- [
614
- 18.053413,
615
- 24.225902,
616
- 24.29692
617
- ],
618
- [
619
- 12.417171,
620
- 22.570106,
621
- 30.200711
622
- ],
623
- [
624
- 6.59074,
625
- 8.52827,
626
- 20.853792
627
- ]
628
- ],
629
- [
630
- [
631
- 16.69126,
632
- 25.960949,
633
- 12.222761
634
- ],
635
- [
636
- 9.232892,
637
- 21.226323,
638
- 7.746651
639
- ],
640
- [
641
- 16.300785,
642
- 23.823367,
643
- 20.392034
644
- ],
645
- [
646
- 12.706081,
647
- 22.086762,
648
- 31.853471
649
- ],
650
- [
651
- 7.054632,
652
- 8.378979,
653
- 27.317627
654
- ]
655
- ],
656
- [
657
- [
658
- 17.297547,
659
- 24.434371,
660
- 9.279668
661
- ],
662
- [
663
- 11.981877,
664
- 20.260525,
665
- 8.075609
666
- ],
667
- [
668
- 17.912859,
669
- 16.893409,
670
- 29.80516
671
- ],
672
- [
673
- 9.63624,
674
- 18.403787,
675
- 26.201608
676
- ],
677
- [
678
- 6.979398,
679
- 6.810493,
680
- 28.119764
681
- ]
682
- ],
683
- [
684
- [
685
- 20.291488,
686
- 26.167182,
687
- 9.724163
688
- ],
689
- [
690
- 9.527355,
691
- 22.068491,
692
- 7.184349
693
- ],
694
- [
695
- 16.054431,
696
- 22.460105,
697
- 25.444591
698
- ],
699
- [
700
- 12.966618,
701
- 20.604826,
702
- 27.646873
703
- ],
704
- [
705
- 5.954963,
706
- 8.631742,
707
- 22.051049
708
- ]
709
- ],
710
- [
711
- [
712
- 21.821266,
713
- 25.390296,
714
- 11.549585
715
- ],
716
- [
717
- 11.444856,
718
- 25.070695,
719
- 8.076761
720
- ],
721
- [
722
- 18.42298,
723
- 24.318042,
724
- 25.618229
725
- ],
726
- [
727
- 11.280028,
728
- 18.546639,
729
- 27.747973
730
- ],
731
- [
732
- 7.085775,
733
- 7.54717,
734
- 27.481855
735
- ]
736
- ],
737
- [
738
- [
739
- 16.812231,
740
- 23.268562,
741
- 8.845417
742
- ],
743
- [
744
- 9.768122,
745
- 18.352088,
746
- 6.059567
747
- ],
748
- [
749
- 16.5903,
750
- 18.254466,
751
- 21.816834
752
- ],
753
- [
754
- 12.056225,
755
- 19.321367,
756
- 26.363962
757
- ],
758
- [
759
- 5.120678,
760
- 9.196834,
761
- 28.1523
762
- ]
763
- ],
764
- [
765
- [
766
- 22.37875,
767
- 28.9718,
768
- 10.877116
769
- ],
770
- [
771
- 9.855427,
772
- 19.449823,
773
- 6.147035
774
- ],
775
- [
776
- 16.152316,
777
- 23.141028,
778
- 25.678091
779
- ],
780
- [
781
- 12.442486,
782
- 20.944011,
783
- 30.364619
784
- ],
785
- [
786
- 6.2399,
787
- 6.663086,
788
- 26.114708
789
- ]
790
- ],
791
- [
792
- [
793
- 17.319281,
794
- 22.553323,
795
- 12.255368
796
- ],
797
- [
798
- 8.10718,
799
- 21.429344,
800
- 7.959112
801
- ],
802
- [
803
- 16.89711,
804
- 22.950986,
805
- 22.61588
806
- ],
807
- [
808
- 11.16594,
809
- 15.84432,
810
- 32.536166
811
- ],
812
- [
813
- 4.987275,
814
- 9.021319,
815
- 28.248607
816
- ]
817
- ],
818
- [
819
- [
820
- 16.862284,
821
- 31.022052,
822
- 9.342458
823
- ],
824
- [
825
- 8.67899,
826
- 16.98716,
827
- 7.597023
828
- ],
829
- [
830
- 17.314694,
831
- 19.283406,
832
- 25.513346
833
- ],
834
- [
835
- 12.432188,
836
- 17.360503,
837
- 30.557409
838
- ],
839
- [
840
- 6.744414,
841
- 8.669281,
842
- 28.194761
843
- ]
844
- ],
845
- [
846
- [
847
- 20.508754,
848
- 29.409237,
849
- 9.846605
850
- ],
851
- [
852
- 8.267833,
853
- 21.535987,
854
- 7.047233
855
- ],
856
- [
857
- 18.333355,
858
- 24.603888,
859
- 25.718851
860
- ],
861
- [
862
- 12.51165,
863
- 18.043372,
864
- 32.062066
865
- ],
866
- [
867
- 7.053033,
868
- 8.24399,
869
- 24.592271
870
- ]
871
- ],
872
- [
873
- [
874
- 17.489509,
875
- 21.037433,
876
- 10.663373
877
- ],
878
- [
879
- 8.490938,
880
- 21.107742,
881
- 6.994802
882
- ],
883
- [
884
- 20.955967,
885
- 18.870685,
886
- 20.00229
887
- ],
888
- [
889
- 9.161067,
890
- 19.106742,
891
- 29.317381
892
- ],
893
- [
894
- 5.163599,
895
- 7.02939,
896
- 22.645282
897
- ]
898
- ],
899
- [
900
- [
901
- 17.676221,
902
- 29.435135,
903
- 11.139516
904
- ],
905
- [
906
- 11.046684,
907
- 21.107079,
908
- 6.813661
909
- ],
910
- [
911
- 22.632885,
912
- 18.164937,
913
- 27.904988
914
- ],
915
- [
916
- 12.390041,
917
- 15.761951,
918
- 29.67827
919
- ],
920
- [
921
- 5.504812,
922
- 8.612431,
923
- 23.565709
924
- ]
925
- ],
926
- [
927
- [
928
- 17.982163,
929
- 23.078912,
930
- 13.00815
931
- ],
932
- [
933
- 10.265573,
934
- 21.744387,
935
- 6.617425
936
- ],
937
- [
938
- 21.540121,
939
- 21.76041,
940
- 20.008973
941
- ],
942
- [
943
- 11.069752,
944
- 15.556587,
945
- 29.348311
946
- ],
947
- [
948
- 6.069171,
949
- 7.637797,
950
- 27.396786
951
- ]
952
- ],
953
- [
954
- [
955
- 23.627551,
956
- 27.866196,
957
- 12.609982
958
- ],
959
- [
960
- 9.951709,
961
- 21.426781,
962
- 5.893944
963
- ],
964
- [
965
- 20.328204,
966
- 19.342462,
967
- 26.495942
968
- ],
969
- [
970
- 12.814936,
971
- 17.68537,
972
- 28.517779
973
- ],
974
- [
975
- 5.905566,
976
- 7.344057,
977
- 21.052082
978
- ]
979
- ],
980
- [
981
- [
982
- 16.403245,
983
- 30.194474,
984
- 9.131089
985
- ],
986
- [
987
- 8.597381,
988
- 19.480723,
989
- 6.989173
990
- ],
991
- [
992
- 18.395238,
993
- 24.210014,
994
- 22.825388
995
- ],
996
- [
997
- 9.53881,
998
- 19.466828,
999
- 32.805509
1000
- ],
1001
- [
1002
- 5.390415,
1003
- 9.415047,
1004
- 22.953482
1005
- ]
1006
- ],
1007
- [
1008
- [
1009
- 17.88997,
1010
- 28.223655,
1011
- 9.01481
1012
- ],
1013
- [
1014
- 11.961251,
1015
- 24.005603,
1016
- 8.332971
1017
- ],
1018
- [
1019
- 21.710868,
1020
- 25.155895,
1021
- 24.940832
1022
- ],
1023
- [
1024
- 9.319271,
1025
- 22.561968,
1026
- 33.257654
1027
- ],
1028
- [
1029
- 6.495445,
1030
- 7.212943,
1031
- 21.625907
1032
- ]
1033
- ],
1034
- [
1035
- [
1036
- 18.356729,
1037
- 27.957822,
1038
- 8.861505
1039
- ],
1040
- [
1041
- 9.156231,
1042
- 18.956515,
1043
- 5.837209
1044
- ],
1045
- [
1046
- 17.755946,
1047
- 21.083219,
1048
- 28.647043
1049
- ],
1050
- [
1051
- 9.131004,
1052
- 17.021704,
1053
- 34.188865
1054
- ],
1055
- [
1056
- 6.834411,
1057
- 8.07989,
1058
- 27.253791
1059
- ]
1060
- ],
1061
- [
1062
- [
1063
- 21.756415,
1064
- 26.979667,
1065
- 8.868332
1066
- ],
1067
- [
1068
- 9.943276,
1069
- 20.671432,
1070
- 5.650308
1071
- ],
1072
- [
1073
- 19.948208,
1074
- 19.164901,
1075
- 20.231793
1076
- ],
1077
- [
1078
- 12.767996,
1079
- 22.706109,
1080
- 30.83031
1081
- ],
1082
- [
1083
- 5.06359,
1084
- 8.983328,
1085
- 20.680687
1086
- ]
1087
- ],
1088
- [
1089
- [
1090
- 21.304943,
1091
- 25.940551,
1092
- 12.328817
1093
- ],
1094
- [
1095
- 9.959423,
1096
- 24.234939,
1097
- 7.528683
1098
- ],
1099
- [
1100
- 17.345658,
1101
- 22.014404,
1102
- 25.323696
1103
- ],
1104
- [
1105
- 8.951782,
1106
- 22.598144,
1107
- 29.825053
1108
- ],
1109
- [
1110
- 6.166395,
1111
- 7.577476,
1112
- 29.970883
1113
- ]
1114
- ],
1115
- [
1116
- [
1117
- 16.220167,
1118
- 23.986257,
1119
- 10.158582
1120
- ],
1121
- [
1122
- 10.048947,
1123
- 18.456566,
1124
- 8.157744
1125
- ],
1126
- [
1127
- 15.286314,
1128
- 19.251009,
1129
- 27.958362
1130
- ],
1131
- [
1132
- 9.022112,
1133
- 22.57166,
1134
- 25.594363
1135
- ],
1136
- [
1137
- 4.953924,
1138
- 8.386003,
1139
- 25.571365
1140
- ]
1141
- ],
1142
- [
1143
- [
1144
- 23.343008,
1145
- 30.018949,
1146
- 12.010387
1147
- ],
1148
- [
1149
- 10.193534,
1150
- 19.355681,
1151
- 5.831225
1152
- ],
1153
- [
1154
- 22.587499,
1155
- 22.441643,
1156
- 26.072109
1157
- ],
1158
- [
1159
- 12.182818,
1160
- 21.85257,
1161
- 26.358192
1162
- ],
1163
- [
1164
- 5.613761,
1165
- 7.179564,
1166
- 25.216894
1167
- ]
1168
- ],
1169
- [
1170
- [
1171
- 21.974129,
1172
- 28.460814,
1173
- 12.707794
1174
- ],
1175
- [
1176
- 9.248337,
1177
- 24.212478,
1178
- 6.061492
1179
- ],
1180
- [
1181
- 20.357169,
1182
- 17.449268,
1183
- 26.934829
1184
- ],
1185
- [
1186
- 11.751451,
1187
- 20.343897,
1188
- 24.970395
1189
- ],
1190
- [
1191
- 6.075006,
1192
- 8.302708,
1193
- 20.793426
1194
- ]
1195
- ],
1196
- [
1197
- [
1198
- 19.946869,
1199
- 21.789005,
1200
- 12.196995
1201
- ],
1202
- [
1203
- 11.260502,
1204
- 19.441921,
1205
- 6.657046
1206
- ],
1207
- [
1208
- 18.671463,
1209
- 21.54776,
1210
- 27.97149
1211
- ],
1212
- [
1213
- 9.408876,
1214
- 22.234613,
1215
- 25.996086
1216
- ],
1217
- [
1218
- 6.2211,
1219
- 8.632134,
1220
- 20.469844
1221
- ]
1222
- ],
1223
- [
1224
- [
1225
- 17.192795,
1226
- 27.56779,
1227
- 9.239428
1228
- ],
1229
- [
1230
- 8.468109,
1231
- 17.8446,
1232
- 6.926317
1233
- ],
1234
- [
1235
- 20.743237,
1236
- 17.436964,
1237
- 28.950856
1238
- ],
1239
- [
1240
- 11.106077,
1241
- 15.28338,
1242
- 28.399637
1243
- ],
1244
- [
1245
- 5.785575,
1246
- 6.814858,
1247
- 20.234465
1248
- ]
1249
- ],
1250
- [
1251
- [
1252
- 18.393254,
1253
- 20.865572,
1254
- 13.02895
1255
- ],
1256
- [
1257
- 8.247758,
1258
- 22.694308,
1259
- 6.276111
1260
- ],
1261
- [
1262
- 20.680903,
1263
- 16.949952,
1264
- 21.670274
1265
- ],
1266
- [
1267
- 10.206379,
1268
- 18.74594,
1269
- 31.21906
1270
- ],
1271
- [
1272
- 6.341432,
1273
- 9.526965,
1274
- 23.413558
1275
- ]
1276
- ],
1277
- [
1278
- [
1279
- 20.512309,
1280
- 21.335498,
1281
- 9.801938
1282
- ],
1283
- [
1284
- 11.445369,
1285
- 20.400581,
1286
- 6.294954
1287
- ],
1288
- [
1289
- 21.234171,
1290
- 23.01006,
1291
- 23.709839
1292
- ],
1293
- [
1294
- 12.604368,
1295
- 19.374353,
1296
- 34.108782
1297
- ],
1298
- [
1299
- 6.181149,
1300
- 6.66534,
1301
- 26.01168
1302
- ]
1303
- ],
1304
- [
1305
- [
1306
- 22.129614,
1307
- 23.43001,
1308
- 11.994911
1309
- ],
1310
- [
1311
- 10.633875,
1312
- 22.6303,
1313
- 6.803414
1314
- ],
1315
- [
1316
- 22.156696,
1317
- 19.990822,
1318
- 26.403293
1319
- ],
1320
- [
1321
- 10.024377,
1322
- 18.443039,
1323
- 34.257004
1324
- ],
1325
- [
1326
- 5.204764,
1327
- 8.834713,
1328
- 20.926295
1329
- ]
1330
- ],
1331
- [
1332
- [
1333
- 16.567721,
1334
- 23.081842,
1335
- 11.77256
1336
- ],
1337
- [
1338
- 10.833739,
1339
- 20.539115,
1340
- 6.656508
1341
- ],
1342
- [
1343
- 17.822335,
1344
- 21.728759,
1345
- 26.932643
1346
- ],
1347
- [
1348
- 10.172238,
1349
- 18.701563,
1350
- 30.049715
1351
- ],
1352
- [
1353
- 5.972579,
1354
- 6.864118,
1355
- 28.744778
1356
- ]
1357
- ],
1358
- [
1359
- [
1360
- 19.927438,
1361
- 24.731895,
1362
- 10.946308
1363
- ],
1364
- [
1365
- 10.585321,
1366
- 21.167964,
1367
- 5.714984
1368
- ],
1369
- [
1370
- 15.264851,
1371
- 20.237286,
1372
- 21.793937
1373
- ],
1374
- [
1375
- 9.397426,
1376
- 18.305755,
1377
- 35.603089
1378
- ],
1379
- [
1380
- 6.562014,
1381
- 7.66864,
1382
- 22.832712
1383
- ]
1384
- ],
1385
- [
1386
- [
1387
- 16.78725,
1388
- 21.258526,
1389
- 9.620189
1390
- ],
1391
- [
1392
- 8.661508,
1393
- 19.428582,
1394
- 5.825258
1395
- ],
1396
- [
1397
- 16.029759,
1398
- 19.410438,
1399
- 21.428561
1400
- ],
1401
- [
1402
- 10.214729,
1403
- 15.576598,
1404
- 32.045657
1405
- ],
1406
- [
1407
- 6.911183,
1408
- 8.304717,
1409
- 22.640643
1410
- ]
1411
- ],
1412
- [
1413
- [
1414
- 16.289938,
1415
- 22.393721,
1416
- 9.895722
1417
- ],
1418
- [
1419
- 11.32393,
1420
- 19.067293,
1421
- 7.52027
1422
- ],
1423
- [
1424
- 17.239535,
1425
- 21.473938,
1426
- 24.359201
1427
- ],
1428
- [
1429
- 9.777923,
1430
- 21.046439,
1431
- 32.539957
1432
- ],
1433
- [
1434
- 6.172348,
1435
- 8.114588,
1436
- 25.805506
1437
- ]
1438
- ],
1439
- [
1440
- [
1441
- 21.444651,
1442
- 29.781337,
1443
- 12.231292
1444
- ],
1445
- [
1446
- 9.72371,
1447
- 19.627052,
1448
- 7.760181
1449
- ],
1450
- [
1451
- 19.600806,
1452
- 23.97162,
1453
- 29.438315
1454
- ],
1455
- [
1456
- 10.228869,
1457
- 15.801349,
1458
- 35.170017
1459
- ],
1460
- [
1461
- 5.00189,
1462
- 9.548498,
1463
- 29.095744
1464
- ]
1465
- ],
1466
- [
1467
- [
1468
- 21.762252,
1469
- 28.365866,
1470
- 10.425044
1471
- ],
1472
- [
1473
- 10.761023,
1474
- 20.75573,
1475
- 8.033629
1476
- ],
1477
- [
1478
- 18.95048,
1479
- 17.24742,
1480
- 23.780994
1481
- ],
1482
- [
1483
- 11.864301,
1484
- 20.704406,
1485
- 26.49682
1486
- ],
1487
- [
1488
- 4.855101,
1489
- 9.068722,
1490
- 20.263205
1491
- ]
1492
- ],
1493
- [
1494
- [
1495
- 19.987075,
1496
- 22.66053,
1497
- 11.097689
1498
- ],
1499
- [
1500
- 8.361352,
1501
- 23.346542,
1502
- 7.900947
1503
- ],
1504
- [
1505
- 21.609815,
1506
- 17.587678,
1507
- 24.066447
1508
- ],
1509
- [
1510
- 8.87717,
1511
- 17.870184,
1512
- 34.344285
1513
- ],
1514
- [
1515
- 5.506386,
1516
- 6.971796,
1517
- 28.790326
1518
- ]
1519
- ],
1520
- [
1521
- [
1522
- 20.994477,
1523
- 22.675542,
1524
- 11.418057
1525
- ],
1526
- [
1527
- 10.502161,
1528
- 21.379395,
1529
- 6.907257
1530
- ],
1531
- [
1532
- 17.419308,
1533
- 22.097052,
1534
- 27.622633
1535
- ],
1536
- [
1537
- 9.032762,
1538
- 20.825873,
1539
- 31.461131
1540
- ],
1541
- [
1542
- 5.853588,
1543
- 8.533877,
1544
- 24.61569
1545
- ]
1546
- ],
1547
- [
1548
- [
1549
- 19.384116,
1550
- 22.750071,
1551
- 10.790581
1552
- ],
1553
- [
1554
- 11.095213,
1555
- 18.662229,
1556
- 8.349776
1557
- ],
1558
- [
1559
- 19.072205,
1560
- 18.685593,
1561
- 27.267544
1562
- ],
1563
- [
1564
- 11.179035,
1565
- 17.356158,
1566
- 31.242416
1567
- ],
1568
- [
1569
- 5.329378,
1570
- 9.004861,
1571
- 22.782662
1572
- ]
1573
- ],
1574
- [
1575
- [
1576
- 20.594476,
1577
- 26.522516,
1578
- 11.371724
1579
- ],
1580
- [
1581
- 11.029482,
1582
- 16.886855,
1583
- 7.266171
1584
- ],
1585
- [
1586
- 17.979124,
1587
- 22.788894,
1588
- 21.214983
1589
- ],
1590
- [
1591
- 12.089017,
1592
- 18.259079,
1593
- 35.172485
1594
- ],
1595
- [
1596
- 6.254176,
1597
- 7.335999,
1598
- 24.821889
1599
- ]
1600
- ],
1601
- [
1602
- [
1603
- 16.506831,
1604
- 24.192251,
1605
- 12.462005
1606
- ],
1607
- [
1608
- 9.401214,
1609
- 20.602681,
1610
- 6.639807
1611
- ],
1612
- [
1613
- 22.290295,
1614
- 22.538462,
1615
- 28.0315
1616
- ],
1617
- [
1618
- 11.333297,
1619
- 15.76569,
1620
- 31.768428
1621
- ],
1622
- [
1623
- 6.935019,
1624
- 9.239548,
1625
- 24.021828
1626
- ]
1627
- ],
1628
- [
1629
- [
1630
- 21.753515,
1631
- 24.662933,
1632
- 10.75891
1633
- ],
1634
- [
1635
- 8.955964,
1636
- 21.474518,
1637
- 7.592399
1638
- ],
1639
- [
1640
- 17.108332,
1641
- 24.248434,
1642
- 29.685495
1643
- ],
1644
- [
1645
- 9.726788,
1646
- 19.69395,
1647
- 29.085677
1648
- ],
1649
- [
1650
- 5.346014,
1651
- 8.847071,
1652
- 26.428545
1653
- ]
1654
- ],
1655
- [
1656
- [
1657
- 23.078363,
1658
- 29.208684,
1659
- 8.809353
1660
- ],
1661
- [
1662
- 9.485459,
1663
- 22.280201,
1664
- 5.805802
1665
- ],
1666
- [
1667
- 20.12764,
1668
- 18.599797,
1669
- 25.477385
1670
- ],
1671
- [
1672
- 9.951731,
1673
- 16.171941,
1674
- 28.213635
1675
- ],
1676
- [
1677
- 6.482542,
1678
- 7.191804,
1679
- 21.154954
1680
- ]
1681
- ],
1682
- [
1683
- [
1684
- 17.358334,
1685
- 21.844878,
1686
- 12.28962
1687
- ],
1688
- [
1689
- 8.381877,
1690
- 23.561305,
1691
- 7.047865
1692
- ],
1693
- [
1694
- 20.033437,
1695
- 23.78783,
1696
- 21.687232
1697
- ],
1698
- [
1699
- 9.9511,
1700
- 16.788087,
1701
- 25.907131
1702
- ],
1703
- [
1704
- 6.295066,
1705
- 7.525969,
1706
- 26.830787
1707
- ]
1708
- ],
1709
- [
1710
- [
1711
- 22.290202,
1712
- 26.140641,
1713
- 9.758486
1714
- ],
1715
- [
1716
- 11.702242,
1717
- 22.187198,
1718
- 7.429495
1719
- ],
1720
- [
1721
- 19.205736,
1722
- 18.992059,
1723
- 29.463539
1724
- ],
1725
- [
1726
- 9.843569,
1727
- 21.320843,
1728
- 33.734826
1729
- ],
1730
- [
1731
- 5.59928,
1732
- 7.86968,
1733
- 27.095639
1734
- ]
1735
- ],
1736
- [
1737
- [
1738
- 19.405782,
1739
- 26.505614,
1740
- 13.172835
1741
- ],
1742
- [
1743
- 10.497794,
1744
- 21.676205,
1745
- 6.584686
1746
- ],
1747
- [
1748
- 15.449585,
1749
- 23.938079,
1750
- 22.232162
1751
- ],
1752
- [
1753
- 12.285151,
1754
- 19.167981,
1755
- 33.305571
1756
- ],
1757
- [
1758
- 5.887205,
1759
- 8.125898,
1760
- 25.022313
1761
- ]
1762
- ],
1763
- [
1764
- [
1765
- 17.444362,
1766
- 30.661099,
1767
- 10.99067
1768
- ],
1769
- [
1770
- 8.396698,
1771
- 22.906135,
1772
- 5.860479
1773
- ],
1774
- [
1775
- 18.348988,
1776
- 25.035435,
1777
- 21.015476
1778
- ],
1779
- [
1780
- 8.830215,
1781
- 16.244737,
1782
- 24.718702
1783
- ],
1784
- [
1785
- 6.171801,
1786
- 8.675578,
1787
- 28.957783
1788
- ]
1789
- ],
1790
- [
1791
- [
1792
- 23.511657,
1793
- 30.499957,
1794
- 10.716527
1795
- ],
1796
- [
1797
- 9.46202,
1798
- 20.595302,
1799
- 5.612114
1800
- ],
1801
- [
1802
- 16.675085,
1803
- 21.250425,
1804
- 28.895121
1805
- ],
1806
- [
1807
- 9.474839,
1808
- 17.62436,
1809
- 34.644756
1810
- ],
1811
- [
1812
- 4.81542,
1813
- 7.806373,
1814
- 22.495612
1815
- ]
1816
- ],
1817
- [
1818
- [
1819
- 23.756072,
1820
- 28.769812,
1821
- 12.014924
1822
- ],
1823
- [
1824
- 9.633885,
1825
- 19.784698,
1826
- 8.160443
1827
- ],
1828
- [
1829
- 22.706642,
1830
- 23.280958,
1831
- 29.97697
1832
- ],
1833
- [
1834
- 12.310214,
1835
- 16.462543,
1836
- 34.749334
1837
- ],
1838
- [
1839
- 6.478237,
1840
- 8.379885,
1841
- 22.964219
1842
- ]
1843
- ],
1844
- [
1845
- [
1846
- 20.546123,
1847
- 26.472345,
1848
- 12.550735
1849
- ],
1850
- [
1851
- 11.078081,
1852
- 21.199281,
1853
- 7.546212
1854
- ],
1855
- [
1856
- 22.241061,
1857
- 17.946678,
1858
- 24.954553
1859
- ],
1860
- [
1861
- 9.603891,
1862
- 16.307295,
1863
- 30.598517
1864
- ],
1865
- [
1866
- 6.169406,
1867
- 9.075395,
1868
- 22.303259
1869
- ]
1870
- ],
1871
- [
1872
- [
1873
- 21.731897,
1874
- 29.15317,
1875
- 12.105287
1876
- ],
1877
- [
1878
- 11.781195,
1879
- 19.527208,
1880
- 7.340131
1881
- ],
1882
- [
1883
- 17.859383,
1884
- 24.116539,
1885
- 21.75072
1886
- ],
1887
- [
1888
- 12.233674,
1889
- 22.389818,
1890
- 33.893136
1891
- ],
1892
- [
1893
- 6.517186,
1894
- 6.972547,
1895
- 21.168673
1896
- ]
1897
- ],
1898
- [
1899
- [
1900
- 16.070612,
1901
- 26.610855,
1902
- 12.999014
1903
- ],
1904
- [
1905
- 8.586027,
1906
- 21.772366,
1907
- 6.775104
1908
- ],
1909
- [
1910
- 16.141978,
1911
- 24.80184,
1912
- 24.416182
1913
- ],
1914
- [
1915
- 9.400123,
1916
- 19.318365,
1917
- 31.183907
1918
- ],
1919
- [
1920
- 5.72339,
1921
- 6.439462,
1922
- 27.423984
1923
- ]
1924
- ],
1925
- [
1926
- [
1927
- 21.350728,
1928
- 27.810925,
1929
- 11.690532
1930
- ],
1931
- [
1932
- 8.643996,
1933
- 21.059023,
1934
- 5.803133
1935
- ],
1936
- [
1937
- 19.329416,
1938
- 16.862469,
1939
- 29.267488
1940
- ],
1941
- [
1942
- 9.509681,
1943
- 21.257178,
1944
- 35.391936
1945
- ],
1946
- [
1947
- 5.027698,
1948
- 9.375805,
1949
- 24.679713
1950
- ]
1951
- ],
1952
- [
1953
- [
1954
- 23.042095,
1955
- 29.939863,
1956
- 10.886996
1957
- ],
1958
- [
1959
- 8.984101,
1960
- 19.759562,
1961
- 7.61178
1962
- ],
1963
- [
1964
- 20.51785,
1965
- 20.050035,
1966
- 28.368249
1967
- ],
1968
- [
1969
- 11.826777,
1970
- 16.792745,
1971
- 26.005198
1972
- ],
1973
- [
1974
- 7.111496,
1975
- 7.371176,
1976
- 20.289779
1977
- ]
1978
- ],
1979
- [
1980
- [
1981
- 17.097606,
1982
- 27.226625,
1983
- 11.088727
1984
- ],
1985
- [
1986
- 8.318667,
1987
- 21.687658,
1988
- 6.230433
1989
- ],
1990
- [
1991
- 19.903815,
1992
- 21.937779,
1993
- 21.940945
1994
- ],
1995
- [
1996
- 11.466929,
1997
- 15.68291,
1998
- 33.836777
1999
- ],
2000
- [
2001
- 5.679201,
2002
- 7.344124,
2003
- 28.239204
2004
- ]
2005
- ],
2006
- [
2007
- [
2008
- 20.421959,
2009
- 25.061278,
2010
- 10.259101
2011
- ],
2012
- [
2013
- 11.558603,
2014
- 22.721798,
2015
- 6.843921
2016
- ],
2017
- [
2018
- 20.294698,
2019
- 25.043254,
2020
- 27.213448
2021
- ],
2022
- [
2023
- 10.602273,
2024
- 22.472576,
2025
- 33.640153
2026
- ],
2027
- [
2028
- 6.101966,
2029
- 7.622375,
2030
- 23.506266
2031
- ]
2032
- ],
2033
- [
2034
- [
2035
- 19.273262,
2036
- 25.516733,
2037
- 13.136321
2038
- ],
2039
- [
2040
- 8.290459,
2041
- 19.895076,
2042
- 6.212458
2043
- ],
2044
- [
2045
- 15.887894,
2046
- 19.001512,
2047
- 29.534933
2048
- ],
2049
- [
2050
- 9.127161,
2051
- 17.821258,
2052
- 32.111062
2053
- ],
2054
- [
2055
- 5.908538,
2056
- 6.567309,
2057
- 26.339761
2058
- ]
2059
- ],
2060
- [
2061
- [
2062
- 23.650523,
2063
- 24.084116,
2064
- 12.022432
2065
- ],
2066
- [
2067
- 8.687456,
2068
- 17.090658,
2069
- 6.406025
2070
- ],
2071
- [
2072
- 20.458848,
2073
- 19.073966,
2074
- 24.685245
2075
- ],
2076
- [
2077
- 9.259169,
2078
- 17.106448,
2079
- 27.573721
2080
- ],
2081
- [
2082
- 5.544024,
2083
- 8.756,
2084
- 27.513521
2085
- ]
2086
- ],
2087
- [
2088
- [
2089
- 18.096227,
2090
- 21.691998,
2091
- 9.673281
2092
- ],
2093
- [
2094
- 11.740215,
2095
- 18.437486,
2096
- 6.480942
2097
- ],
2098
- [
2099
- 18.658755,
2100
- 24.83405,
2101
- 24.13906
2102
- ],
2103
- [
2104
- 12.934032,
2105
- 18.138656,
2106
- 32.376518
2107
- ],
2108
- [
2109
- 5.864245,
2110
- 8.396902,
2111
- 26.742967
2112
- ]
2113
- ],
2114
- [
2115
- [
2116
- 20.562064,
2117
- 27.153023,
2118
- 10.768331
2119
- ],
2120
- [
2121
- 8.080208,
2122
- 24.767204,
2123
- 7.639679
2124
- ],
2125
- [
2126
- 18.790215,
2127
- 17.803096,
2128
- 29.054799
2129
- ],
2130
- [
2131
- 9.1948,
2132
- 17.122106,
2133
- 26.753607
2134
- ],
2135
- [
2136
- 5.983915,
2137
- 7.529251,
2138
- 28.846996
2139
- ]
2140
- ],
2141
- [
2142
- [
2143
- 23.019581,
2144
- 30.147897,
2145
- 10.254649
2146
- ],
2147
- [
2148
- 10.006926,
2149
- 24.111825,
2150
- 7.584073
2151
- ],
2152
- [
2153
- 15.434069,
2154
- 21.370738,
2155
- 23.514618
2156
- ],
2157
- [
2158
- 9.393857,
2159
- 17.759989,
2160
- 25.758919
2161
- ],
2162
- [
2163
- 6.136225,
2164
- 7.594657,
2165
- 21.189304
2166
- ]
2167
- ],
2168
- [
2169
- [
2170
- 18.835539,
2171
- 22.314228,
2172
- 11.744411
2173
- ],
2174
- [
2175
- 11.060445,
2176
- 18.611503,
2177
- 7.750227
2178
- ],
2179
- [
2180
- 19.335762,
2181
- 21.982088,
2182
- 25.350327
2183
- ],
2184
- [
2185
- 8.872907,
2186
- 22.684311,
2187
- 33.439353
2188
- ],
2189
- [
2190
- 5.524902,
2191
- 7.228176,
2192
- 24.243844
2193
- ]
2194
- ],
2195
- [
2196
- [
2197
- 21.94024,
2198
- 27.434584,
2199
- 11.782634
2200
- ],
2201
- [
2202
- 9.264931,
2203
- 17.511227,
2204
- 6.233153
2205
- ],
2206
- [
2207
- 17.702328,
2208
- 20.158295,
2209
- 21.635244
2210
- ],
2211
- [
2212
- 13.064763,
2213
- 19.917829,
2214
- 27.984208
2215
- ],
2216
- [
2217
- 6.779302,
2218
- 9.294407,
2219
- 26.311149
2220
- ]
2221
- ],
2222
- [
2223
- [
2224
- 16.248551,
2225
- 22.356895,
2226
- 10.314022
2227
- ],
2228
- [
2229
- 8.477283,
2230
- 19.059033,
2231
- 5.612167
2232
- ],
2233
- [
2234
- 19.032081,
2235
- 17.654131,
2236
- 26.275122
2237
- ],
2238
- [
2239
- 10.202378,
2240
- 20.294328,
2241
- 28.850821
2242
- ],
2243
- [
2244
- 5.037537,
2245
- 6.660174,
2246
- 27.825035
2247
- ]
2248
- ],
2249
- [
2250
- [
2251
- 19.930787,
2252
- 23.191026,
2253
- 10.930456
2254
- ],
2255
- [
2256
- 10.005144,
2257
- 17.452498,
2258
- 6.962986
2259
- ],
2260
- [
2261
- 18.489986,
2262
- 21.246817,
2263
- 23.511322
2264
- ],
2265
- [
2266
- 9.375175,
2267
- 15.539236,
2268
- 32.370765
2269
- ],
2270
- [
2271
- 6.499016,
2272
- 7.305095,
2273
- 28.405199
2274
- ]
2275
- ],
2276
- [
2277
- [
2278
- 22.625712,
2279
- 25.307958,
2280
- 12.694709
2281
- ],
2282
- [
2283
- 8.491497,
2284
- 18.450289,
2285
- 6.546529
2286
- ],
2287
- [
2288
- 19.948205,
2289
- 23.862582,
2290
- 29.960618
2291
- ],
2292
- [
2293
- 12.495846,
2294
- 21.858674,
2295
- 31.590078
2296
- ],
2297
- [
2298
- 6.700817,
2299
- 8.867662,
2300
- 26.034475
2301
- ]
2302
- ],
2303
- [
2304
- [
2305
- 17.890571,
2306
- 29.463764,
2307
- 8.884523
2308
- ],
2309
- [
2310
- 9.992279,
2311
- 17.601302,
2312
- 6.540285
2313
- ],
2314
- [
2315
- 15.261445,
2316
- 20.325526,
2317
- 23.079491
2318
- ],
2319
- [
2320
- 9.809472,
2321
- 19.411568,
2322
- 24.800484
2323
- ],
2324
- [
2325
- 5.443604,
2326
- 9.035675,
2327
- 20.689081
2328
- ]
2329
- ],
2330
- [
2331
- [
2332
- 20.337191,
2333
- 26.222421,
2334
- 9.943712
2335
- ],
2336
- [
2337
- 8.411207,
2338
- 23.355638,
2339
- 6.573803
2340
- ],
2341
- [
2342
- 15.619377,
2343
- 20.247391,
2344
- 28.685325
2345
- ],
2346
- [
2347
- 11.261964,
2348
- 19.246868,
2349
- 34.981317
2350
- ],
2351
- [
2352
- 5.607065,
2353
- 6.648448,
2354
- 24.962298
2355
- ]
2356
- ],
2357
- [
2358
- [
2359
- 19.83569,
2360
- 30.459707,
2361
- 11.801344
2362
- ],
2363
- [
2364
- 8.387973,
2365
- 17.738708,
2366
- 5.843869
2367
- ],
2368
- [
2369
- 18.598992,
2370
- 18.432749,
2371
- 21.97011
2372
- ],
2373
- [
2374
- 13.082144,
2375
- 15.956465,
2376
- 33.167304
2377
- ],
2378
- [
2379
- 6.305486,
2380
- 8.037325,
2381
- 29.621248
2382
- ]
2383
- ],
2384
- [
2385
- [
2386
- 17.155385,
2387
- 29.770582,
2388
- 10.69244
2389
- ],
2390
- [
2391
- 8.493358,
2392
- 18.527741,
2393
- 8.228842
2394
- ],
2395
- [
2396
- 22.643645,
2397
- 19.975159,
2398
- 29.444978
2399
- ],
2400
- [
2401
- 10.88744,
2402
- 18.881485,
2403
- 27.104626
2404
- ],
2405
- [
2406
- 6.726267,
2407
- 7.2969,
2408
- 26.213281
2409
- ]
2410
- ],
2411
- [
2412
- [
2413
- 23.355886,
2414
- 21.70015,
2415
- 12.871575
2416
- ],
2417
- [
2418
- 11.03335,
2419
- 21.169706,
2420
- 6.625104
2421
- ],
2422
- [
2423
- 19.935007,
2424
- 18.916919,
2425
- 21.222605
2426
- ],
2427
- [
2428
- 10.798329,
2429
- 17.197354,
2430
- 25.018217
2431
- ],
2432
- [
2433
- 7.129762,
2434
- 7.628212,
2435
- 25.41077
2436
- ]
2437
- ],
2438
- [
2439
- [
2440
- 17.635511,
2441
- 25.847173,
2442
- 10.474786
2443
- ],
2444
- [
2445
- 10.474971,
2446
- 23.348781,
2447
- 6.292523
2448
- ],
2449
- [
2450
- 20.815955,
2451
- 21.273922,
2452
- 28.372903
2453
- ],
2454
- [
2455
- 12.445659,
2456
- 22.760854,
2457
- 27.035482
2458
- ],
2459
- [
2460
- 6.121788,
2461
- 9.373624,
2462
- 22.794483
2463
- ]
2464
- ],
2465
- [
2466
- [
2467
- 18.389638,
2468
- 24.711108,
2469
- 12.652077
2470
- ],
2471
- [
2472
- 9.047954,
2473
- 19.552001,
2474
- 6.329482
2475
- ],
2476
- [
2477
- 15.574404,
2478
- 19.194642,
2479
- 21.827523
2480
- ],
2481
- [
2482
- 11.303046,
2483
- 15.627294,
2484
- 26.925245
2485
- ],
2486
- [
2487
- 7.049914,
2488
- 7.055367,
2489
- 21.994242
2490
- ]
2491
- ],
2492
- [
2493
- [
2494
- 18.023574,
2495
- 21.108232,
2496
- 9.266457
2497
- ],
2498
- [
2499
- 9.378041,
2500
- 23.464083,
2501
- 5.886271
2502
- ],
2503
- [
2504
- 17.181894,
2505
- 21.657907,
2506
- 27.367088
2507
- ],
2508
- [
2509
- 11.80465,
2510
- 17.690115,
2511
- 34.192252
2512
- ],
2513
- [
2514
- 6.240683,
2515
- 9.214425,
2516
- 28.274267
2517
- ]
2518
- ],
2519
- [
2520
- [
2521
- 16.757637,
2522
- 23.610733,
2523
- 13.130968
2524
- ],
2525
- [
2526
- 10.327288,
2527
- 18.257323,
2528
- 5.618902
2529
- ],
2530
- [
2531
- 21.953534,
2532
- 21.437708,
2533
- 29.848328
2534
- ],
2535
- [
2536
- 10.814271,
2537
- 18.335777,
2538
- 28.197985
2539
- ],
2540
- [
2541
- 5.712099,
2542
- 8.252156,
2543
- 22.035806
2544
- ]
2545
- ],
2546
- [
2547
- [
2548
- 18.733659,
2549
- 28.030351,
2550
- 11.561055
2551
- ],
2552
- [
2553
- 9.519622,
2554
- 17.858416,
2555
- 8.357939
2556
- ],
2557
- [
2558
- 16.969929,
2559
- 25.017038,
2560
- 22.760342
2561
- ],
2562
- [
2563
- 11.448281,
2564
- 22.244428,
2565
- 31.283007
2566
- ],
2567
- [
2568
- 6.202923,
2569
- 9.383057,
2570
- 25.48381
2571
- ]
2572
- ],
2573
- [
2574
- [
2575
- 19.985316,
2576
- 22.660148,
2577
- 12.119375
2578
- ],
2579
- [
2580
- 10.815151,
2581
- 25.03909,
2582
- 5.92192
2583
- ],
2584
- [
2585
- 16.136594,
2586
- 18.035686,
2587
- 23.575829
2588
- ],
2589
- [
2590
- 10.763127,
2591
- 17.647381,
2592
- 28.854142
2593
- ],
2594
- [
2595
- 5.975523,
2596
- 8.559556,
2597
- 23.489562
2598
- ]
2599
- ],
2600
- [
2601
- [
2602
- 22.441876,
2603
- 27.27266,
2604
- 11.568113
2605
- ],
2606
- [
2607
- 10.455364,
2608
- 18.989775,
2609
- 7.045238
2610
- ],
2611
- [
2612
- 21.818615,
2613
- 22.572766,
2614
- 27.450794
2615
- ],
2616
- [
2617
- 9.355012,
2618
- 16.41994,
2619
- 34.946527
2620
- ],
2621
- [
2622
- 7.030976,
2623
- 7.922689,
2624
- 23.270659
2625
- ]
2626
- ],
2627
- [
2628
- [
2629
- 21.25931,
2630
- 30.681939,
2631
- 9.855506
2632
- ],
2633
- [
2634
- 8.674763,
2635
- 25.076134,
2636
- 6.861836
2637
- ],
2638
- [
2639
- 22.263097,
2640
- 20.332862,
2641
- 20.693745
2642
- ],
2643
- [
2644
- 13.048882,
2645
- 19.360113,
2646
- 30.12306
2647
- ],
2648
- [
2649
- 6.11329,
2650
- 7.834279,
2651
- 20.455954
2652
- ]
2653
- ],
2654
- [
2655
- [
2656
- 22.53888,
2657
- 22.28759,
2658
- 8.896351
2659
- ],
2660
- [
2661
- 11.447804,
2662
- 24.193348,
2663
- 7.377416
2664
- ],
2665
- [
2666
- 19.1417,
2667
- 23.277776,
2668
- 23.37668
2669
- ],
2670
- [
2671
- 13.022411,
2672
- 16.294257,
2673
- 25.281287
2674
- ],
2675
- [
2676
- 5.128956,
2677
- 9.050397,
2678
- 23.705357
2679
- ]
2680
- ],
2681
- [
2682
- [
2683
- 19.606759,
2684
- 24.791964,
2685
- 10.32278
2686
- ],
2687
- [
2688
- 11.520536,
2689
- 24.94705,
2690
- 6.920241
2691
- ],
2692
- [
2693
- 17.002275,
2694
- 18.467737,
2695
- 26.225139
2696
- ],
2697
- [
2698
- 9.41022,
2699
- 22.275714,
2700
- 35.098689
2701
- ],
2702
- [
2703
- 6.230219,
2704
- 8.036726,
2705
- 24.481999
2706
- ]
2707
- ],
2708
- [
2709
- [
2710
- 20.600255,
2711
- 21.213178,
2712
- 10.881561
2713
- ],
2714
- [
2715
- 11.168727,
2716
- 20.712129,
2717
- 7.084809
2718
- ],
2719
- [
2720
- 19.644208,
2721
- 20.904682,
2722
- 26.004864
2723
- ],
2724
- [
2725
- 9.96152,
2726
- 20.021403,
2727
- 31.910283
2728
- ],
2729
- [
2730
- 4.879636,
2731
- 8.506981,
2732
- 25.889023
2733
- ]
2734
- ],
2735
- [
2736
- [
2737
- 18.639414,
2738
- 25.504057,
2739
- 9.671248
2740
- ],
2741
- [
2742
- 11.957352,
2743
- 17.665364,
2744
- 7.508562
2745
- ],
2746
- [
2747
- 18.305132,
2748
- 18.429783,
2749
- 21.865461
2750
- ],
2751
- [
2752
- 10.756786,
2753
- 22.413233,
2754
- 28.902336
2755
- ],
2756
- [
2757
- 5.077412,
2758
- 9.350368,
2759
- 25.550884
2760
- ]
2761
- ],
2762
- [
2763
- [
2764
- 23.600003,
2765
- 22.584706,
2766
- 12.212131
2767
- ],
2768
- [
2769
- 11.444732,
2770
- 20.043203,
2771
- 6.225571
2772
- ],
2773
- [
2774
- 21.008514,
2775
- 19.675328,
2776
- 21.218579
2777
- ],
2778
- [
2779
- 11.73962,
2780
- 21.881932,
2781
- 24.677596
2782
- ],
2783
- [
2784
- 7.019229,
2785
- 9.091564,
2786
- 28.418111
2787
- ]
2788
- ],
2789
- [
2790
- [
2791
- 16.827397,
2792
- 26.600519,
2793
- 8.914237
2794
- ],
2795
- [
2796
- 11.043337,
2797
- 23.499329,
2798
- 7.651493
2799
- ],
2800
- [
2801
- 18.267243,
2802
- 17.722578,
2803
- 20.121763
2804
- ],
2805
- [
2806
- 8.858387,
2807
- 19.215426,
2808
- 26.071037
2809
- ],
2810
- [
2811
- 6.097644,
2812
- 9.251848,
2813
- 24.812155
2814
- ]
2815
- ],
2816
- [
2817
- [
2818
- 19.918051,
2819
- 28.517758,
2820
- 12.311322
2821
- ],
2822
- [
2823
- 10.021636,
2824
- 17.676278,
2825
- 6.41911
2826
- ],
2827
- [
2828
- 21.785398,
2829
- 18.429855,
2830
- 28.936594
2831
- ],
2832
- [
2833
- 10.056088,
2834
- 19.11205,
2835
- 35.296802
2836
- ],
2837
- [
2838
- 5.72634,
2839
- 9.222607,
2840
- 23.556322
2841
- ]
2842
- ],
2843
- [
2844
- [
2845
- 19.269334,
2846
- 23.181854,
2847
- 10.019495
2848
- ],
2849
- [
2850
- 8.654206,
2851
- 21.892915,
2852
- 7.23683
2853
- ],
2854
- [
2855
- 17.834691,
2856
- 23.022512,
2857
- 21.740847
2858
- ],
2859
- [
2860
- 9.289174,
2861
- 19.905717,
2862
- 27.427386
2863
- ],
2864
- [
2865
- 5.209873,
2866
- 7.224132,
2867
- 24.714571
2868
- ]
2869
- ],
2870
- [
2871
- [
2872
- 23.261977,
2873
- 21.380169,
2874
- 11.470606
2875
- ],
2876
- [
2877
- 8.89658,
2878
- 24.251416,
2879
- 6.244002
2880
- ],
2881
- [
2882
- 15.676732,
2883
- 23.419574,
2884
- 26.93245
2885
- ],
2886
- [
2887
- 10.656749,
2888
- 16.319758,
2889
- 32.46456
2890
- ],
2891
- [
2892
- 5.818057,
2893
- 7.125254,
2894
- 27.220759
2895
- ]
2896
- ],
2897
- [
2898
- [
2899
- 22.267001,
2900
- 26.538347,
2901
- 12.077231
2902
- ],
2903
- [
2904
- 10.914741,
2905
- 24.080561,
2906
- 7.473134
2907
- ],
2908
- [
2909
- 21.413661,
2910
- 17.010762,
2911
- 26.317682
2912
- ],
2913
- [
2914
- 13.062334,
2915
- 20.589836,
2916
- 35.854779
2917
- ],
2918
- [
2919
- 4.905431,
2920
- 7.578716,
2921
- 27.008087
2922
- ]
2923
- ],
2924
- [
2925
- [
2926
- 23.124858,
2927
- 23.731765,
2928
- 9.094079
2929
- ],
2930
- [
2931
- 8.363234,
2932
- 24.913982,
2933
- 5.767383
2934
- ],
2935
- [
2936
- 22.23629,
2937
- 18.72162,
2938
- 23.065234
2939
- ],
2940
- [
2941
- 10.47543,
2942
- 22.14739,
2943
- 30.177238
2944
- ],
2945
- [
2946
- 7.105615,
2947
- 7.894021,
2948
- 27.594897
2949
- ]
2950
- ]
2951
- ],
2952
- "generation_seed": 1653,
2953
- "generation_attempt": 0
2954
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
adulyasak2015/instance_schema.json DELETED
@@ -1,21 +0,0 @@
1
- {
2
- "n": "<int> Number of customers to be served.",
3
- "T": "<int> Number of time periods in the planning horizon.",
4
- "m": "<int> Number of identical vehicles available at the plant.",
5
- "Q": "<int> Maximum load capacity of each vehicle.",
6
- "C": "<int> Maximum production quantity at the plant per period.",
7
- "f": "<float> Fixed cost incurred whenever production takes place in a period.",
8
- "u": "<float> Cost per unit of product produced at the plant.",
9
- "epsilon": "<float> Half-width of the demand uncertainty interval as a fraction of nominal demand.",
10
- "alpha_hat": "<int> Multiplier used to compute the per-unit penalty cost for unmet customer demand.",
11
- "coordinates": "<list[list[float]], shape [n+1][2]> Spatial coordinates of each node, where index 0 is the plant and indices 1 through n are customers.",
12
- "transportation_costs": "<list[list[float]], shape [n+1][n+1]> Symmetric travel cost between each pair of nodes, where index 0 is the plant.",
13
- "h": "<list[float], length n+1> Per-unit inventory holding cost at each node per period, where index 0 is the plant.",
14
- "L": "<list[int], length n+1> Maximum inventory storage capacity at each node, where index 0 is the plant.",
15
- "I0": "<list[int], length n+1> Inventory on hand at each node at the start of the planning horizon, where index 0 is the plant.",
16
- "d_bar": "<list[list[int]], shape [n][T]> Nominal (expected) demand for each customer in each period.",
17
- "sigma": "<list[float], length n> Per-unit penalty cost for unmet demand at each customer.",
18
- "n_scenarios": "<int> Number of demand scenarios considered.",
19
- "scenario_probabilities": "<list[float], length n_scenarios> Probability of each demand scenario being realized.",
20
- "demand_scenarios": "<list[list[list[float]]], shape [n_scenarios][n][T]> Realized demand for each customer in each period under each scenario."
21
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
adulyasak2015/mathematical_formulation.md DELETED
@@ -1,109 +0,0 @@
1
- # Original Formulation: Stochastic Production Routing Problem (SPRP)
2
-
3
- *Source: Benders Decomposition for Production Routing Under Demand Uncertainty, Yossiri Adulyasak, Jean-François Cordeau, Raf Jans, Operations Research, 2015.*
4
-
5
- The paper studies the Stochastic Production Routing Problem (SPRP). The canonical model below is the *two-stage SPRP formulation (2-BF)*, Model (1)–(19), introduced first in §2.2 as the definition of the problem; its notation $(x,y,z,p,I,q,e)$ is carried into every subsequent section. The multistage variant (M-BF, adding nonanticipativity constraints (20)–(23)) is given under Variants.
6
-
7
- ## Sets and Indices
8
-
9
- $$\begin{align*}
10
- &\Omega && \text{finite set of demand scenarios, indexed by } \omega\\
11
- &G=(N,E) && \text{complete undirected graph}\\
12
- &N=\{0,\ldots,n\} && \text{set of nodes; node } 0 \text{ is the production plant}\\
13
- &N_c=N\setminus\{0\} && \text{set of customers}\\
14
- &E=\{(i,j): i,j\in N,\ i<j\} && \text{set of edges}\\
15
- &E(S) && \{(i,j)\in E : i,j\in S\},\ \text{for } S\subseteq N\\
16
- &\delta(S) && \{(i,j)\in E : i\in S,\ j\notin S,\ \text{or}\ i\notin S,\ j\in S\}\\
17
- &\delta(i) && \delta(\{i\}),\ \text{edges incident to node } i\\
18
- &T=\{1,\ldots,l\} && \text{set of time periods}\\
19
- &K=\{1,\ldots,m\} && \text{set of identical vehicles}
20
- \end{align*}$$
21
-
22
- ## Parameters
23
-
24
- $$\begin{align*}
25
- &\rho_\omega && \text{probability of scenario } \omega\in\Omega\\
26
- &d_{it\omega} && \text{demand of customer } i \text{ in period } t \text{ under scenario } \omega\\
27
- &\sigma_i && \text{unit penalty cost for unmet demand at customer } i\\
28
- &L_i && \text{maximum inventory level at customer } i\\
29
- &L_0 && \text{maximum inventory level at the plant}\\
30
- &I_{i0} && \text{initial inventory at node } i\ (I_{00\omega}=I_0\ \forall\omega)\\
31
- &C && \text{production capacity per period}\\
32
- &u && \text{unit production cost}\\
33
- &f && \text{fixed production setup cost}\\
34
- &Q && \text{vehicle capacity}\\
35
- &c_{ij} && \text{transportation cost between nodes } i \text{ and } j\\
36
- &h_i && \text{unit inventory holding cost at node } i\\
37
- &M_{t\omega} && \min\Big\{C,\,Q,\,\textstyle\sum_{j=t}^{l}\sum_{i\in N_c} d_{ij\omega}\Big\}\\
38
- &M'_{it\omega} && \min\Big\{L_i,\,Q,\,\textstyle\sum_{j=t}^{l} d_{ij\omega}\Big\}
39
- \end{align*}$$
40
-
41
- ## Decision Variables
42
-
43
- $$\begin{align*}
44
- &y_t\in\{0,1\} && 1 \text{ if production takes place in period } t\\
45
- &z_{ikt}\in\{0,1\} && 1 \text{ if node } i \text{ is visited by vehicle } k \text{ in period } t\\
46
- &x_{ijkt} && \text{number of times vehicle } k \text{ travels directly between } i \text{ and } j \text{ in period } t\\
47
- &p_{t\omega}\ge 0 && \text{production quantity in period } t \text{ under scenario } \omega\\
48
- &I_{it\omega}\ge 0 && \text{inventory at node } i \text{ at end of period } t \text{ under scenario } \omega\\
49
- &q_{ikt\omega}\ge 0 && \text{quantity delivered to customer } i \text{ by vehicle } k \text{ in period } t \text{ (scenario } \omega)\\
50
- &e_{it\omega}\ge 0 && \text{unmet demand at customer } i \text{ in period } t \text{ under scenario } \omega
51
- \end{align*}$$
52
-
53
- ## Objective
54
-
55
- $$\begin{equation}
56
- \min \sum_{t\in T}\left( f\,y_t + \sum_{(i,j)\in E}\sum_{k\in K} c_{ij}\,x_{ijkt}
57
- + \sum_{\omega\in\Omega} \rho_\omega\left( u\,p_{t\omega}
58
- + \sum_{i\in N} h_i\,I_{it\omega}
59
- + \sum_{i\in N_c} \sigma_i\,e_{it\omega} \right) \right)
60
- \tag{1}
61
- \end{equation}$$
62
-
63
- ## Constraints
64
-
65
- $$\begin{align}
66
- & I_{0,t-1,\omega} + p_{t\omega}
67
- = \sum_{i\in N_c}\sum_{k\in K} q_{ikt\omega} + I_{0t\omega}
68
- && \forall t\in T,\ \forall \omega\in\Omega \tag{2}\\[2pt]
69
- & I_{i,t-1,\omega} + \sum_{k\in K} q_{ikt\omega} + e_{it\omega}
70
- = d_{it\omega} + I_{it\omega}
71
- && \forall i\in N_c,\ \forall t\in T,\ \forall \omega\in\Omega \tag{3}\\[2pt]
72
- & I_{0t\omega} \le L_0
73
- && \forall t\in T,\ \forall \omega\in\Omega \tag{4}\\[2pt]
74
- & I_{it\omega} + d_{it\omega} \le L_i
75
- && \forall i\in N_c,\ \forall t\in T,\ \forall \omega\in\Omega \tag{5}\\[2pt]
76
- & p_{t\omega} \le M_{t\omega}\,y_t
77
- && \forall t\in T,\ \forall \omega\in\Omega \tag{6}\\[2pt]
78
- & \sum_{i\in N_c} q_{ikt\omega} \le Q\,z_{0kt}
79
- && \forall k\in K,\ \forall t\in T,\ \forall \omega\in\Omega \tag{7}\\[2pt]
80
- & q_{ikt\omega} \le M'_{it\omega}\,z_{ikt}
81
- && \forall i\in N_c,\ \forall k\in K,\ \forall t\in T,\ \forall \omega\in\Omega \tag{8}\\[2pt]
82
- & \sum_{k\in K} z_{ikt} \le 1
83
- && \forall i\in N_c,\ \forall t\in T \tag{9}\\[2pt]
84
- & \sum_{(j,j')\in\delta(i)} x_{jj'kt} = 2\,z_{ikt}
85
- && \forall i\in N,\ \forall k\in K,\ \forall t\in T \tag{10}\\[2pt]
86
- & \sum_{(i,j)\in E(S)} x_{ijkt} \le \sum_{i\in S} z_{ikt} - z_{ekt}
87
- && \forall S\subseteq N_c:\ |S|\ge 2,\ \forall e\in S,\ \forall k\in K,\ \forall t\in T \tag{11}\\[2pt]
88
- & e_{it\omega},\ p_{t\omega},\ I_{it\omega},\ q_{ikt\omega} \ge 0
89
- && \forall i\in N,\ \forall k\in K,\ \forall t\in T,\ \forall \omega\in\Omega \tag{12}\\[2pt]
90
- & y_t,\ z_{ikt} \in \{0,1\}
91
- && \forall i\in N,\ \forall k\in K,\ \forall t\in T \tag{13}\\[2pt]
92
- & x_{ijkt} \in \{0,1\}
93
- && \forall (i,j)\in E:\ i\neq 0,\ \forall k\in K,\ \forall t\in T \tag{14}\\[2pt]
94
- & x_{0jkt} \in \{0,1,2\}
95
- && \forall j\in N_c,\ \forall k\in K,\ \forall t\in T \tag{15}
96
- \end{align}$$
97
-
98
- *Strengthening inequalities included by the paper inside the definition of Model (1)–(19) (2-BF): routing-strengthening (16)–(17) and vehicle symmetry-breaking (18)–(19).* $$\begin{align}
99
- & z_{ikt} \le z_{0kt}
100
- && \forall i\in N_c,\ \forall k\in K,\ \forall t\in T \tag{16}\\[2pt]
101
- & x_{ijkt} \le z_{ikt}\quad\text{and}\quad x_{ijkt} \le z_{jkt}
102
- && \forall (i,j)\in E(N_c),\ \forall k\in K,\ \forall t\in T \tag{17}\\[2pt]
103
- & z_{0kt} \ge z_{0,k+1,t}
104
- && \forall\, 1\le k\le m-1,\ \forall t\in T \tag{18}\\[2pt]
105
- & \sum_{i=1}^{j} 2^{(j-i)}\,z_{ikt} \ge \sum_{i=1}^{j} 2^{(j-i)}\,z_{i,k+1,t}
106
- && \forall j\in N_c,\ \forall\, 1\le k\le m-1,\ \forall t\in T \tag{19}
107
- \end{align}$$
108
-
109
- Model (1)–(19) is referred to as the **2-BF**.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
adulyasak2015/problem_description.txt DELETED
@@ -1,9 +0,0 @@
1
- # Problem Description
2
-
3
- A production plant manufactures a single product and distributes it to a set of customers over a discrete, finite planning horizon of multiple time periods. A fleet of identical capacitated vehicles, each with the same load capacity, is available at the plant to make deliveries. The plant and each customer have a known initial inventory at the start of the horizon, a per-unit inventory holding cost, and a maximum inventory capacity. The plant has a maximum production capacity per period, a unit production cost, and a fixed setup cost that is incurred in any period in which production takes place. Each customer has a known demand in each period (which may be uncertain and described by a set of scenarios with known probabilities) and a per-unit penalty cost for demand that is left unmet. The transportation cost of moving a vehicle directly between any two locations (plant or customer) is known and symmetric.
4
-
5
- In each period, the company decides whether to set up production at the plant, how much to produce, which customers each vehicle will visit, the delivery quantity from each vehicle to each visited customer, the route each dispatched vehicle follows starting and ending at the plant, and the resulting end-of-period inventory at the plant and at each customer. A customer may be visited by at most one vehicle per period. Production may occur in a period only if a setup has been performed in that period, and the production quantity cannot exceed the plant's production capacity. The plant's inventory balance requires that the inventory carried from the previous period plus the quantity produced equals the total quantity shipped to customers plus the inventory remaining at the plant; the remaining inventory cannot exceed the plant's storage capacity. Each customer's inventory balance requires that the inventory carried from the previous period plus the total quantity delivered plus any unmet demand equals the demand in that period plus the remaining inventory, and the ending inventory plus the period's demand cannot exceed the customer's storage capacity (deliveries arrive before demand is consumed).
6
-
7
- The total quantity loaded onto any vehicle in a period cannot exceed the vehicle capacity, and a vehicle can deliver to a customer only if it visits that customer on its route in that period. The delivery quantity to a customer from a vehicle is bounded by the customer's remaining storage capacity and by the customer's future demand from that period onward. Each vehicle route must start and end at the plant and form a single tour through its assigned customers.
8
-
9
- When demands are uncertain, the setup, visit, and routing decisions must be fixed before demand realizations are observed, while the production, delivery, inventory, and unmet-demand quantities may adapt to the realized demand information available up to that period. The objective is to minimize the total expected cost over the planning horizon: the fixed setup costs, the transportation costs of all routes operated, the unit production costs, the inventory holding costs at the plant and at all customers, and the penalty costs for unmet demand, with scenario-dependent cost components weighted by their probabilities.
 
 
 
 
 
 
 
 
 
 
adulyasak2015/solution_logger.py DELETED
@@ -1,61 +0,0 @@
1
- """
2
- Convergence logger for optimization algorithms.
3
-
4
- Records incumbent solutions with timestamps to a JSONL file.
5
- This module is provided to LLM-generated programs — they only need to call
6
- `log(objective_value)` whenever a better feasible solution is found.
7
-
8
- Usage in generated code:
9
- from solution_logger import SolutionLogger
10
- logger = SolutionLogger(log_path, sense="minimize") # or "maximize"
11
- # ... inside algorithm loop:
12
- logger.log(objective_value)
13
- """
14
-
15
- import json
16
- import time
17
-
18
-
19
- class SolutionLogger:
20
- def __init__(self, log_path, sense="minimize"):
21
- """
22
- Args:
23
- log_path: Path to the JSONL output file.
24
- sense: "minimize" or "maximize".
25
- """
26
- self.log_path = log_path
27
- self.sense = sense
28
- self.start_time = time.time()
29
- self.best_obj = None
30
- self.min_interval = 0.1 # seconds, avoid excessive writes
31
-
32
- self._last_log_time = 0.0
33
- # Clear the file
34
- with open(self.log_path, "w") as f:
35
- pass
36
-
37
- def log(self, objective_value):
38
- """Record a new incumbent if it improves on the best known."""
39
- if objective_value is None:
40
- return
41
-
42
- # Check if this is an improvement
43
- if self.best_obj is not None:
44
- if self.sense == "minimize" and objective_value >= self.best_obj:
45
- return
46
- if self.sense == "maximize" and objective_value <= self.best_obj:
47
- return
48
-
49
- elapsed = time.time() - self.start_time
50
-
51
- # Throttle writes
52
- if self.best_obj is not None and elapsed - self._last_log_time < self.min_interval:
53
- self.best_obj = objective_value
54
- return
55
-
56
- self.best_obj = objective_value
57
- self._last_log_time = elapsed
58
-
59
- with open(self.log_path, "a") as f:
60
- f.write(json.dumps({"time": round(elapsed, 3),
61
- "objective_value": objective_value}) + "\n")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
adulyasak2015/solution_schema.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "objective_value": "<float> Total expected cost including setup costs, transportation costs, production costs, holding costs, and unmet demand penalties.",
3
- "y": "<dict, key: '{period}'> Whether production is set up at the plant in each period (1 = yes, 0 = no).",
4
- "z": "<dict, key: '{node}_{vehicle}_{period}'> Whether a node is visited by a vehicle in a given period (1 = yes), where node 0 indicates the vehicle is dispatched from the plant.",
5
- "x": "<dict, key: '{node_i}_{node_j}_{vehicle}_{period}'> Number of times the edge between two nodes is traversed by a vehicle in a given period (1 for customer-customer edges, up to 2 for plant-customer edges)."
6
- }
 
 
 
 
 
 
 
alba2013/feasibility_check.py DELETED
@@ -1,466 +0,0 @@
1
- #!/usr/bin/env python3
2
- """
3
- Feasibility checker for the Double Traveling Salesman Problem with Multiple Stacks (DTSPMS).
4
-
5
- Checks constraints from the mathematical formulation (Alba Martinez et al. 2013):
6
- Constraint 1 (Eq 2): Out-degree assignment — each vertex has exactly one successor in each tour.
7
- Constraint 2 (Eq 3): In-degree assignment — each vertex has exactly one predecessor in each tour.
8
- Constraint 3 (Eq 4): Subtour elimination — each tour is a single Hamiltonian cycle.
9
- Constraint 4 (Eq 5): Binary domain — x variables are 0 or 1.
10
- Constraint 5 (Eq 6): Loading feasibility — LIFO constraint across stacks linking pickup/delivery tours.
11
- Constraint 6 (Eq 1): Objective consistency — reported objective_value must equal the recomputed
12
- total routing cost (pickup distance + delivery distance) summed over the tours.
13
-
14
- Constraints 7-10 are strengthened valid inequalities (cuts) implied by constraint 5 and are not
15
- checked separately.
16
- """
17
-
18
- import argparse
19
- import json
20
- from collections import defaultdict
21
-
22
-
23
- def load_json(path):
24
- with open(path, 'r') as f:
25
- return json.load(f)
26
-
27
-
28
- def build_x_from_tour(tour, n):
29
- """
30
- Build the x variable dictionary from a tour sequence.
31
- tour is a list of vertices [v0, v1, ..., v_{n}] representing the order of visit.
32
- The tour is a cycle: v_{n} -> v0 is implied.
33
- Returns dict {(i,j): 1} for arcs used.
34
- """
35
- x = {}
36
- for idx in range(len(tour)):
37
- i = tour[idx]
38
- j = tour[(idx + 1) % len(tour)]
39
- x[(i, j)] = 1
40
- return x
41
-
42
-
43
- def check_feasibility(instance, solution):
44
- tol = 1e-5
45
- eps = 1e-5
46
-
47
- n = instance['parameters']['num_requests_n']
48
- s = instance['parameters']['num_stacks_s']
49
- l_cap = instance['parameters']['stack_height_l']
50
-
51
- V = list(range(n + 1)) # {0, 1, ..., n}
52
-
53
- pickup_tour = solution['pickup_tour']
54
- delivery_tour = solution['delivery_tour']
55
-
56
- violations = []
57
- violation_magnitudes = []
58
- violated_constraint_set = set()
59
-
60
- # Build x variables from tours
61
- x_P = build_x_from_tour(pickup_tour, n)
62
- x_D = build_x_from_tour(delivery_tour, n)
63
-
64
- # =========================================================================
65
- # Constraint 1 (Eq 2): Out-degree — sum_j x^T_{ij} = 1 for each i in V^T
66
- # =========================================================================
67
- for label, x_vals, tour in [("pickup", x_P, pickup_tour), ("delivery", x_D, delivery_tour)]:
68
- for i in V:
69
- out_sum = sum(v for (a, b), v in x_vals.items() if a == i)
70
- rhs = 1.0
71
- violation_amount = abs(out_sum - rhs)
72
- if violation_amount > tol:
73
- normalizer = max(abs(rhs), eps)
74
- violated_constraint_set.add(1)
75
- violations.append(
76
- f"Constraint 1 (out-degree): Vertex {i} in {label} tour has "
77
- f"out-degree {out_sum}, expected 1"
78
- )
79
- violation_magnitudes.append({
80
- "constraint": 1,
81
- "lhs": float(out_sum),
82
- "rhs": float(rhs),
83
- "raw_excess": float(violation_amount),
84
- "normalizer": float(normalizer),
85
- "ratio": float(violation_amount / normalizer)
86
- })
87
-
88
- # =========================================================================
89
- # Constraint 2 (Eq 3): In-degree — sum_i x^T_{ij} = 1 for each j in V^T
90
- # =========================================================================
91
- for label, x_vals, tour in [("pickup", x_P, pickup_tour), ("delivery", x_D, delivery_tour)]:
92
- for j in V:
93
- in_sum = sum(v for (a, b), v in x_vals.items() if b == j)
94
- rhs = 1.0
95
- violation_amount = abs(in_sum - rhs)
96
- if violation_amount > tol:
97
- normalizer = max(abs(rhs), eps)
98
- violated_constraint_set.add(2)
99
- violations.append(
100
- f"Constraint 2 (in-degree): Vertex {j} in {label} tour has "
101
- f"in-degree {in_sum}, expected 1"
102
- )
103
- violation_magnitudes.append({
104
- "constraint": 2,
105
- "lhs": float(in_sum),
106
- "rhs": float(rhs),
107
- "raw_excess": float(violation_amount),
108
- "normalizer": float(normalizer),
109
- "ratio": float(violation_amount / normalizer)
110
- })
111
-
112
- # =========================================================================
113
- # Constraint 3 (Eq 4): Subtour elimination — tour must be a single cycle
114
- # visiting all vertices (i.e., a Hamiltonian cycle on V^T).
115
- # We check: (a) tour visits all n+1 vertices, (b) no repeated vertices,
116
- # (c) forms a single connected cycle.
117
- # =========================================================================
118
- for label, tour in [("pickup", pickup_tour), ("delivery", delivery_tour)]:
119
- tour_set = set(tour)
120
- v_set = set(V)
121
-
122
- # Check all vertices are visited
123
- missing = v_set - tour_set
124
- extra = tour_set - v_set
125
- repeated = len(tour) - len(tour_set)
126
-
127
- if missing:
128
- # The tour doesn't visit all vertices => subtours exist
129
- # Violation: the tour only covers |tour_set| vertices out of n+1
130
- # This means at least one subtour exists among the missing vertices
131
- # For the subtour constraint: sum_{i in S, j in S} x_{ij} <= |S| - 1
132
- # If S = tour_set (without depot potentially), a subtour of size |S|
133
- # uses |S| arcs inside S, violating |S| - 1 bound by 1
134
- violation_amount = 1.0 # at minimum one extra arc in subtour
135
- rhs_val = len(tour_set) - 1.0 if len(tour_set) >= 2 else 0.0
136
- lhs_val = rhs_val + 1.0 # subtour uses |S| arcs = |S|-1+1
137
- normalizer = max(abs(rhs_val), eps)
138
- violated_constraint_set.add(3)
139
- violations.append(
140
- f"Constraint 3 (subtour elimination): {label} tour missing vertices "
141
- f"{sorted(missing)}; tour has subtour(s)"
142
- )
143
- violation_magnitudes.append({
144
- "constraint": 3,
145
- "lhs": float(lhs_val),
146
- "rhs": float(rhs_val),
147
- "raw_excess": float(violation_amount),
148
- "normalizer": float(normalizer),
149
- "ratio": float(violation_amount / normalizer)
150
- })
151
-
152
- if repeated > 0:
153
- violation_amount = float(repeated)
154
- rhs_val = float(n + 1) # expected number of unique vertices
155
- lhs_val = float(len(tour)) # actual tour length
156
- normalizer = max(abs(rhs_val), eps)
157
- violated_constraint_set.add(3)
158
- violations.append(
159
- f"Constraint 3 (subtour elimination): {label} tour has {repeated} "
160
- f"repeated vertex visit(s); tour length {len(tour)} but only "
161
- f"{len(tour_set)} unique vertices"
162
- )
163
- violation_magnitudes.append({
164
- "constraint": 3,
165
- "lhs": float(lhs_val),
166
- "rhs": float(rhs_val),
167
- "raw_excess": float(violation_amount),
168
- "normalizer": float(normalizer),
169
- "ratio": float(violation_amount / normalizer)
170
- })
171
-
172
- if extra:
173
- violated_constraint_set.add(3)
174
- violations.append(
175
- f"Constraint 3 (subtour elimination): {label} tour visits invalid "
176
- f"vertices {sorted(extra)} not in V^T"
177
- )
178
- violation_magnitudes.append({
179
- "constraint": 3,
180
- "lhs": float(len(extra)),
181
- "rhs": 0.0,
182
- "raw_excess": float(len(extra)),
183
- "normalizer": eps,
184
- "ratio": float(len(extra) / eps)
185
- })
186
-
187
- # Check single-cycle property (no disconnected subtours)
188
- if not missing and not extra and repeated == 0:
189
- # Build adjacency from tour
190
- adj = {}
191
- for idx in range(len(tour)):
192
- adj[tour[idx]] = tour[(idx + 1) % len(tour)]
193
- # Follow from depot
194
- visited = set()
195
- current = 0
196
- while current not in visited:
197
- visited.add(current)
198
- current = adj.get(current, -1)
199
- if len(visited) < len(V):
200
- # Multiple cycles detected
201
- num_subtours = 0
202
- remaining = set(V) - visited
203
- while remaining:
204
- start = next(iter(remaining))
205
- cycle = set()
206
- cur = start
207
- while cur not in cycle:
208
- cycle.add(cur)
209
- cur = adj.get(cur, -1)
210
- remaining -= cycle
211
- num_subtours += 1
212
-
213
- violation_amount = float(num_subtours)
214
- rhs_val = 0.0
215
- normalizer = eps
216
- violated_constraint_set.add(3)
217
- violations.append(
218
- f"Constraint 3 (subtour elimination): {label} tour has "
219
- f"{num_subtours + 1} disconnected cycle(s) instead of 1"
220
- )
221
- violation_magnitudes.append({
222
- "constraint": 3,
223
- "lhs": float(num_subtours + 1),
224
- "rhs": 1.0,
225
- "raw_excess": float(num_subtours),
226
- "normalizer": max(1.0, eps),
227
- "ratio": float(num_subtours / max(1.0, eps))
228
- })
229
-
230
- # =========================================================================
231
- # Constraint 4 (Eq 5): Binary domain — x^T_{ij} in {0,1}
232
- # Also: x^T_{ii} = 0 (variable fixing from comment 4)
233
- # =========================================================================
234
- for label, x_vals in [("pickup", x_P), ("delivery", x_D)]:
235
- for (i, j), val in x_vals.items():
236
- if val not in (0, 1):
237
- violation_amount = min(abs(val - 0), abs(val - 1))
238
- if violation_amount > tol:
239
- violated_constraint_set.add(4)
240
- violations.append(
241
- f"Constraint 4 (binary domain): x^{label[0].upper()}"
242
- f"_{{{i},{j}}} = {val}, not binary"
243
- )
244
- violation_magnitudes.append({
245
- "constraint": 4,
246
- "lhs": float(val),
247
- "rhs": 1.0,
248
- "raw_excess": float(violation_amount),
249
- "normalizer": max(1.0, eps),
250
- "ratio": float(violation_amount / max(1.0, eps))
251
- })
252
- if i == j and val > tol:
253
- violated_constraint_set.add(4)
254
- violations.append(
255
- f"Constraint 4 (binary domain): Self-loop x^{label[0].upper()}"
256
- f"_{{{i},{i}}} = {val}, must be 0"
257
- )
258
- violation_magnitudes.append({
259
- "constraint": 4,
260
- "lhs": float(val),
261
- "rhs": 0.0,
262
- "raw_excess": float(val),
263
- "normalizer": eps,
264
- "ratio": float(val / eps)
265
- })
266
-
267
- # =========================================================================
268
- # Constraint 5 (Eq 6): Loading feasibility — LIFO constraint
269
- # For a given pickup tour order and delivery tour order, there must exist
270
- # a feasible assignment of items to s stacks (each with capacity l) such
271
- # that LIFO is respected: if item i is picked up before item j and both
272
- # are in the same stack, then j must be delivered before i.
273
- # =========================================================================
274
- # Extract customer ordering from tours (exclude depot 0)
275
- p_customers = [v for v in pickup_tour if v != 0]
276
- d_customers = [v for v in delivery_tour if v != 0]
277
-
278
- # Check basic: both should contain exactly the customer set {1..n}
279
- p_set = set(p_customers)
280
- d_set = set(d_customers)
281
- expected_customers = set(range(1, n + 1))
282
-
283
- if p_set != expected_customers or d_set != expected_customers:
284
- # Already caught by constraints 1-3, but note for loading
285
- pass
286
- else:
287
- # Build position maps
288
- p_pos = {v: i for i, v in enumerate(p_customers)}
289
- d_pos = {v: i for i, v in enumerate(d_customers)}
290
-
291
- # Try to assign items to stacks respecting LIFO
292
- # Use backtracking to check feasibility
293
- items_in_pickup_order = list(p_customers) # items in pickup order
294
-
295
- feasible = _check_loading_feasibility(items_in_pickup_order, p_pos, d_pos, s, l_cap)
296
-
297
- if not feasible:
298
- # Compute violation: the loading is infeasible
299
- # For the path constraint (6): LHS = |A(Q)| + |A(F)|, RHS = |A(Q)| + |A(F)| - 1
300
- # With Q = full pickup path, F = full delivery path
301
- q = len(p_customers) # arcs in pickup path
302
- f = len(d_customers) # arcs in delivery path
303
- lhs_val = float(q + f) # all arcs are used (integer solution)
304
- rhs_val = float(q + f - 1)
305
- violation_amount = lhs_val - rhs_val # = 1.0
306
- normalizer = max(abs(rhs_val), eps)
307
- violated_constraint_set.add(5)
308
- violations.append(
309
- f"Constraint 5 (loading feasibility): No feasible LIFO loading exists "
310
- f"for the given pickup order {pickup_tour} and delivery order "
311
- f"{delivery_tour} with {s} stack(s) of capacity {l_cap}"
312
- )
313
- violation_magnitudes.append({
314
- "constraint": 5,
315
- "lhs": float(lhs_val),
316
- "rhs": float(rhs_val),
317
- "raw_excess": float(violation_amount),
318
- "normalizer": float(normalizer),
319
- "ratio": float(violation_amount / normalizer)
320
- })
321
-
322
- # =========================================================================
323
- # Constraint 6 (Eq 1): Objective consistency — reported objective_value must
324
- # equal recomputed total routing cost (sum of pickup arc costs + sum of
325
- # delivery arc costs). All variables that determine the obj (pickup_tour,
326
- # delivery_tour) are in the solution, so a full recompute is exact.
327
- # Tier C defense against LLM solutions that fabricate objective_value.
328
- # =========================================================================
329
- reported_obj_raw = solution.get("objective_value")
330
- pickup_dm = instance.get("pickup_region", {}).get("distance_matrix")
331
- delivery_dm = instance.get("delivery_region", {}).get("distance_matrix")
332
- if reported_obj_raw is not None and pickup_dm is not None and delivery_dm is not None:
333
- try:
334
- reported_obj = float(reported_obj_raw)
335
- except (TypeError, ValueError):
336
- reported_obj = None
337
- if reported_obj is not None:
338
- try:
339
- pickup_cost = sum(
340
- float(pickup_dm[pickup_tour[i]][pickup_tour[(i + 1) % len(pickup_tour)]])
341
- for i in range(len(pickup_tour))
342
- )
343
- delivery_cost = sum(
344
- float(delivery_dm[delivery_tour[i]][delivery_tour[(i + 1) % len(delivery_tour)]])
345
- for i in range(len(delivery_tour))
346
- )
347
- true_obj = pickup_cost + delivery_cost
348
- except (IndexError, TypeError, ValueError):
349
- true_obj = None
350
-
351
- if true_obj is not None:
352
- abs_diff = abs(reported_obj - true_obj)
353
- # 0.1% relative tolerance with 1e-3 absolute floor.
354
- obj_tol = max(1e-3, 1e-3 * abs(true_obj))
355
- if abs_diff > obj_tol:
356
- normalizer = max(abs(true_obj), eps)
357
- violated_constraint_set.add(6)
358
- violations.append(
359
- f"Constraint 6 (objective consistency): reported objective_value="
360
- f"{reported_obj} differs from recomputed pickup_cost+delivery_cost="
361
- f"{true_obj} (|diff|={abs_diff:.6g}, tol={obj_tol:.6g})"
362
- )
363
- violation_magnitudes.append({
364
- "constraint": 6,
365
- "lhs": float(reported_obj),
366
- "rhs": float(true_obj),
367
- "raw_excess": float(abs_diff),
368
- "normalizer": float(normalizer),
369
- "ratio": float(abs_diff / normalizer)
370
- })
371
-
372
- # =========================================================================
373
- # Build result
374
- # =========================================================================
375
- violated_list = sorted(violated_constraint_set)
376
- feasible = len(violated_list) == 0
377
-
378
- result = {
379
- "feasible": feasible,
380
- "violated_constraints": violated_list,
381
- "violations": violations,
382
- "violation_magnitudes": violation_magnitudes
383
- }
384
-
385
- return result
386
-
387
-
388
- def _check_loading_feasibility(items_in_pickup_order, p_pos, d_pos, s, l_cap):
389
- """
390
- Check if items can be assigned to s stacks (each capacity l_cap) respecting LIFO.
391
-
392
- LIFO rule: if item i is picked up before item j and both are in the same stack,
393
- then item j must be delivered before item i (j is on top).
394
-
395
- Uses backtracking.
396
- """
397
- stacks = [[] for _ in range(s)]
398
-
399
- def can_place(item, stack_idx):
400
- stack = stacks[stack_idx]
401
- if len(stack) >= l_cap:
402
- return False
403
- # Check LIFO: for each item w already in the stack,
404
- # if w was picked up before item (p_pos[w] < p_pos[item]),
405
- # then item must be delivered before w (d_pos[item] < d_pos[w])
406
- # if item was picked up before w (shouldn't happen since we process in pickup order),
407
- # then w must be delivered before item
408
- for w in stack:
409
- if p_pos[w] < p_pos[item]:
410
- # w picked before item => item on top => item delivered before w
411
- if d_pos[item] > d_pos[w]:
412
- return False
413
- elif p_pos[item] < p_pos[w]:
414
- # item picked before w => w on top => w delivered before item
415
- if d_pos[w] > d_pos[item]:
416
- return False
417
- return True
418
-
419
- def backtrack(idx):
420
- if idx == len(items_in_pickup_order):
421
- return True
422
- item = items_in_pickup_order[idx]
423
- for k in range(s):
424
- if can_place(item, k):
425
- stacks[k].append(item)
426
- if backtrack(idx + 1):
427
- return True
428
- stacks[k].pop()
429
- # Pruning: if stack k is empty, no point trying further empty stacks
430
- if len(stacks[k]) == 0:
431
- break
432
- return False
433
-
434
- return backtrack(0)
435
-
436
-
437
- def main():
438
- parser = argparse.ArgumentParser(
439
- description="Feasibility checker for DTSPMS solutions"
440
- )
441
- parser.add_argument("--instance_path", type=str, required=True,
442
- help="Path to the JSON file containing the data instance")
443
- parser.add_argument("--solution_path", type=str, required=True,
444
- help="Path to the JSON file containing the candidate solution")
445
- parser.add_argument("--result_path", type=str, required=True,
446
- help="Path to write the JSON file containing the feasibility result")
447
- args = parser.parse_args()
448
-
449
- instance = load_json(args.instance_path)
450
- solution = load_json(args.solution_path)
451
-
452
- result = check_feasibility(instance, solution)
453
-
454
- with open(args.result_path, 'w') as f:
455
- json.dump(result, f, indent=2)
456
-
457
- if result["feasible"]:
458
- print(f"FEASIBLE: Solution satisfies all constraints.")
459
- else:
460
- print(f"INFEASIBLE: Violated constraints: {result['violated_constraints']}")
461
- for v in result["violations"]:
462
- print(f" - {v}")
463
-
464
-
465
- if __name__ == "__main__":
466
- main()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
alba2013/gurobi_code.py DELETED
@@ -1,988 +0,0 @@
1
- #!/usr/bin/env python3
2
- """
3
- Gurobi implementation of the DTSPMS (Double Traveling Salesman Problem with Multiple Stacks).
4
-
5
- Based on: Alba Martinez et al. (2013), "A Branch-and-Cut Algorithm for the Double Traveling
6
- Salesman Problem with Multiple Stacks", INFORMS Journal on Computing 25(1):41-55.
7
-
8
- This implements the ILP formulation (1)-(5) from the paper, with dynamic separation of:
9
- - Subtour elimination constraints (4) via callback
10
- - Infeasible path / tournament constraints (7) via callback
11
- - Lifted tournament constraints (8) via callback (heuristic)
12
- - Position-based constraints (9) via callback
13
- - Lifted depot-endpoint constraints (10) via callback (heuristic)
14
-
15
- The loading feasibility check (PDTC) follows Section 3 of the paper exactly.
16
- """
17
-
18
- import argparse
19
- import json
20
- import math
21
- import time
22
- import itertools
23
- from collections import defaultdict, deque
24
-
25
- import gurobipy as gp
26
- from gurobipy import GRB
27
- import os as _os, sys as _sys
28
- # Walk up from this file's directory to find repo root (containing scripts/).
29
- _repo = _os.path.dirname(_os.path.abspath(__file__))
30
- while _repo != _os.path.dirname(_repo) and not _os.path.isdir(_os.path.join(_repo, 'scripts', 'utils')):
31
- _repo = _os.path.dirname(_repo)
32
- if _os.path.isdir(_os.path.join(_repo, 'scripts', 'utils')):
33
- _sys.path.insert(0, _repo)
34
- try:
35
- from scripts.utils.gurobi_log_helper import install_gurobi_logger
36
- except ImportError:
37
- def install_gurobi_logger(log_path): # no-op fallback when scripts/ unavailable
38
- pass
39
-
40
-
41
- # =============================================================================
42
- # DATA LOADING
43
- # =============================================================================
44
-
45
- def load_instance(path):
46
- """Load a DTSPMS instance from JSON."""
47
- with open(path, 'r') as f:
48
- data = json.load(f)
49
- return data
50
-
51
-
52
- def build_distance_matrices(data):
53
- """Extract distance matrices for pickup and delivery regions."""
54
- n = data['parameters']['num_requests_n']
55
- s = data['parameters']['num_stacks_s']
56
- l = data['parameters']['stack_height_l']
57
-
58
- c_P = []
59
- for row in data['pickup_region']['distance_matrix']:
60
- c_P.append(list(row))
61
-
62
- c_D = []
63
- for row in data['delivery_region']['distance_matrix']:
64
- c_D.append(list(row))
65
-
66
- return n, s, l, c_P, c_D
67
-
68
-
69
- # =============================================================================
70
- # LOADING FEASIBILITY CHECK (PDTC) - Section 3 of the paper
71
- # =============================================================================
72
-
73
- def check_loading_feasibility(pickup_path, delivery_path, s, l):
74
- """
75
- Check if a pair of (partial) paths admits a feasible loading plan.
76
-
77
- pickup_path: ordered list of customer vertices visited in pickup tour (no depot)
78
- delivery_path: ordered list of customer vertices visited in delivery tour (no depot)
79
- s: number of stacks
80
- l: max height of each stack
81
-
82
- Returns: (feasible, cliques)
83
- feasible: True if loading is feasible
84
- cliques: list of cliques of size > s found (for lifted constraints)
85
- """
86
- # Find common customers in both paths
87
- I = []
88
- pickup_set = set(pickup_path)
89
- delivery_set = set(delivery_path)
90
- I = list(pickup_set & delivery_set)
91
-
92
- if len(I) == 0:
93
- return True, []
94
-
95
- # Step 1: Trivial check - if |I| <= s, feasible
96
- if len(I) <= s:
97
- return True, []
98
-
99
- # Build position maps
100
- pickup_pos = {}
101
- for idx, v in enumerate(pickup_path):
102
- if v not in pickup_pos:
103
- pickup_pos[v] = idx
104
-
105
- delivery_pos = {}
106
- for idx, v in enumerate(delivery_path):
107
- if v not in delivery_pos:
108
- delivery_pos[v] = idx
109
-
110
- # Step 2: Build precedence graph
111
- # Arc (i, j) exists if i precedes j in BOTH pickup and delivery paths
112
- # This means i and j CANNOT be in the same stack (LIFO violation)
113
- precedence = defaultdict(set)
114
- for i in I:
115
- for j in I:
116
- if i != j:
117
- if pickup_pos[i] < pickup_pos[j] and delivery_pos[i] < delivery_pos[j]:
118
- precedence[i].add(j)
119
-
120
- # Step 3: Lower bound via longest path (CPM)
121
- # The precedence graph is a DAG; find longest path
122
- # Topological order by pickup position
123
- sorted_items = sorted(I, key=lambda v: pickup_pos[v])
124
-
125
- # Compute longest path length and track predecessors for clique extraction
126
- dist = {v: 0 for v in I}
127
- pred = {v: None for v in I}
128
-
129
- for v in sorted_items:
130
- for w in I:
131
- if w in precedence[v]:
132
- if dist[w] < dist[v] + 1:
133
- dist[w] = dist[v] + 1
134
- pred[w] = v
135
-
136
- max_clique_size = max(dist.values()) + 1 if dist else 1
137
-
138
- # Extract all cliques (longest paths) of maximum length
139
- cliques = []
140
- max_dist = max(dist.values()) if dist else 0
141
-
142
- # Find all endpoints of longest paths
143
- for end_v in I:
144
- if dist[end_v] == max_dist:
145
- # Trace back the clique
146
- clique = []
147
- v = end_v
148
- while v is not None:
149
- clique.append(v)
150
- v = pred[v]
151
- clique.reverse()
152
- if clique not in cliques:
153
- cliques.append(clique)
154
-
155
- if max_clique_size > s:
156
- return False, cliques
157
-
158
- # Step 4: Greedy assignment using CPM output
159
- # Compute T_min and T_max for each vertex
160
- # T_min(i) = length of longest path ending at i (from any source) + 1 (1-indexed stack)
161
- # T_max(i) = s - (length of longest path starting from i to any sink)
162
-
163
- # Forward pass: T_min
164
- t_min = {}
165
- for v in sorted_items:
166
- t_min[v] = dist[v] + 1 # 1-indexed
167
-
168
- # Backward pass: longest path from v to any sink
169
- # Reverse topological order
170
- rev_sorted = list(reversed(sorted_items))
171
- dist_from = {v: 0 for v in I}
172
- for v in rev_sorted:
173
- for w in I:
174
- if w in precedence[v]:
175
- if dist_from[v] < dist_from[w] + 1:
176
- dist_from[v] = dist_from[w] + 1
177
-
178
- t_max = {}
179
- for v in I:
180
- t_max[v] = s - dist_from[v]
181
-
182
- # Assign items on longest path first (T_min == T_max)
183
- stacks = [[] for _ in range(s)] # stacks[k] is list of items in stack k (bottom to top)
184
-
185
- fixed_items = set()
186
- for v in I:
187
- if t_min[v] == t_max[v]:
188
- stack_idx = t_min[v] - 1 # 0-indexed
189
- if stack_idx < 0 or stack_idx >= s:
190
- # Should not happen if clique size <= s
191
- break
192
- stacks[stack_idx].append(v)
193
- if len(stacks[stack_idx]) > l:
194
- # Greedy fails, go to enumeration
195
- return _enumerate_loading(I, precedence, pickup_pos, delivery_pos, s, l), cliques
196
- fixed_items.add(v)
197
-
198
- # Check LIFO for fixed items
199
- for k in range(s):
200
- for i_idx in range(len(stacks[k])):
201
- for j_idx in range(i_idx + 1, len(stacks[k])):
202
- vi = stacks[k][i_idx]
203
- vj = stacks[k][j_idx]
204
- # vi loaded before vj (vi is lower in stack)
205
- # For LIFO: vj must be delivered before vi
206
- if pickup_pos[vi] < pickup_pos[vj]:
207
- if delivery_pos[vi] < delivery_pos[vj]:
208
- # LIFO violation
209
- return _enumerate_loading(I, precedence, pickup_pos, delivery_pos, s, l), cliques
210
-
211
- # Remaining items sorted by T_min, breaking ties by vertex index
212
- remaining = [v for v in I if v not in fixed_items]
213
- remaining.sort(key=lambda v: (t_min[v], v))
214
-
215
- for v in remaining:
216
- assigned = False
217
- for k in range(s):
218
- # Check if v can go into stack k
219
- if len(stacks[k]) >= l:
220
- continue
221
- # Check LIFO: v is placed on top of stack k
222
- # For each item w already in stack k:
223
- # if w was picked up before v, then v must be delivered before w
224
- # if v was picked up before w, then w must be delivered before v
225
- valid = True
226
- for w in stacks[k]:
227
- if pickup_pos[w] < pickup_pos[v]:
228
- # w loaded before v, v on top -> v must be delivered before w
229
- if delivery_pos[v] > delivery_pos[w]:
230
- valid = False
231
- break
232
- elif pickup_pos[v] < pickup_pos[w]:
233
- # v loaded before w, but w is already in stack -> w was loaded after v
234
- # w is on top relative to v, so w must be delivered before v
235
- if delivery_pos[w] > delivery_pos[v]:
236
- valid = False
237
- break
238
- if valid:
239
- stacks[k].append(v)
240
- assigned = True
241
- break
242
- if not assigned:
243
- return _enumerate_loading(I, precedence, pickup_pos, delivery_pos, s, l), cliques
244
-
245
- return True, cliques
246
-
247
-
248
- def _enumerate_loading(I, precedence, pickup_pos, delivery_pos, s, l):
249
- """
250
- Step 5: Complete enumeration of loading assignments.
251
- Returns True if a feasible loading exists, False otherwise.
252
- """
253
- # Sort items same as greedy
254
- # Compute t_min for sorting
255
- sorted_items_by_pickup = sorted(I, key=lambda v: pickup_pos[v])
256
- dist = {v: 0 for v in I}
257
- for v in sorted_items_by_pickup:
258
- for w in I:
259
- if w in precedence[v]:
260
- if dist[w] < dist[v] + 1:
261
- dist[w] = dist[v] + 1
262
-
263
- t_min = {v: dist[v] + 1 for v in I}
264
- items_order = sorted(I, key=lambda v: (t_min[v], v))
265
-
266
- # DFS enumeration
267
- stacks = [[] for _ in range(s)]
268
-
269
- def backtrack(idx):
270
- if idx == len(items_order):
271
- return True
272
- v = items_order[idx]
273
- for k in range(s):
274
- if len(stacks[k]) >= l:
275
- continue
276
- # Check LIFO
277
- valid = True
278
- for w in stacks[k]:
279
- if pickup_pos[w] < pickup_pos[v]:
280
- if delivery_pos[v] > delivery_pos[w]:
281
- valid = False
282
- break
283
- elif pickup_pos[v] < pickup_pos[w]:
284
- if delivery_pos[w] > delivery_pos[v]:
285
- valid = False
286
- break
287
- if valid:
288
- stacks[k].append(v)
289
- if backtrack(idx + 1):
290
- return True
291
- stacks[k].pop()
292
- return False
293
-
294
- return backtrack(0)
295
-
296
-
297
- # =============================================================================
298
- # SUBTOUR SEPARATION
299
- # =============================================================================
300
-
301
- def find_subtours(n, x_vals):
302
- """
303
- Find subtours in the solution defined by x_vals.
304
- x_vals: dict mapping (i,j) -> value
305
- Returns list of subtours (each a set of vertices), excluding the full tour.
306
- n+1 vertices: 0..n
307
- """
308
- # Build adjacency from integer solution
309
- adj = defaultdict(list)
310
- for (i, j), val in x_vals.items():
311
- if val > 0.5:
312
- adj[i].append(j)
313
-
314
- visited = set()
315
- subtours = []
316
- all_vertices = set(range(n + 1))
317
-
318
- for start in range(n + 1):
319
- if start in visited:
320
- continue
321
- # Trace the cycle/path from start
322
- tour = set()
323
- current = start
324
- while current not in tour and current not in visited:
325
- tour.add(current)
326
- nexts = adj.get(current, [])
327
- if nexts:
328
- current = nexts[0]
329
- else:
330
- break
331
- visited |= tour
332
- if len(tour) < n + 1 and len(tour) >= 2:
333
- subtours.append(tour)
334
-
335
- return subtours
336
-
337
-
338
- def find_fractional_subtours(n, x_vals, tol=1e-4):
339
- """
340
- Separate subtour elimination constraints from fractional solution
341
- using max-flow / min-cut approach. For simplicity, we use a direct
342
- approach checking connected components in the support graph.
343
-
344
- Returns list of violated subtour sets S where sum_{i,j in S} x_{ij} > |S| - 1.
345
- """
346
- # Build capacity graph
347
- capacity = defaultdict(float)
348
- for (i, j), val in x_vals.items():
349
- if val > tol:
350
- capacity[(i, j)] += val
351
-
352
- # For each vertex i != 0, compute min-cut between 0 and i
353
- # If min-cut < 1 (approx 2 due to in+out degree), there's a violated subtour
354
- violated = []
355
- vertices = set(range(n + 1))
356
-
357
- for t in range(1, n + 1):
358
- # BFS to find min-cut using residual graph
359
- cut_val, S = min_cut_bfs(0, t, n, capacity)
360
- if cut_val < 1.0 - tol and len(S) >= 2 and len(S) <= n:
361
- # Check if this S actually gives a violated constraint
362
- flow_in_S = sum(capacity.get((i, j), 0.0) for i in S for j in S if i != j)
363
- if flow_in_S > len(S) - 1 + tol:
364
- violated.append(S)
365
-
366
- return violated
367
-
368
-
369
- def min_cut_bfs(source, sink, n, capacity):
370
- """
371
- Compute min s-t cut using max-flow (Edmonds-Karp / BFS augmenting paths).
372
- Returns (cut_value, S) where S is the source side of the min cut.
373
- """
374
- # Build residual graph
375
- residual = defaultdict(float)
376
- nodes = set(range(n + 1))
377
-
378
- for (i, j), cap in capacity.items():
379
- residual[(i, j)] += cap
380
-
381
- total_flow = 0.0
382
-
383
- while True:
384
- # BFS to find augmenting path
385
- parent = {source: None}
386
- visited = {source}
387
- queue = deque([source])
388
- found = False
389
-
390
- while queue and not found:
391
- u = queue.popleft()
392
- for v in nodes:
393
- if v not in visited and residual.get((u, v), 0.0) > 1e-8:
394
- parent[v] = u
395
- visited.add(v)
396
- if v == sink:
397
- found = True
398
- break
399
- queue.append(v)
400
-
401
- if not found:
402
- break
403
-
404
- # Find bottleneck
405
- path_flow = float('inf')
406
- v = sink
407
- while parent[v] is not None:
408
- u = parent[v]
409
- path_flow = min(path_flow, residual[(u, v)])
410
- v = u
411
-
412
- # Update residual
413
- v = sink
414
- while parent[v] is not None:
415
- u = parent[v]
416
- residual[(u, v)] -= path_flow
417
- residual[(v, u)] += path_flow
418
- v = u
419
-
420
- total_flow += path_flow
421
-
422
- # Find S (reachable from source in residual graph)
423
- S = set()
424
- queue = deque([source])
425
- S.add(source)
426
- while queue:
427
- u = queue.popleft()
428
- for v in nodes:
429
- if v not in S and residual.get((u, v), 0.0) > 1e-8:
430
- S.add(v)
431
- queue.append(v)
432
-
433
- return total_flow, S
434
-
435
-
436
- # =============================================================================
437
- # PATH ENUMERATION FOR INFEASIBLE PATH SEPARATION
438
- # =============================================================================
439
-
440
- def enumerate_fractional_paths(n, x_vals, max_path_len=None, tol=1e-4):
441
- """
442
- Enumerate fractional paths in a graph defined by x_vals.
443
- A path starts from any vertex i=1..n and extends greedily.
444
-
445
- Returns list of (path, arc_sum, tournament_sum) tuples, sorted by:
446
- - nondecreasing path length
447
- - nonincreasing tournament sum
448
- """
449
- if max_path_len is None:
450
- max_path_len = n
451
-
452
- paths = []
453
-
454
- for start in range(1, n + 1):
455
- # BFS/DFS to find paths
456
- # We use a simple greedy extension
457
- _extend_path(start, [], 0.0, 0.0, set(), x_vals, n, max_path_len, paths, tol)
458
-
459
- # Sort: nondecreasing length, then nonincreasing tournament sum
460
- paths.sort(key=lambda p: (len(p[0]) - 1, -p[2]))
461
- return paths
462
-
463
-
464
- def _extend_path(current, path_so_far, arc_sum, tourn_sum, visited, x_vals, n, max_len, results, tol):
465
- """Recursively extend a path and collect valid paths."""
466
- new_path = path_so_far + [current]
467
- new_visited = visited | {current}
468
- path_len = len(new_path) - 1 # number of arcs
469
-
470
- if path_len >= 1:
471
- # Compute tournament sum: sum of x_{p_j, p_h} for j < h (forward arcs)
472
- t_sum = 0.0
473
- for j in range(len(new_path)):
474
- for h in range(j + 1, len(new_path)):
475
- val = x_vals.get((new_path[j], new_path[h]), 0.0)
476
- t_sum += val
477
-
478
- # Keep path if sum > length - 1 (could contribute to violation)
479
- if t_sum > path_len - 1 + tol:
480
- results.append((list(new_path), arc_sum, t_sum))
481
-
482
- if path_len >= max_len:
483
- return
484
-
485
- # Extend to next vertex
486
- for next_v in range(1, n + 1):
487
- if next_v not in new_visited:
488
- edge_val = x_vals.get((current, next_v), 0.0)
489
- if edge_val > tol:
490
- new_arc_sum = arc_sum + edge_val
491
- _extend_path(next_v, new_path, new_arc_sum, 0.0, new_visited,
492
- x_vals, n, max_len, results, tol)
493
-
494
-
495
- def enumerate_depot_paths(n, x_vals, from_depot=True, tol=1e-4):
496
- """
497
- Enumerate paths starting from (or ending at) the depot.
498
- For position-based constraints (9).
499
- """
500
- max_path_len = n
501
- paths = []
502
-
503
- if from_depot:
504
- # Paths: 0 -> v1 -> v2 -> ... -> vk
505
- for next_v in range(1, n + 1):
506
- edge_val = x_vals.get((0, next_v), 0.0)
507
- if edge_val > tol:
508
- _extend_depot_path(next_v, [0, next_v], edge_val, {0, next_v},
509
- x_vals, n, max_path_len, paths, tol)
510
- else:
511
- # Paths ending at depot: v1 -> v2 -> ... -> vk -> 0
512
- # We enumerate paths ending at 0
513
- for prev_v in range(1, n + 1):
514
- edge_val = x_vals.get((prev_v, 0), 0.0)
515
- if edge_val > tol:
516
- # Extend backward from prev_v
517
- _extend_depot_path_backward(prev_v, [prev_v, 0], edge_val, {prev_v, 0},
518
- x_vals, n, max_path_len, paths, tol)
519
-
520
- return paths
521
-
522
-
523
- def _extend_depot_path(current, path_so_far, arc_sum, visited, x_vals, n, max_len, results, tol):
524
- """Extend a depot path forward."""
525
- path_len = len(path_so_far) - 1
526
- if path_len >= 1:
527
- # Compute tournament sum
528
- t_sum = 0.0
529
- for j in range(len(path_so_far)):
530
- for h in range(j + 1, len(path_so_far)):
531
- t_sum += x_vals.get((path_so_far[j], path_so_far[h]), 0.0)
532
- results.append((list(path_so_far), arc_sum, t_sum))
533
-
534
- if path_len >= max_len:
535
- return
536
-
537
- for next_v in range(1, n + 1):
538
- if next_v not in visited:
539
- edge_val = x_vals.get((current, next_v), 0.0)
540
- if edge_val > tol:
541
- _extend_depot_path(next_v, path_so_far + [next_v], arc_sum + edge_val,
542
- visited | {next_v}, x_vals, n, max_len, results, tol)
543
-
544
-
545
- def _extend_depot_path_backward(current, path_so_far, arc_sum, visited, x_vals, n, max_len, results, tol):
546
- """Extend a path backward (for paths ending at depot)."""
547
- path_len = len(path_so_far) - 1
548
- if path_len >= 1:
549
- t_sum = 0.0
550
- for j in range(len(path_so_far)):
551
- for h in range(j + 1, len(path_so_far)):
552
- t_sum += x_vals.get((path_so_far[j], path_so_far[h]), 0.0)
553
- results.append((list(path_so_far), arc_sum, t_sum))
554
-
555
- if path_len >= max_len:
556
- return
557
-
558
- for prev_v in range(1, n + 1):
559
- if prev_v not in visited:
560
- edge_val = x_vals.get((prev_v, current), 0.0)
561
- if edge_val > tol:
562
- _extend_depot_path_backward(prev_v, [prev_v] + path_so_far, arc_sum + edge_val,
563
- visited | {prev_v}, x_vals, n, max_len, results, tol)
564
-
565
-
566
- # =============================================================================
567
- # CUT GENERATION HELPERS
568
- # =============================================================================
569
-
570
- def compute_tournament_lhs(path, x_vars_dict):
571
- """
572
- Compute the LHS of the tournament constraint (7) for a given path.
573
- Sum of x_{p_j, p_h} for all j < h in the path.
574
- """
575
- total = 0.0
576
- for j in range(len(path)):
577
- for h in range(j + 1, len(path)):
578
- var = x_vars_dict.get((path[j], path[h]))
579
- if var is not None:
580
- total += var
581
- return total
582
-
583
-
584
- def add_tournament_cut(model, pickup_path, delivery_path, x_P, x_D, where):
585
- """Add tournament constraint (7) as a lazy constraint."""
586
- rhs = (len(pickup_path) - 1) + (len(delivery_path) - 1) - 1
587
-
588
- lhs_expr = 0
589
- for j in range(len(pickup_path)):
590
- for h in range(j + 1, len(pickup_path)):
591
- key = (pickup_path[j], pickup_path[h])
592
- if key in x_P:
593
- lhs_expr += x_P[key]
594
-
595
- for j in range(len(delivery_path)):
596
- for h in range(j + 1, len(delivery_path)):
597
- key = (delivery_path[j], delivery_path[h])
598
- if key in x_D:
599
- lhs_expr += x_D[key]
600
-
601
- model.cbLazy(lhs_expr <= rhs)
602
-
603
-
604
- def add_lifted_tournament_cut(model, pickup_path, delivery_path, clique, x_P, x_D, where):
605
- """Add lifted tournament constraint (8) as a lazy constraint."""
606
- rhs = (len(pickup_path) - 1) + (len(delivery_path) - 1) - 1
607
-
608
- lhs_expr = 0
609
-
610
- # Forward arcs in pickup path
611
- for j in range(len(pickup_path)):
612
- for h in range(j + 1, len(pickup_path)):
613
- key = (pickup_path[j], pickup_path[h])
614
- if key in x_P:
615
- lhs_expr += x_P[key]
616
-
617
- # Forward arcs in delivery path
618
- for j in range(len(delivery_path)):
619
- for h in range(j + 1, len(delivery_path)):
620
- key = (delivery_path[j], delivery_path[h])
621
- if key in x_D:
622
- lhs_expr += x_D[key]
623
-
624
- # Reverse arcs within segments between consecutive clique vertices (pickup)
625
- clique_set = set(clique)
626
- pickup_clique_positions = [i for i, v in enumerate(pickup_path) if v in clique_set]
627
- for ci in range(len(pickup_clique_positions)):
628
- start_pos = pickup_clique_positions[ci]
629
- end_pos = pickup_clique_positions[ci + 1] if ci + 1 < len(pickup_clique_positions) else len(pickup_path)
630
- segment = pickup_path[start_pos:end_pos]
631
- # Add reverse arcs within this segment (j > h, i.e., backward arcs)
632
- for j in range(len(segment)):
633
- for h in range(j):
634
- key = (segment[j], segment[h])
635
- if key in x_P:
636
- lhs_expr += x_P[key]
637
-
638
- # Reverse arcs within segments between consecutive clique vertices (delivery)
639
- delivery_clique_positions = [i for i, v in enumerate(delivery_path) if v in clique_set]
640
- for ci in range(len(delivery_clique_positions)):
641
- start_pos = delivery_clique_positions[ci]
642
- end_pos = delivery_clique_positions[ci + 1] if ci + 1 < len(delivery_clique_positions) else len(delivery_path)
643
- segment = delivery_path[start_pos:end_pos]
644
- for j in range(len(segment)):
645
- for h in range(j):
646
- key = (segment[j], segment[h])
647
- if key in x_D:
648
- lhs_expr += x_D[key]
649
-
650
- model.cbLazy(lhs_expr <= rhs)
651
-
652
-
653
- # =============================================================================
654
- # GUROBI CALLBACK
655
- # =============================================================================
656
-
657
- def dtspms_callback(model, where):
658
- """Gurobi callback for lazy constraint generation."""
659
- if where == GRB.Callback.MIPSOL:
660
- # Integer solution found - check for subtours and loading feasibility
661
- n = model._n
662
- s = model._s
663
- l = model._l
664
- x_P = model._x_P
665
- x_D = model._x_D
666
-
667
- # Get solution values
668
- x_P_vals = {}
669
- x_D_vals = {}
670
- for (i, j), var in x_P.items():
671
- x_P_vals[(i, j)] = model.cbGetSolution(var)
672
- for (i, j), var in x_D.items():
673
- x_D_vals[(i, j)] = model.cbGetSolution(var)
674
-
675
- # Check subtours in pickup
676
- subtours_P = find_subtours(n, x_P_vals)
677
- for S in subtours_P:
678
- expr = gp.quicksum(x_P[(i, j)] for i in S for j in S if i != j and (i, j) in x_P)
679
- model.cbLazy(expr <= len(S) - 1)
680
-
681
- # Check subtours in delivery
682
- subtours_D = find_subtours(n, x_D_vals)
683
- for S in subtours_D:
684
- expr = gp.quicksum(x_D[(i, j)] for i in S for j in S if i != j and (i, j) in x_D)
685
- model.cbLazy(expr <= len(S) - 1)
686
-
687
- if subtours_P or subtours_D:
688
- return
689
-
690
- # No subtours - extract the tours
691
- pickup_tour = extract_tour(n, x_P_vals)
692
- delivery_tour = extract_tour(n, x_D_vals)
693
-
694
- if pickup_tour is None or delivery_tour is None:
695
- return
696
-
697
- # Check loading feasibility
698
- pickup_customers = pickup_tour[1:] # exclude depot
699
- delivery_customers = delivery_tour[1:]
700
-
701
- feasible, cliques = check_loading_feasibility(
702
- pickup_customers, delivery_customers, s, l
703
- )
704
-
705
- if not feasible:
706
- # Add tournament constraint (7)
707
- add_tournament_cut(model, pickup_customers, delivery_customers, x_P, x_D, where)
708
-
709
- # Also add reverse cut for symmetric costs
710
- add_tournament_cut(model, list(reversed(pickup_customers)),
711
- list(reversed(delivery_customers)), x_P, x_D, where)
712
-
713
- # Add lifted tournament constraints (8) for cliques > s
714
- for clique in cliques:
715
- if len(clique) > s:
716
- add_lifted_tournament_cut(model, pickup_customers, delivery_customers,
717
- clique, x_P, x_D, where)
718
-
719
- elif where == GRB.Callback.MIPNODE:
720
- # Fractional solution at a node - separate subtours and infeasible paths
721
- if model.cbGet(GRB.Callback.MIPNODE_STATUS) != GRB.OPTIMAL:
722
- return
723
-
724
- n = model._n
725
- s = model._s
726
- l = model._l
727
- x_P = model._x_P
728
- x_D = model._x_D
729
- tol = 1e-4
730
-
731
- # Get relaxation values
732
- x_P_vals = {}
733
- x_D_vals = {}
734
- for (i, j), var in x_P.items():
735
- x_P_vals[(i, j)] = model.cbGetNodeRel(var)
736
- for (i, j), var in x_D.items():
737
- x_D_vals[(i, j)] = model.cbGetNodeRel(var)
738
-
739
- # Separate subtour elimination constraints
740
- cut_added = False
741
-
742
- violated_P = find_fractional_subtours(n, x_P_vals, tol)
743
- for S in violated_P:
744
- expr = gp.quicksum(x_P[(i, j)] for i in S for j in S if i != j and (i, j) in x_P)
745
- model.cbCut(expr <= len(S) - 1)
746
- cut_added = True
747
-
748
- violated_D = find_fractional_subtours(n, x_D_vals, tol)
749
- for S in violated_D:
750
- expr = gp.quicksum(x_D[(i, j)] for i in S for j in S if i != j and (i, j) in x_D)
751
- model.cbCut(expr <= len(S) - 1)
752
- cut_added = True
753
-
754
- if cut_added:
755
- return
756
-
757
- # Separate tournament constraints (7) on fractional paths
758
- # Limit path enumeration to avoid excessive computation
759
- max_path_len = min(n, 6) # **INFERRED ASSUMPTION**: limit path length for tractability
760
-
761
- pickup_paths = enumerate_fractional_paths(n, x_P_vals, max_path_len, tol)
762
- delivery_paths = enumerate_fractional_paths(n, x_D_vals, max_path_len, tol)
763
-
764
- # Check pairs for violations
765
- for p_path, p_arc_sum, p_tourn_sum in pickup_paths:
766
- for d_path, d_arc_sum, d_tourn_sum in delivery_paths:
767
- rhs = (len(p_path) - 1) + (len(d_path) - 1) - 1
768
- total_sum = p_tourn_sum + d_tourn_sum
769
-
770
- if total_sum > rhs + tol:
771
- # Check loading feasibility
772
- feasible, cliques = check_loading_feasibility(
773
- p_path, d_path, s, l
774
- )
775
- if not feasible:
776
- # Add tournament cut
777
- lhs_expr = 0
778
- for j in range(len(p_path)):
779
- for h in range(j + 1, len(p_path)):
780
- key = (p_path[j], p_path[h])
781
- if key in x_P:
782
- lhs_expr += x_P[key]
783
- for j in range(len(d_path)):
784
- for h in range(j + 1, len(d_path)):
785
- key = (d_path[j], d_path[h])
786
- if key in x_D:
787
- lhs_expr += x_D[key]
788
- model.cbCut(lhs_expr <= rhs)
789
-
790
- # Reverse cut
791
- rev_lhs = 0
792
- rev_p = list(reversed(p_path))
793
- rev_d = list(reversed(d_path))
794
- for j in range(len(rev_p)):
795
- for h in range(j + 1, len(rev_p)):
796
- key = (rev_p[j], rev_p[h])
797
- if key in x_P:
798
- rev_lhs += x_P[key]
799
- for j in range(len(rev_d)):
800
- for h in range(j + 1, len(rev_d)):
801
- key = (rev_d[j], rev_d[h])
802
- if key in x_D:
803
- rev_lhs += x_D[key]
804
- model.cbCut(rev_lhs <= rhs)
805
- return # Stop after first violated pair found
806
-
807
-
808
- def extract_tour(n, x_vals):
809
- """Extract a Hamiltonian tour from integer solution values."""
810
- adj = {}
811
- for (i, j), val in x_vals.items():
812
- if val > 0.5:
813
- adj[i] = j
814
-
815
- tour = [0]
816
- current = 0
817
- for _ in range(n):
818
- next_v = adj.get(current)
819
- if next_v is None:
820
- return None
821
- tour.append(next_v)
822
- current = next_v
823
-
824
- if adj.get(current) != 0:
825
- return None
826
-
827
- return tour
828
-
829
-
830
- # =============================================================================
831
- # MAIN MODEL
832
- # =============================================================================
833
-
834
- def solve_dtspms(instance_path, solution_path, time_limit):
835
- """Build and solve the DTSPMS model using Gurobi."""
836
- data = load_instance(instance_path)
837
- n, s, l, c_P, c_D = build_distance_matrices(data)
838
-
839
- print(f"DTSPMS Instance: n={n}, s={s}, l={l}")
840
- print(f"Time limit: {time_limit} seconds")
841
-
842
- model = gp.Model("DTSPMS")
843
- model.setParam("Threads", 1)
844
- model.setParam("TimeLimit", time_limit)
845
- model.setParam("LazyConstraints", 1)
846
- model.setParam("OutputFlag", 1)
847
-
848
- # Create variables x^P_{ij} and x^D_{ij}
849
- x_P = {}
850
- x_D = {}
851
- V = list(range(n + 1)) # 0..n
852
-
853
- for i in V:
854
- for j in V:
855
- if i != j: # x^T_{ii} = 0 (variable fixing, comment 4)
856
- x_P[(i, j)] = model.addVar(vtype=GRB.BINARY, name=f"xP_{i}_{j}",
857
- obj=c_P[i][j])
858
- x_D[(i, j)] = model.addVar(vtype=GRB.BINARY, name=f"xD_{i}_{j}",
859
- obj=c_D[i][j])
860
-
861
- model.update()
862
-
863
- # Objective: minimize total routing cost (1)
864
- model.setAttr("ModelSense", GRB.MINIMIZE)
865
-
866
- # Constraints (2): each vertex has exactly one successor (pickup)
867
- for i in V:
868
- model.addConstr(
869
- gp.quicksum(x_P[(i, j)] for j in V if j != i) == 1,
870
- name=f"outP_{i}"
871
- )
872
-
873
- # Constraints (3): each vertex has exactly one predecessor (pickup)
874
- for j in V:
875
- model.addConstr(
876
- gp.quicksum(x_P[(i, j)] for i in V if i != j) == 1,
877
- name=f"inP_{j}"
878
- )
879
-
880
- # Constraints (2): each vertex has exactly one successor (delivery)
881
- for i in V:
882
- model.addConstr(
883
- gp.quicksum(x_D[(i, j)] for j in V if j != i) == 1,
884
- name=f"outD_{i}"
885
- )
886
-
887
- # Constraints (3): each vertex has exactly one predecessor (delivery)
888
- for j in V:
889
- model.addConstr(
890
- gp.quicksum(x_D[(i, j)] for i in V if i != j) == 1,
891
- name=f"inD_{j}"
892
- )
893
-
894
- # 2-vertex subtour elimination: x^T_{ij} + x^T_{ji} <= 1 (Section 5.1)
895
- for i in V:
896
- for j in V:
897
- if i < j:
898
- model.addConstr(x_P[(i, j)] + x_P[(j, i)] <= 1, name=f"sec2P_{i}_{j}")
899
- model.addConstr(x_D[(i, j)] + x_D[(j, i)] <= 1, name=f"sec2D_{i}_{j}")
900
-
901
- # Simple position-based constraints (Section 5.1)
902
- # Added when n >= (s-1)*l + 2
903
- if n >= (s - 1) * l + 2:
904
- for i in range(1, n + 1):
905
- model.addConstr(x_P[(0, i)] + x_D[(0, i)] <= 1, name=f"pos_out_{i}")
906
- model.addConstr(x_P[(i, 0)] + x_D[(i, 0)] <= 1, name=f"pos_in_{i}")
907
-
908
- model.update()
909
-
910
- # Store data for callback
911
- model._x_P = x_P
912
- model._x_D = x_D
913
- model._n = n
914
- model._s = s
915
- model._l = l
916
-
917
- # Optimize with callback
918
- model.optimize(dtspms_callback)
919
-
920
- # Extract solution
921
- result = {"problem": "DTSPMS", "instance": instance_path}
922
-
923
- if model.SolCount > 0:
924
- obj_val = model.ObjVal
925
- result["objective_value"] = obj_val
926
- result["status"] = "optimal" if model.Status == GRB.OPTIMAL else "feasible"
927
- result["gap"] = model.MIPGap if hasattr(model, 'MIPGap') else 0.0
928
-
929
- # Extract tours
930
- x_P_sol = {}
931
- x_D_sol = {}
932
- for (i, j), var in x_P.items():
933
- x_P_sol[(i, j)] = var.X
934
- for (i, j), var in x_D.items():
935
- x_D_sol[(i, j)] = var.X
936
-
937
- pickup_tour = extract_tour(n, x_P_sol)
938
- delivery_tour = extract_tour(n, x_D_sol)
939
-
940
- result["pickup_tour"] = pickup_tour
941
- result["delivery_tour"] = delivery_tour
942
-
943
- # Compute individual tour costs
944
- if pickup_tour:
945
- p_cost = sum(c_P[pickup_tour[i]][pickup_tour[i + 1]] for i in range(len(pickup_tour) - 1))
946
- p_cost += c_P[pickup_tour[-1]][pickup_tour[0]]
947
- result["pickup_cost"] = p_cost
948
- if delivery_tour:
949
- d_cost = sum(c_D[delivery_tour[i]][delivery_tour[i + 1]] for i in range(len(delivery_tour) - 1))
950
- d_cost += c_D[delivery_tour[-1]][delivery_tour[0]]
951
- result["delivery_cost"] = d_cost
952
- else:
953
- result["objective_value"] = None
954
- result["status"] = "infeasible_or_no_solution"
955
-
956
- result["solve_time"] = model.Runtime
957
-
958
- # Write solution
959
- with open(solution_path, 'w') as f:
960
- json.dump(result, f, indent=2)
961
-
962
- print(f"\nSolution written to {solution_path}")
963
- if model.SolCount > 0:
964
- print(f"Objective value: {result['objective_value']}")
965
- print(f"Status: {result['status']}")
966
- print(f"Pickup tour: {result.get('pickup_tour')}")
967
- print(f"Delivery tour: {result.get('delivery_tour')}")
968
-
969
- return result
970
-
971
-
972
- # =============================================================================
973
- # MAIN
974
- # =============================================================================
975
-
976
- if __name__ == "__main__":
977
- parser = argparse.ArgumentParser(description="Solve DTSPMS using Gurobi (branch-and-cut)")
978
- parser.add_argument("--instance_path", type=str, required=True,
979
- help="Path to the JSON instance file")
980
- parser.add_argument("--solution_path", type=str, default="gurobi_solution_1.json",
981
- help="Path for the output solution JSON file")
982
- parser.add_argument("--time_limit", type=int, default=3600,
983
- help="Maximum solver runtime in seconds")
984
- parser.add_argument("--log_path", type=str, default=None, help="Path to log incumbent solutions")
985
- args = parser.parse_args()
986
- install_gurobi_logger(args.log_path)
987
-
988
- solve_dtspms(args.instance_path, args.solution_path, args.time_limit)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
alba2013/gurobi_feasi_result/large_feasi_result_1.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "feasible": true,
3
- "violated_constraints": [],
4
- "violations": [],
5
- "violation_magnitudes": []
6
- }
 
 
 
 
 
 
 
alba2013/gurobi_feasi_result/large_feasi_result_2.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "feasible": true,
3
- "violated_constraints": [],
4
- "violations": [],
5
- "violation_magnitudes": []
6
- }
 
 
 
 
 
 
 
alba2013/gurobi_feasi_result/large_feasi_result_3.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "feasible": true,
3
- "violated_constraints": [],
4
- "violations": [],
5
- "violation_magnitudes": []
6
- }
 
 
 
 
 
 
 
alba2013/gurobi_feasi_result/large_feasi_result_4.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "feasible": true,
3
- "violated_constraints": [],
4
- "violations": [],
5
- "violation_magnitudes": []
6
- }
 
 
 
 
 
 
 
alba2013/gurobi_feasi_result/large_feasi_result_5.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "feasible": true,
3
- "violated_constraints": [],
4
- "violations": [],
5
- "violation_magnitudes": []
6
- }
 
 
 
 
 
 
 
alba2013/gurobi_feasi_result/tiny_feasi_result.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "feasible": true,
3
- "violated_constraints": [],
4
- "violations": [],
5
- "violation_magnitudes": []
6
- }
 
 
 
 
 
 
 
alba2013/gurobi_solution/large_solution_1.json DELETED
@@ -1,56 +0,0 @@
1
- {
2
- "problem": "DTSPMS",
3
- "instance": "/scratch/chonghej/efficient-opt-bench/efficient_opt_benchmark/alba2013/instance/large_instance_11.json",
4
- "objective_value": 7389.0,
5
- "status": "optimal",
6
- "gap": 0.0,
7
- "pickup_tour": [
8
- 0,
9
- 16,
10
- 11,
11
- 18,
12
- 12,
13
- 1,
14
- 8,
15
- 13,
16
- 7,
17
- 2,
18
- 14,
19
- 19,
20
- 10,
21
- 3,
22
- 4,
23
- 5,
24
- 9,
25
- 15,
26
- 6,
27
- 20,
28
- 17
29
- ],
30
- "delivery_tour": [
31
- 0,
32
- 13,
33
- 6,
34
- 17,
35
- 10,
36
- 8,
37
- 7,
38
- 20,
39
- 1,
40
- 5,
41
- 15,
42
- 9,
43
- 11,
44
- 3,
45
- 16,
46
- 12,
47
- 19,
48
- 4,
49
- 14,
50
- 18,
51
- 2
52
- ],
53
- "pickup_cost": 3545,
54
- "delivery_cost": 3844,
55
- "solve_time": 37.5076379776001
56
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
alba2013/gurobi_solution/large_solution_2.json DELETED
@@ -1,56 +0,0 @@
1
- {
2
- "problem": "DTSPMS",
3
- "instance": "/home/qua/Code/efficient_opt_bench/efficient_opt_benchmark/alba2013/instance/large_instance_21.json",
4
- "objective_value": 1800.0,
5
- "status": "optimal",
6
- "gap": 0.0,
7
- "pickup_tour": [
8
- 0,
9
- 18,
10
- 19,
11
- 4,
12
- 8,
13
- 2,
14
- 20,
15
- 3,
16
- 13,
17
- 6,
18
- 10,
19
- 14,
20
- 11,
21
- 12,
22
- 1,
23
- 5,
24
- 15,
25
- 16,
26
- 17,
27
- 9,
28
- 7
29
- ],
30
- "delivery_tour": [
31
- 0,
32
- 9,
33
- 1,
34
- 7,
35
- 13,
36
- 8,
37
- 12,
38
- 17,
39
- 18,
40
- 5,
41
- 16,
42
- 10,
43
- 4,
44
- 11,
45
- 14,
46
- 6,
47
- 19,
48
- 15,
49
- 2,
50
- 3,
51
- 20
52
- ],
53
- "pickup_cost": 938,
54
- "delivery_cost": 862,
55
- "solve_time": 108.2239739894867
56
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
alba2013/gurobi_solution/large_solution_3.json DELETED
@@ -1,56 +0,0 @@
1
- {
2
- "problem": "DTSPMS",
3
- "instance": "/home/minwei/code/efficient-opt-bench/efficient_opt_benchmark/alba2013/instance/large_instance_31.json",
4
- "objective_value": 101234.0,
5
- "status": "optimal",
6
- "gap": 9.87810419424304e-05,
7
- "pickup_tour": [
8
- 0,
9
- 2,
10
- 11,
11
- 7,
12
- 16,
13
- 4,
14
- 19,
15
- 17,
16
- 14,
17
- 8,
18
- 3,
19
- 13,
20
- 12,
21
- 6,
22
- 15,
23
- 20,
24
- 18,
25
- 10,
26
- 1,
27
- 9,
28
- 5
29
- ],
30
- "delivery_tour": [
31
- 0,
32
- 13,
33
- 8,
34
- 18,
35
- 14,
36
- 16,
37
- 20,
38
- 2,
39
- 5,
40
- 9,
41
- 3,
42
- 17,
43
- 15,
44
- 6,
45
- 7,
46
- 12,
47
- 1,
48
- 19,
49
- 10,
50
- 11,
51
- 4
52
- ],
53
- "pickup_cost": 54081,
54
- "delivery_cost": 47153,
55
- "solve_time": 2510.634176015854
56
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
alba2013/gurobi_solution/large_solution_4.json DELETED
@@ -1,56 +0,0 @@
1
- {
2
- "problem": "DTSPMS",
3
- "instance": "/home/minwei/code/efficient-opt-bench/efficient_opt_benchmark/alba2013/instance/large_instance_41.json",
4
- "objective_value": 30903.0,
5
- "status": "optimal",
6
- "gap": 9.707795359673819e-05,
7
- "pickup_tour": [
8
- 0,
9
- 3,
10
- 12,
11
- 6,
12
- 15,
13
- 20,
14
- 16,
15
- 17,
16
- 10,
17
- 8,
18
- 11,
19
- 13,
20
- 18,
21
- 2,
22
- 5,
23
- 14,
24
- 4,
25
- 9,
26
- 19,
27
- 1,
28
- 7
29
- ],
30
- "delivery_tour": [
31
- 0,
32
- 2,
33
- 8,
34
- 9,
35
- 17,
36
- 18,
37
- 19,
38
- 11,
39
- 7,
40
- 10,
41
- 20,
42
- 15,
43
- 4,
44
- 6,
45
- 1,
46
- 5,
47
- 14,
48
- 13,
49
- 16,
50
- 12,
51
- 3
52
- ],
53
- "pickup_cost": 15564,
54
- "delivery_cost": 15339,
55
- "solve_time": 756.2127451896667
56
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
alba2013/gurobi_solution/large_solution_5.json DELETED
@@ -1,56 +0,0 @@
1
- {
2
- "problem": "DTSPMS",
3
- "instance": "/home/qua/Code/efficient_opt_bench/efficient_opt_benchmark/alba2013/instance/large_instance_51.json",
4
- "objective_value": 47848.0,
5
- "status": "optimal",
6
- "gap": 8.359806052499582e-05,
7
- "pickup_tour": [
8
- 0,
9
- 16,
10
- 17,
11
- 18,
12
- 7,
13
- 3,
14
- 6,
15
- 20,
16
- 4,
17
- 2,
18
- 10,
19
- 8,
20
- 11,
21
- 19,
22
- 1,
23
- 13,
24
- 12,
25
- 14,
26
- 15,
27
- 9,
28
- 5
29
- ],
30
- "delivery_tour": [
31
- 0,
32
- 1,
33
- 12,
34
- 14,
35
- 6,
36
- 7,
37
- 13,
38
- 4,
39
- 18,
40
- 5,
41
- 19,
42
- 16,
43
- 11,
44
- 20,
45
- 3,
46
- 9,
47
- 17,
48
- 15,
49
- 10,
50
- 2,
51
- 8
52
- ],
53
- "pickup_cost": 23691,
54
- "delivery_cost": 24157,
55
- "solve_time": 499.70259618759155
56
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
alba2013/gurobi_solution/tiny_solution.json DELETED
@@ -1,32 +0,0 @@
1
- {
2
- "problem": "DTSPMS",
3
- "instance": "/home/qua/Code/efficient_opt_bench/efficient_opt_benchmark/alba2013/instance/tiny_instance.json",
4
- "objective_value": 6025.0,
5
- "status": "optimal",
6
- "gap": 0.0,
7
- "pickup_tour": [
8
- 0,
9
- 1,
10
- 2,
11
- 3,
12
- 6,
13
- 5,
14
- 8,
15
- 7,
16
- 4
17
- ],
18
- "delivery_tour": [
19
- 0,
20
- 7,
21
- 6,
22
- 4,
23
- 8,
24
- 3,
25
- 1,
26
- 5,
27
- 2
28
- ],
29
- "pickup_cost": 2905,
30
- "delivery_cost": 3120,
31
- "solve_time": 0.17197704315185547
32
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
alba2013/gurobi_solution_log/large_log_1.jsonl DELETED
@@ -1 +0,0 @@
1
- {"time": 0.33, "objective_value": 20340.0}
 
 
alba2013/gurobi_solution_log/large_log_2.jsonl DELETED
@@ -1 +0,0 @@
1
- {"time": 0.529, "objective_value": 5075.0}
 
 
alba2013/gurobi_solution_log/large_log_3.jsonl DELETED
@@ -1 +0,0 @@
1
- {"time": 0.718, "objective_value": 277405.0}
 
 
alba2013/gurobi_solution_log/large_log_4.jsonl DELETED
@@ -1 +0,0 @@
1
- {"time": 0.742, "objective_value": 82264.0}
 
 
alba2013/gurobi_solution_log/large_log_5.jsonl DELETED
@@ -1 +0,0 @@
1
- {"time": 0.021, "objective_value": 126450.0}
 
 
alba2013/gurobi_solution_log/tiny_log.jsonl DELETED
@@ -1 +0,0 @@
1
- {"time": 0.016, "objective_value": 7719.0}
 
 
alba2013/instance/large_instance_1.json DELETED
@@ -1,1331 +0,0 @@
1
- {
2
- "problem_name": "DTSPMS",
3
- "problem_full_name": "Double Traveling Salesman Problem with Multiple Stacks",
4
- "instance_id": 6,
5
- "scale_label": "medium",
6
- "seed_used": 1002000600,
7
- "parameters": {
8
- "num_stacks_s": 4,
9
- "stack_height_l": 5,
10
- "num_requests_n": 20,
11
- "num_pickup_vertices": 21,
12
- "num_delivery_vertices": 21,
13
- "coordinate_range": [
14
- 0,
15
- 1000
16
- ],
17
- "distance_metric": "rounded_euclidean"
18
- },
19
- "pickup_region": {
20
- "depot_index": 0,
21
- "coordinates": [
22
- {
23
- "vertex_id": 0,
24
- "x": 815,
25
- "y": 630
26
- },
27
- {
28
- "vertex_id": 1,
29
- "x": 251,
30
- "y": 85
31
- },
32
- {
33
- "vertex_id": 2,
34
- "x": 147,
35
- "y": 424
36
- },
37
- {
38
- "vertex_id": 3,
39
- "x": 75,
40
- "y": 646
41
- },
42
- {
43
- "vertex_id": 4,
44
- "x": 102,
45
- "y": 986
46
- },
47
- {
48
- "vertex_id": 5,
49
- "x": 308,
50
- "y": 932
51
- },
52
- {
53
- "vertex_id": 6,
54
- "x": 635,
55
- "y": 883
56
- },
57
- {
58
- "vertex_id": 7,
59
- "x": 217,
60
- "y": 392
61
- },
62
- {
63
- "vertex_id": 8,
64
- "x": 227,
65
- "y": 48
66
- },
67
- {
68
- "vertex_id": 9,
69
- "x": 415,
70
- "y": 866
71
- },
72
- {
73
- "vertex_id": 10,
74
- "x": 271,
75
- "y": 734
76
- },
77
- {
78
- "vertex_id": 11,
79
- "x": 417,
80
- "y": 204
81
- },
82
- {
83
- "vertex_id": 12,
84
- "x": 305,
85
- "y": 106
86
- },
87
- {
88
- "vertex_id": 13,
89
- "x": 333,
90
- "y": 339
91
- },
92
- {
93
- "vertex_id": 14,
94
- "x": 227,
95
- "y": 469
96
- },
97
- {
98
- "vertex_id": 15,
99
- "x": 501,
100
- "y": 970
101
- },
102
- {
103
- "vertex_id": 16,
104
- "x": 749,
105
- "y": 499
106
- },
107
- {
108
- "vertex_id": 17,
109
- "x": 781,
110
- "y": 727
111
- },
112
- {
113
- "vertex_id": 18,
114
- "x": 442,
115
- "y": 34
116
- },
117
- {
118
- "vertex_id": 19,
119
- "x": 323,
120
- "y": 581
121
- },
122
- {
123
- "vertex_id": 20,
124
- "x": 668,
125
- "y": 690
126
- }
127
- ],
128
- "distance_matrix": [
129
- [
130
- 0,
131
- 784,
132
- 699,
133
- 740,
134
- 797,
135
- 590,
136
- 310,
137
- 644,
138
- 827,
139
- 464,
140
- 554,
141
- 583,
142
- 731,
143
- 563,
144
- 610,
145
- 463,
146
- 147,
147
- 103,
148
- 703,
149
- 494,
150
- 159
151
- ],
152
- [
153
- 784,
154
- 0,
155
- 355,
156
- 588,
157
- 913,
158
- 849,
159
- 886,
160
- 309,
161
- 44,
162
- 798,
163
- 649,
164
- 204,
165
- 58,
166
- 267,
167
- 385,
168
- 920,
169
- 648,
170
- 833,
171
- 198,
172
- 501,
173
- 735
174
- ],
175
- [
176
- 699,
177
- 355,
178
- 0,
179
- 233,
180
- 564,
181
- 533,
182
- 670,
183
- 77,
184
- 384,
185
- 517,
186
- 334,
187
- 348,
188
- 355,
189
- 205,
190
- 92,
191
- 651,
192
- 607,
193
- 703,
194
- 489,
195
- 236,
196
- 585
197
- ],
198
- [
199
- 740,
200
- 588,
201
- 233,
202
- 0,
203
- 341,
204
- 369,
205
- 608,
206
- 291,
207
- 617,
208
- 405,
209
- 215,
210
- 559,
211
- 587,
212
- 401,
213
- 233,
214
- 535,
215
- 690,
216
- 711,
217
- 714,
218
- 256,
219
- 595
220
- ],
221
- [
222
- 797,
223
- 913,
224
- 564,
225
- 341,
226
- 0,
227
- 213,
228
- 543,
229
- 605,
230
- 946,
231
- 335,
232
- 303,
233
- 843,
234
- 903,
235
- 687,
236
- 532,
237
- 399,
238
- 810,
239
- 727,
240
- 1011,
241
- 461,
242
- 639
243
- ],
244
- [
245
- 590,
246
- 849,
247
- 533,
248
- 369,
249
- 213,
250
- 0,
251
- 331,
252
- 548,
253
- 888,
254
- 126,
255
- 201,
256
- 736,
257
- 826,
258
- 594,
259
- 470,
260
- 197,
261
- 618,
262
- 516,
263
- 908,
264
- 351,
265
- 434
266
- ],
267
- [
268
- 310,
269
- 886,
270
- 670,
271
- 608,
272
- 543,
273
- 331,
274
- 0,
275
- 645,
276
- 929,
277
- 221,
278
- 393,
279
- 713,
280
- 844,
281
- 622,
282
- 581,
283
- 160,
284
- 401,
285
- 214,
286
- 871,
287
- 434,
288
- 196
289
- ],
290
- [
291
- 644,
292
- 309,
293
- 77,
294
- 291,
295
- 605,
296
- 548,
297
- 645,
298
- 0,
299
- 344,
300
- 514,
301
- 346,
302
- 274,
303
- 299,
304
- 128,
305
- 78,
306
- 644,
307
- 543,
308
- 656,
309
- 423,
310
- 217,
311
- 541
312
- ],
313
- [
314
- 827,
315
- 44,
316
- 384,
317
- 617,
318
- 946,
319
- 888,
320
- 929,
321
- 344,
322
- 0,
323
- 839,
324
- 687,
325
- 246,
326
- 97,
327
- 310,
328
- 421,
329
- 962,
330
- 690,
331
- 876,
332
- 215,
333
- 542,
334
- 779
335
- ],
336
- [
337
- 464,
338
- 798,
339
- 517,
340
- 405,
341
- 335,
342
- 126,
343
- 221,
344
- 514,
345
- 839,
346
- 0,
347
- 195,
348
- 662,
349
- 768,
350
- 533,
351
- 439,
352
- 135,
353
- 496,
354
- 392,
355
- 832,
356
- 299,
357
- 308
358
- ],
359
- [
360
- 554,
361
- 649,
362
- 334,
363
- 215,
364
- 303,
365
- 201,
366
- 393,
367
- 346,
368
- 687,
369
- 195,
370
- 0,
371
- 550,
372
- 629,
373
- 400,
374
- 269,
375
- 330,
376
- 533,
377
- 510,
378
- 721,
379
- 162,
380
- 399
381
- ],
382
- [
383
- 583,
384
- 204,
385
- 348,
386
- 559,
387
- 843,
388
- 736,
389
- 713,
390
- 274,
391
- 246,
392
- 662,
393
- 550,
394
- 0,
395
- 149,
396
- 159,
397
- 326,
398
- 771,
399
- 444,
400
- 637,
401
- 172,
402
- 389,
403
- 547
404
- ],
405
- [
406
- 731,
407
- 58,
408
- 355,
409
- 587,
410
- 903,
411
- 826,
412
- 844,
413
- 299,
414
- 97,
415
- 768,
416
- 629,
417
- 149,
418
- 0,
419
- 235,
420
- 371,
421
- 886,
422
- 593,
423
- 782,
424
- 155,
425
- 475,
426
- 688
427
- ],
428
- [
429
- 563,
430
- 267,
431
- 205,
432
- 401,
433
- 687,
434
- 594,
435
- 622,
436
- 128,
437
- 310,
438
- 533,
439
- 400,
440
- 159,
441
- 235,
442
- 0,
443
- 168,
444
- 653,
445
- 446,
446
- 593,
447
- 324,
448
- 242,
449
- 485
450
- ],
451
- [
452
- 610,
453
- 385,
454
- 92,
455
- 233,
456
- 532,
457
- 470,
458
- 581,
459
- 78,
460
- 421,
461
- 439,
462
- 269,
463
- 326,
464
- 371,
465
- 168,
466
- 0,
467
- 571,
468
- 523,
469
- 611,
470
- 485,
471
- 148,
472
- 493
473
- ],
474
- [
475
- 463,
476
- 920,
477
- 651,
478
- 535,
479
- 399,
480
- 197,
481
- 160,
482
- 644,
483
- 962,
484
- 135,
485
- 330,
486
- 771,
487
- 886,
488
- 653,
489
- 571,
490
- 0,
491
- 532,
492
- 371,
493
- 938,
494
- 428,
495
- 326
496
- ],
497
- [
498
- 147,
499
- 648,
500
- 607,
501
- 690,
502
- 810,
503
- 618,
504
- 401,
505
- 543,
506
- 690,
507
- 496,
508
- 533,
509
- 444,
510
- 593,
511
- 446,
512
- 523,
513
- 532,
514
- 0,
515
- 230,
516
- 557,
517
- 434,
518
- 207
519
- ],
520
- [
521
- 103,
522
- 833,
523
- 703,
524
- 711,
525
- 727,
526
- 516,
527
- 214,
528
- 656,
529
- 876,
530
- 392,
531
- 510,
532
- 637,
533
- 782,
534
- 593,
535
- 611,
536
- 371,
537
- 230,
538
- 0,
539
- 771,
540
- 481,
541
- 119
542
- ],
543
- [
544
- 703,
545
- 198,
546
- 489,
547
- 714,
548
- 1011,
549
- 908,
550
- 871,
551
- 423,
552
- 215,
553
- 832,
554
- 721,
555
- 172,
556
- 155,
557
- 324,
558
- 485,
559
- 938,
560
- 557,
561
- 771,
562
- 0,
563
- 560,
564
- 694
565
- ],
566
- [
567
- 494,
568
- 501,
569
- 236,
570
- 256,
571
- 461,
572
- 351,
573
- 434,
574
- 217,
575
- 542,
576
- 299,
577
- 162,
578
- 389,
579
- 475,
580
- 242,
581
- 148,
582
- 428,
583
- 434,
584
- 481,
585
- 560,
586
- 0,
587
- 362
588
- ],
589
- [
590
- 159,
591
- 735,
592
- 585,
593
- 595,
594
- 639,
595
- 434,
596
- 196,
597
- 541,
598
- 779,
599
- 308,
600
- 399,
601
- 547,
602
- 688,
603
- 485,
604
- 493,
605
- 326,
606
- 207,
607
- 119,
608
- 694,
609
- 362,
610
- 0
611
- ]
612
- ]
613
- },
614
- "delivery_region": {
615
- "depot_index": 0,
616
- "coordinates": [
617
- {
618
- "vertex_id": 0,
619
- "x": 767,
620
- "y": 792
621
- },
622
- {
623
- "vertex_id": 1,
624
- "x": 210,
625
- "y": 586
626
- },
627
- {
628
- "vertex_id": 2,
629
- "x": 905,
630
- "y": 881
631
- },
632
- {
633
- "vertex_id": 3,
634
- "x": 320,
635
- "y": 769
636
- },
637
- {
638
- "vertex_id": 4,
639
- "x": 629,
640
- "y": 780
641
- },
642
- {
643
- "vertex_id": 5,
644
- "x": 162,
645
- "y": 636
646
- },
647
- {
648
- "vertex_id": 6,
649
- "x": 970,
650
- "y": 237
651
- },
652
- {
653
- "vertex_id": 7,
654
- "x": 213,
655
- "y": 350
656
- },
657
- {
658
- "vertex_id": 8,
659
- "x": 538,
660
- "y": 127
661
- },
662
- {
663
- "vertex_id": 9,
664
- "x": 49,
665
- "y": 692
666
- },
667
- {
668
- "vertex_id": 10,
669
- "x": 654,
670
- "y": 215
671
- },
672
- {
673
- "vertex_id": 11,
674
- "x": 307,
675
- "y": 799
676
- },
677
- {
678
- "vertex_id": 12,
679
- "x": 489,
680
- "y": 609
681
- },
682
- {
683
- "vertex_id": 13,
684
- "x": 817,
685
- "y": 438
686
- },
687
- {
688
- "vertex_id": 14,
689
- "x": 589,
690
- "y": 834
691
- },
692
- {
693
- "vertex_id": 15,
694
- "x": 163,
695
- "y": 685
696
- },
697
- {
698
- "vertex_id": 16,
699
- "x": 413,
700
- "y": 510
701
- },
702
- {
703
- "vertex_id": 17,
704
- "x": 774,
705
- "y": 204
706
- },
707
- {
708
- "vertex_id": 18,
709
- "x": 757,
710
- "y": 984
711
- },
712
- {
713
- "vertex_id": 19,
714
- "x": 590,
715
- "y": 525
716
- },
717
- {
718
- "vertex_id": 20,
719
- "x": 110,
720
- "y": 310
721
- }
722
- ],
723
- "distance_matrix": [
724
- [
725
- 0,
726
- 594,
727
- 164,
728
- 448,
729
- 139,
730
- 625,
731
- 591,
732
- 709,
733
- 703,
734
- 725,
735
- 588,
736
- 460,
737
- 333,
738
- 358,
739
- 183,
740
- 613,
741
- 453,
742
- 588,
743
- 192,
744
- 320,
745
- 815
746
- ],
747
- [
748
- 594,
749
- 0,
750
- 755,
751
- 214,
752
- 462,
753
- 69,
754
- 836,
755
- 236,
756
- 564,
757
- 193,
758
- 579,
759
- 234,
760
- 280,
761
- 625,
762
- 453,
763
- 110,
764
- 217,
765
- 681,
766
- 676,
767
- 385,
768
- 294
769
- ],
770
- [
771
- 164,
772
- 755,
773
- 0,
774
- 596,
775
- 294,
776
- 782,
777
- 647,
778
- 872,
779
- 839,
780
- 877,
781
- 712,
782
- 604,
783
- 497,
784
- 452,
785
- 319,
786
- 767,
787
- 616,
788
- 690,
789
- 180,
790
- 475,
791
- 979
792
- ],
793
- [
794
- 448,
795
- 214,
796
- 596,
797
- 0,
798
- 309,
799
- 207,
800
- 840,
801
- 432,
802
- 678,
803
- 282,
804
- 647,
805
- 33,
806
- 233,
807
- 597,
808
- 277,
809
- 178,
810
- 275,
811
- 725,
812
- 487,
813
- 364,
814
- 505
815
- ],
816
- [
817
- 139,
818
- 462,
819
- 294,
820
- 309,
821
- 0,
822
- 489,
823
- 641,
824
- 598,
825
- 659,
826
- 587,
827
- 566,
828
- 323,
829
- 221,
830
- 390,
831
- 67,
832
- 476,
833
- 346,
834
- 594,
835
- 241,
836
- 258,
837
- 700
838
- ],
839
- [
840
- 625,
841
- 69,
842
- 782,
843
- 207,
844
- 489,
845
- 0,
846
- 901,
847
- 291,
848
- 633,
849
- 126,
850
- 648,
851
- 218,
852
- 328,
853
- 684,
854
- 471,
855
- 49,
856
- 281,
857
- 749,
858
- 689,
859
- 442,
860
- 330
861
- ],
862
- [
863
- 591,
864
- 836,
865
- 647,
866
- 840,
867
- 641,
868
- 901,
869
- 0,
870
- 765,
871
- 446,
872
- 1027,
873
- 317,
874
- 869,
875
- 608,
876
- 253,
877
- 708,
878
- 923,
879
- 620,
880
- 199,
881
- 777,
882
- 477,
883
- 863
884
- ],
885
- [
886
- 709,
887
- 236,
888
- 872,
889
- 432,
890
- 598,
891
- 291,
892
- 765,
893
- 0,
894
- 394,
895
- 379,
896
- 461,
897
- 459,
898
- 378,
899
- 610,
900
- 613,
901
- 339,
902
- 256,
903
- 580,
904
- 835,
905
- 416,
906
- 110
907
- ],
908
- [
909
- 703,
910
- 564,
911
- 839,
912
- 678,
913
- 659,
914
- 633,
915
- 446,
916
- 394,
917
- 0,
918
- 747,
919
- 146,
920
- 711,
921
- 484,
922
- 418,
923
- 709,
924
- 672,
925
- 403,
926
- 248,
927
- 885,
928
- 401,
929
- 465
930
- ],
931
- [
932
- 725,
933
- 193,
934
- 877,
935
- 282,
936
- 587,
937
- 126,
938
- 1027,
939
- 379,
940
- 747,
941
- 0,
942
- 770,
943
- 279,
944
- 448,
945
- 809,
946
- 558,
947
- 114,
948
- 407,
949
- 874,
950
- 766,
951
- 566,
952
- 387
953
- ],
954
- [
955
- 588,
956
- 579,
957
- 712,
958
- 647,
959
- 566,
960
- 648,
961
- 317,
962
- 461,
963
- 146,
964
- 770,
965
- 0,
966
- 679,
967
- 427,
968
- 276,
969
- 622,
970
- 680,
971
- 381,
972
- 121,
973
- 776,
974
- 317,
975
- 552
976
- ],
977
- [
978
- 460,
979
- 234,
980
- 604,
981
- 33,
982
- 323,
983
- 218,
984
- 869,
985
- 459,
986
- 711,
987
- 279,
988
- 679,
989
- 0,
990
- 263,
991
- 625,
992
- 284,
993
- 184,
994
- 308,
995
- 756,
996
- 487,
997
- 394,
998
- 527
999
- ],
1000
- [
1001
- 333,
1002
- 280,
1003
- 497,
1004
- 233,
1005
- 221,
1006
- 328,
1007
- 608,
1008
- 378,
1009
- 484,
1010
- 448,
1011
- 427,
1012
- 263,
1013
- 0,
1014
- 370,
1015
- 246,
1016
- 335,
1017
- 125,
1018
- 495,
1019
- 461,
1020
- 131,
1021
- 483
1022
- ],
1023
- [
1024
- 358,
1025
- 625,
1026
- 452,
1027
- 597,
1028
- 390,
1029
- 684,
1030
- 253,
1031
- 610,
1032
- 418,
1033
- 809,
1034
- 276,
1035
- 625,
1036
- 370,
1037
- 0,
1038
- 457,
1039
- 699,
1040
- 410,
1041
- 238,
1042
- 549,
1043
- 243,
1044
- 718
1045
- ],
1046
- [
1047
- 183,
1048
- 453,
1049
- 319,
1050
- 277,
1051
- 67,
1052
- 471,
1053
- 708,
1054
- 613,
1055
- 709,
1056
- 558,
1057
- 622,
1058
- 284,
1059
- 246,
1060
- 457,
1061
- 0,
1062
- 451,
1063
- 369,
1064
- 657,
1065
- 225,
1066
- 309,
1067
- 710
1068
- ],
1069
- [
1070
- 613,
1071
- 110,
1072
- 767,
1073
- 178,
1074
- 476,
1075
- 49,
1076
- 923,
1077
- 339,
1078
- 672,
1079
- 114,
1080
- 680,
1081
- 184,
1082
- 335,
1083
- 699,
1084
- 451,
1085
- 0,
1086
- 305,
1087
- 778,
1088
- 665,
1089
- 456,
1090
- 379
1091
- ],
1092
- [
1093
- 453,
1094
- 217,
1095
- 616,
1096
- 275,
1097
- 346,
1098
- 281,
1099
- 620,
1100
- 256,
1101
- 403,
1102
- 407,
1103
- 381,
1104
- 308,
1105
- 125,
1106
- 410,
1107
- 369,
1108
- 305,
1109
- 0,
1110
- 473,
1111
- 586,
1112
- 178,
1113
- 363
1114
- ],
1115
- [
1116
- 588,
1117
- 681,
1118
- 690,
1119
- 725,
1120
- 594,
1121
- 749,
1122
- 199,
1123
- 580,
1124
- 248,
1125
- 874,
1126
- 121,
1127
- 756,
1128
- 495,
1129
- 238,
1130
- 657,
1131
- 778,
1132
- 473,
1133
- 0,
1134
- 780,
1135
- 370,
1136
- 672
1137
- ],
1138
- [
1139
- 192,
1140
- 676,
1141
- 180,
1142
- 487,
1143
- 241,
1144
- 689,
1145
- 777,
1146
- 835,
1147
- 885,
1148
- 766,
1149
- 776,
1150
- 487,
1151
- 461,
1152
- 549,
1153
- 225,
1154
- 665,
1155
- 586,
1156
- 780,
1157
- 0,
1158
- 488,
1159
- 934
1160
- ],
1161
- [
1162
- 320,
1163
- 385,
1164
- 475,
1165
- 364,
1166
- 258,
1167
- 442,
1168
- 477,
1169
- 416,
1170
- 401,
1171
- 566,
1172
- 317,
1173
- 394,
1174
- 131,
1175
- 243,
1176
- 309,
1177
- 456,
1178
- 178,
1179
- 370,
1180
- 488,
1181
- 0,
1182
- 526
1183
- ],
1184
- [
1185
- 815,
1186
- 294,
1187
- 979,
1188
- 505,
1189
- 700,
1190
- 330,
1191
- 863,
1192
- 110,
1193
- 465,
1194
- 387,
1195
- 552,
1196
- 527,
1197
- 483,
1198
- 718,
1199
- 710,
1200
- 379,
1201
- 363,
1202
- 672,
1203
- 934,
1204
- 526,
1205
- 0
1206
- ]
1207
- ]
1208
- },
1209
- "requests": [
1210
- {
1211
- "request_id": 1,
1212
- "pickup_vertex": 1,
1213
- "delivery_vertex": 1,
1214
- "item_size": 1
1215
- },
1216
- {
1217
- "request_id": 2,
1218
- "pickup_vertex": 2,
1219
- "delivery_vertex": 2,
1220
- "item_size": 1
1221
- },
1222
- {
1223
- "request_id": 3,
1224
- "pickup_vertex": 3,
1225
- "delivery_vertex": 3,
1226
- "item_size": 1
1227
- },
1228
- {
1229
- "request_id": 4,
1230
- "pickup_vertex": 4,
1231
- "delivery_vertex": 4,
1232
- "item_size": 1
1233
- },
1234
- {
1235
- "request_id": 5,
1236
- "pickup_vertex": 5,
1237
- "delivery_vertex": 5,
1238
- "item_size": 1
1239
- },
1240
- {
1241
- "request_id": 6,
1242
- "pickup_vertex": 6,
1243
- "delivery_vertex": 6,
1244
- "item_size": 1
1245
- },
1246
- {
1247
- "request_id": 7,
1248
- "pickup_vertex": 7,
1249
- "delivery_vertex": 7,
1250
- "item_size": 1
1251
- },
1252
- {
1253
- "request_id": 8,
1254
- "pickup_vertex": 8,
1255
- "delivery_vertex": 8,
1256
- "item_size": 1
1257
- },
1258
- {
1259
- "request_id": 9,
1260
- "pickup_vertex": 9,
1261
- "delivery_vertex": 9,
1262
- "item_size": 1
1263
- },
1264
- {
1265
- "request_id": 10,
1266
- "pickup_vertex": 10,
1267
- "delivery_vertex": 10,
1268
- "item_size": 1
1269
- },
1270
- {
1271
- "request_id": 11,
1272
- "pickup_vertex": 11,
1273
- "delivery_vertex": 11,
1274
- "item_size": 1
1275
- },
1276
- {
1277
- "request_id": 12,
1278
- "pickup_vertex": 12,
1279
- "delivery_vertex": 12,
1280
- "item_size": 1
1281
- },
1282
- {
1283
- "request_id": 13,
1284
- "pickup_vertex": 13,
1285
- "delivery_vertex": 13,
1286
- "item_size": 1
1287
- },
1288
- {
1289
- "request_id": 14,
1290
- "pickup_vertex": 14,
1291
- "delivery_vertex": 14,
1292
- "item_size": 1
1293
- },
1294
- {
1295
- "request_id": 15,
1296
- "pickup_vertex": 15,
1297
- "delivery_vertex": 15,
1298
- "item_size": 1
1299
- },
1300
- {
1301
- "request_id": 16,
1302
- "pickup_vertex": 16,
1303
- "delivery_vertex": 16,
1304
- "item_size": 1
1305
- },
1306
- {
1307
- "request_id": 17,
1308
- "pickup_vertex": 17,
1309
- "delivery_vertex": 17,
1310
- "item_size": 1
1311
- },
1312
- {
1313
- "request_id": 18,
1314
- "pickup_vertex": 18,
1315
- "delivery_vertex": 18,
1316
- "item_size": 1
1317
- },
1318
- {
1319
- "request_id": 19,
1320
- "pickup_vertex": 19,
1321
- "delivery_vertex": 19,
1322
- "item_size": 1
1323
- },
1324
- {
1325
- "request_id": 20,
1326
- "pickup_vertex": 20,
1327
- "delivery_vertex": 20,
1328
- "item_size": 1
1329
- }
1330
- ]
1331
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
alba2013/instance/large_instance_2.json DELETED
@@ -1,1332 +0,0 @@
1
- {
2
- "problem_name": "DTSPMS",
3
- "problem_full_name": "Double Traveling Salesman Problem with Multiple Stacks",
4
- "instance_id": 2,
5
- "scale_label": "medium",
6
- "seed_used": 200200,
7
- "parameters": {
8
- "num_stacks_s": 4,
9
- "stack_height_l": 5,
10
- "num_requests_n": 20,
11
- "num_pickup_vertices": 21,
12
- "num_delivery_vertices": 21,
13
- "coordinate_range": [
14
- 8.0,
15
- 288.0
16
- ],
17
- "distance_metric": "rounded_euclidean",
18
- "coord_source": "tsplib:a280"
19
- },
20
- "pickup_region": {
21
- "depot_index": 0,
22
- "coordinates": [
23
- {
24
- "vertex_id": 0,
25
- "x": 124.0,
26
- "y": 29.0
27
- },
28
- {
29
- "vertex_id": 1,
30
- "x": 104.0,
31
- "y": 89.0
32
- },
33
- {
34
- "vertex_id": 2,
35
- "x": 228.0,
36
- "y": 53.0
37
- },
38
- {
39
- "vertex_id": 3,
40
- "x": 236.0,
41
- "y": 77.0
42
- },
43
- {
44
- "vertex_id": 4,
45
- "x": 180.0,
46
- "y": 69.0
47
- },
48
- {
49
- "vertex_id": 5,
50
- "x": 40.0,
51
- "y": 137.0
52
- },
53
- {
54
- "vertex_id": 6,
55
- "x": 196.0,
56
- "y": 169.0
57
- },
58
- {
59
- "vertex_id": 7,
60
- "x": 44.0,
61
- "y": 35.0
62
- },
63
- {
64
- "vertex_id": 8,
65
- "x": 228.0,
66
- "y": 21.0
67
- },
68
- {
69
- "vertex_id": 9,
70
- "x": 8.0,
71
- "y": 41.0
72
- },
73
- {
74
- "vertex_id": 10,
75
- "x": 164.0,
76
- "y": 169.0
77
- },
78
- {
79
- "vertex_id": 11,
80
- "x": 180.0,
81
- "y": 85.0
82
- },
83
- {
84
- "vertex_id": 12,
85
- "x": 148.0,
86
- "y": 85.0
87
- },
88
- {
89
- "vertex_id": 13,
90
- "x": 270.0,
91
- "y": 133.0
92
- },
93
- {
94
- "vertex_id": 14,
95
- "x": 172.0,
96
- "y": 109.0
97
- },
98
- {
99
- "vertex_id": 15,
100
- "x": 32.0,
101
- "y": 161.0
102
- },
103
- {
104
- "vertex_id": 16,
105
- "x": 8.0,
106
- "y": 97.0
107
- },
108
- {
109
- "vertex_id": 17,
110
- "x": 48.0,
111
- "y": 73.0
112
- },
113
- {
114
- "vertex_id": 18,
115
- "x": 172.0,
116
- "y": 45.0
117
- },
118
- {
119
- "vertex_id": 19,
120
- "x": 180.0,
121
- "y": 61.0
122
- },
123
- {
124
- "vertex_id": 20,
125
- "x": 228.0,
126
- "y": 77.0
127
- }
128
- ],
129
- "distance_matrix": [
130
- [
131
- 0,
132
- 63,
133
- 107,
134
- 122,
135
- 69,
136
- 137,
137
- 157,
138
- 80,
139
- 104,
140
- 117,
141
- 146,
142
- 79,
143
- 61,
144
- 179,
145
- 93,
146
- 161,
147
- 134,
148
- 88,
149
- 51,
150
- 64,
151
- 115
152
- ],
153
- [
154
- 63,
155
- 0,
156
- 129,
157
- 133,
158
- 79,
159
- 80,
160
- 122,
161
- 81,
162
- 141,
163
- 107,
164
- 100,
165
- 76,
166
- 44,
167
- 172,
168
- 71,
169
- 102,
170
- 96,
171
- 58,
172
- 81,
173
- 81,
174
- 125
175
- ],
176
- [
177
- 107,
178
- 129,
179
- 0,
180
- 25,
181
- 51,
182
- 206,
183
- 120,
184
- 185,
185
- 32,
186
- 220,
187
- 132,
188
- 58,
189
- 86,
190
- 90,
191
- 79,
192
- 224,
193
- 224,
194
- 181,
195
- 57,
196
- 49,
197
- 24
198
- ],
199
- [
200
- 122,
201
- 133,
202
- 25,
203
- 0,
204
- 57,
205
- 205,
206
- 100,
207
- 197,
208
- 57,
209
- 231,
210
- 117,
211
- 57,
212
- 88,
213
- 66,
214
- 72,
215
- 221,
216
- 229,
217
- 188,
218
- 72,
219
- 58,
220
- 8
221
- ],
222
- [
223
- 69,
224
- 79,
225
- 51,
226
- 57,
227
- 0,
228
- 156,
229
- 101,
230
- 140,
231
- 68,
232
- 174,
233
- 101,
234
- 16,
235
- 36,
236
- 110,
237
- 41,
238
- 174,
239
- 174,
240
- 132,
241
- 25,
242
- 8,
243
- 49
244
- ],
245
- [
246
- 137,
247
- 80,
248
- 206,
249
- 205,
250
- 156,
251
- 0,
252
- 159,
253
- 102,
254
- 221,
255
- 101,
256
- 128,
257
- 149,
258
- 120,
259
- 230,
260
- 135,
261
- 25,
262
- 51,
263
- 64,
264
- 161,
265
- 159,
266
- 197
267
- ],
268
- [
269
- 157,
270
- 122,
271
- 120,
272
- 100,
273
- 101,
274
- 159,
275
- 0,
276
- 203,
277
- 151,
278
- 227,
279
- 32,
280
- 86,
281
- 97,
282
- 82,
283
- 65,
284
- 164,
285
- 201,
286
- 176,
287
- 126,
288
- 109,
289
- 97
290
- ],
291
- [
292
- 80,
293
- 81,
294
- 185,
295
- 197,
296
- 140,
297
- 102,
298
- 203,
299
- 0,
300
- 185,
301
- 36,
302
- 180,
303
- 145,
304
- 115,
305
- 246,
306
- 148,
307
- 127,
308
- 72,
309
- 38,
310
- 128,
311
- 138,
312
- 189
313
- ],
314
- [
315
- 104,
316
- 141,
317
- 32,
318
- 57,
319
- 68,
320
- 221,
321
- 151,
322
- 185,
323
- 0,
324
- 221,
325
- 161,
326
- 80,
327
- 102,
328
- 120,
329
- 104,
330
- 241,
331
- 233,
332
- 187,
333
- 61,
334
- 62,
335
- 56
336
- ],
337
- [
338
- 117,
339
- 107,
340
- 220,
341
- 231,
342
- 174,
343
- 101,
344
- 227,
345
- 36,
346
- 221,
347
- 0,
348
- 202,
349
- 178,
350
- 147,
351
- 278,
352
- 178,
353
- 122,
354
- 56,
355
- 51,
356
- 164,
357
- 173,
358
- 223
359
- ],
360
- [
361
- 146,
362
- 100,
363
- 132,
364
- 117,
365
- 101,
366
- 128,
367
- 32,
368
- 180,
369
- 161,
370
- 202,
371
- 0,
372
- 86,
373
- 86,
374
- 112,
375
- 61,
376
- 132,
377
- 172,
378
- 151,
379
- 124,
380
- 109,
381
- 112
382
- ],
383
- [
384
- 79,
385
- 76,
386
- 58,
387
- 57,
388
- 16,
389
- 149,
390
- 86,
391
- 145,
392
- 80,
393
- 178,
394
- 86,
395
- 0,
396
- 32,
397
- 102,
398
- 25,
399
- 166,
400
- 172,
401
- 133,
402
- 41,
403
- 24,
404
- 49
405
- ],
406
- [
407
- 61,
408
- 44,
409
- 86,
410
- 88,
411
- 36,
412
- 120,
413
- 97,
414
- 115,
415
- 102,
416
- 147,
417
- 86,
418
- 32,
419
- 0,
420
- 131,
421
- 34,
422
- 139,
423
- 141,
424
- 101,
425
- 47,
426
- 40,
427
- 80
428
- ],
429
- [
430
- 179,
431
- 172,
432
- 90,
433
- 66,
434
- 110,
435
- 230,
436
- 82,
437
- 246,
438
- 120,
439
- 278,
440
- 112,
441
- 102,
442
- 131,
443
- 0,
444
- 101,
445
- 240,
446
- 264,
447
- 230,
448
- 132,
449
- 115,
450
- 70
451
- ],
452
- [
453
- 93,
454
- 71,
455
- 79,
456
- 72,
457
- 41,
458
- 135,
459
- 65,
460
- 148,
461
- 104,
462
- 178,
463
- 61,
464
- 25,
465
- 34,
466
- 101,
467
- 0,
468
- 149,
469
- 164,
470
- 129,
471
- 64,
472
- 49,
473
- 64
474
- ],
475
- [
476
- 161,
477
- 102,
478
- 224,
479
- 221,
480
- 174,
481
- 25,
482
- 164,
483
- 127,
484
- 241,
485
- 122,
486
- 132,
487
- 166,
488
- 139,
489
- 240,
490
- 149,
491
- 0,
492
- 68,
493
- 89,
494
- 182,
495
- 179,
496
- 213
497
- ],
498
- [
499
- 134,
500
- 96,
501
- 224,
502
- 229,
503
- 174,
504
- 51,
505
- 201,
506
- 72,
507
- 233,
508
- 56,
509
- 172,
510
- 172,
511
- 141,
512
- 264,
513
- 164,
514
- 68,
515
- 0,
516
- 47,
517
- 172,
518
- 176,
519
- 221
520
- ],
521
- [
522
- 88,
523
- 58,
524
- 181,
525
- 188,
526
- 132,
527
- 64,
528
- 176,
529
- 38,
530
- 187,
531
- 51,
532
- 151,
533
- 133,
534
- 101,
535
- 230,
536
- 129,
537
- 89,
538
- 47,
539
- 0,
540
- 127,
541
- 133,
542
- 180
543
- ],
544
- [
545
- 51,
546
- 81,
547
- 57,
548
- 72,
549
- 25,
550
- 161,
551
- 126,
552
- 128,
553
- 61,
554
- 164,
555
- 124,
556
- 41,
557
- 47,
558
- 132,
559
- 64,
560
- 182,
561
- 172,
562
- 127,
563
- 0,
564
- 18,
565
- 64
566
- ],
567
- [
568
- 64,
569
- 81,
570
- 49,
571
- 58,
572
- 8,
573
- 159,
574
- 109,
575
- 138,
576
- 62,
577
- 173,
578
- 109,
579
- 24,
580
- 40,
581
- 115,
582
- 49,
583
- 179,
584
- 176,
585
- 133,
586
- 18,
587
- 0,
588
- 51
589
- ],
590
- [
591
- 115,
592
- 125,
593
- 24,
594
- 8,
595
- 49,
596
- 197,
597
- 97,
598
- 189,
599
- 56,
600
- 223,
601
- 112,
602
- 49,
603
- 80,
604
- 70,
605
- 64,
606
- 213,
607
- 221,
608
- 180,
609
- 64,
610
- 51,
611
- 0
612
- ]
613
- ]
614
- },
615
- "delivery_region": {
616
- "depot_index": 0,
617
- "coordinates": [
618
- {
619
- "vertex_id": 0,
620
- "x": 104.0,
621
- "y": 81.0
622
- },
623
- {
624
- "vertex_id": 1,
625
- "x": 80.0,
626
- "y": 25.0
627
- },
628
- {
629
- "vertex_id": 2,
630
- "x": 172.0,
631
- "y": 53.0
632
- },
633
- {
634
- "vertex_id": 3,
635
- "x": 172.0,
636
- "y": 37.0
637
- },
638
- {
639
- "vertex_id": 4,
640
- "x": 288.0,
641
- "y": 129.0
642
- },
643
- {
644
- "vertex_id": 5,
645
- "x": 124.0,
646
- "y": 109.0
647
- },
648
- {
649
- "vertex_id": 6,
650
- "x": 276.0,
651
- "y": 85.0
652
- },
653
- {
654
- "vertex_id": 7,
655
- "x": 48.0,
656
- "y": 51.0
657
- },
658
- {
659
- "vertex_id": 8,
660
- "x": 8.0,
661
- "y": 81.0
662
- },
663
- {
664
- "vertex_id": 9,
665
- "x": 124.0,
666
- "y": 61.0
667
- },
668
- {
669
- "vertex_id": 10,
670
- "x": 246.0,
671
- "y": 157.0
672
- },
673
- {
674
- "vertex_id": 11,
675
- "x": 284.0,
676
- "y": 85.0
677
- },
678
- {
679
- "vertex_id": 12,
680
- "x": 8.0,
681
- "y": 89.0
682
- },
683
- {
684
- "vertex_id": 13,
685
- "x": 32.0,
686
- "y": 57.0
687
- },
688
- {
689
- "vertex_id": 14,
690
- "x": 284.0,
691
- "y": 61.0
692
- },
693
- {
694
- "vertex_id": 15,
695
- "x": 236.0,
696
- "y": 101.0
697
- },
698
- {
699
- "vertex_id": 16,
700
- "x": 172.0,
701
- "y": 145.0
702
- },
703
- {
704
- "vertex_id": 17,
705
- "x": 32.0,
706
- "y": 113.0
707
- },
708
- {
709
- "vertex_id": 18,
710
- "x": 64.0,
711
- "y": 165.0
712
- },
713
- {
714
- "vertex_id": 19,
715
- "x": 260.0,
716
- "y": 85.0
717
- },
718
- {
719
- "vertex_id": 20,
720
- "x": 132.0,
721
- "y": 61.0
722
- }
723
- ],
724
- "distance_matrix": [
725
- [
726
- 0,
727
- 61,
728
- 74,
729
- 81,
730
- 190,
731
- 34,
732
- 172,
733
- 64,
734
- 96,
735
- 28,
736
- 161,
737
- 180,
738
- 96,
739
- 76,
740
- 181,
741
- 134,
742
- 93,
743
- 79,
744
- 93,
745
- 156,
746
- 34
747
- ],
748
- [
749
- 61,
750
- 0,
751
- 96,
752
- 93,
753
- 233,
754
- 95,
755
- 205,
756
- 41,
757
- 91,
758
- 57,
759
- 212,
760
- 213,
761
- 96,
762
- 58,
763
- 207,
764
- 174,
765
- 151,
766
- 100,
767
- 141,
768
- 190,
769
- 63
770
- ],
771
- [
772
- 74,
773
- 96,
774
- 0,
775
- 16,
776
- 139,
777
- 74,
778
- 109,
779
- 124,
780
- 166,
781
- 49,
782
- 128,
783
- 116,
784
- 168,
785
- 140,
786
- 112,
787
- 80,
788
- 92,
789
- 152,
790
- 156,
791
- 94,
792
- 41
793
- ],
794
- [
795
- 81,
796
- 93,
797
- 16,
798
- 0,
799
- 148,
800
- 87,
801
- 115,
802
- 125,
803
- 170,
804
- 54,
805
- 141,
806
- 122,
807
- 172,
808
- 141,
809
- 115,
810
- 91,
811
- 108,
812
- 159,
813
- 167,
814
- 100,
815
- 47
816
- ],
817
- [
818
- 190,
819
- 233,
820
- 139,
821
- 148,
822
- 0,
823
- 165,
824
- 46,
825
- 252,
826
- 284,
827
- 178,
828
- 50,
829
- 44,
830
- 283,
831
- 266,
832
- 68,
833
- 59,
834
- 117,
835
- 256,
836
- 227,
837
- 52,
838
- 170
839
- ],
840
- [
841
- 34,
842
- 95,
843
- 74,
844
- 87,
845
- 165,
846
- 0,
847
- 154,
848
- 96,
849
- 119,
850
- 48,
851
- 131,
852
- 162,
853
- 118,
854
- 106,
855
- 167,
856
- 112,
857
- 60,
858
- 92,
859
- 82,
860
- 138,
861
- 49
862
- ],
863
- [
864
- 172,
865
- 205,
866
- 109,
867
- 115,
868
- 46,
869
- 154,
870
- 0,
871
- 231,
872
- 268,
873
- 154,
874
- 78,
875
- 8,
876
- 268,
877
- 246,
878
- 25,
879
- 43,
880
- 120,
881
- 246,
882
- 227,
883
- 16,
884
- 146
885
- ],
886
- [
887
- 64,
888
- 41,
889
- 124,
890
- 125,
891
- 252,
892
- 96,
893
- 231,
894
- 0,
895
- 50,
896
- 77,
897
- 225,
898
- 238,
899
- 55,
900
- 17,
901
- 236,
902
- 195,
903
- 156,
904
- 64,
905
- 115,
906
- 215,
907
- 85
908
- ],
909
- [
910
- 96,
911
- 91,
912
- 166,
913
- 170,
914
- 284,
915
- 119,
916
- 268,
917
- 50,
918
- 0,
919
- 118,
920
- 250,
921
- 276,
922
- 8,
923
- 34,
924
- 277,
925
- 229,
926
- 176,
927
- 40,
928
- 101,
929
- 252,
930
- 126
931
- ],
932
- [
933
- 28,
934
- 57,
935
- 49,
936
- 54,
937
- 178,
938
- 48,
939
- 154,
940
- 77,
941
- 118,
942
- 0,
943
- 155,
944
- 162,
945
- 119,
946
- 92,
947
- 160,
948
- 119,
949
- 97,
950
- 106,
951
- 120,
952
- 138,
953
- 8
954
- ],
955
- [
956
- 161,
957
- 212,
958
- 128,
959
- 141,
960
- 50,
961
- 131,
962
- 78,
963
- 225,
964
- 250,
965
- 155,
966
- 0,
967
- 81,
968
- 248,
969
- 236,
970
- 103,
971
- 57,
972
- 75,
973
- 218,
974
- 182,
975
- 73,
976
- 149
977
- ],
978
- [
979
- 180,
980
- 213,
981
- 116,
982
- 122,
983
- 44,
984
- 162,
985
- 8,
986
- 238,
987
- 276,
988
- 162,
989
- 81,
990
- 0,
991
- 276,
992
- 254,
993
- 24,
994
- 51,
995
- 127,
996
- 254,
997
- 234,
998
- 24,
999
- 154
1000
- ],
1001
- [
1002
- 96,
1003
- 96,
1004
- 168,
1005
- 172,
1006
- 283,
1007
- 118,
1008
- 268,
1009
- 55,
1010
- 8,
1011
- 119,
1012
- 248,
1013
- 276,
1014
- 0,
1015
- 40,
1016
- 277,
1017
- 228,
1018
- 173,
1019
- 34,
1020
- 94,
1021
- 252,
1022
- 127
1023
- ],
1024
- [
1025
- 76,
1026
- 58,
1027
- 140,
1028
- 141,
1029
- 266,
1030
- 106,
1031
- 246,
1032
- 17,
1033
- 34,
1034
- 92,
1035
- 236,
1036
- 254,
1037
- 40,
1038
- 0,
1039
- 252,
1040
- 209,
1041
- 165,
1042
- 56,
1043
- 113,
1044
- 230,
1045
- 100
1046
- ],
1047
- [
1048
- 181,
1049
- 207,
1050
- 112,
1051
- 115,
1052
- 68,
1053
- 167,
1054
- 25,
1055
- 236,
1056
- 277,
1057
- 160,
1058
- 103,
1059
- 24,
1060
- 277,
1061
- 252,
1062
- 0,
1063
- 62,
1064
- 140,
1065
- 257,
1066
- 243,
1067
- 34,
1068
- 152
1069
- ],
1070
- [
1071
- 134,
1072
- 174,
1073
- 80,
1074
- 91,
1075
- 59,
1076
- 112,
1077
- 43,
1078
- 195,
1079
- 229,
1080
- 119,
1081
- 57,
1082
- 51,
1083
- 228,
1084
- 209,
1085
- 62,
1086
- 0,
1087
- 78,
1088
- 204,
1089
- 184,
1090
- 29,
1091
- 111
1092
- ],
1093
- [
1094
- 93,
1095
- 151,
1096
- 92,
1097
- 108,
1098
- 117,
1099
- 60,
1100
- 120,
1101
- 156,
1102
- 176,
1103
- 97,
1104
- 75,
1105
- 127,
1106
- 173,
1107
- 165,
1108
- 140,
1109
- 78,
1110
- 0,
1111
- 144,
1112
- 110,
1113
- 107,
1114
- 93
1115
- ],
1116
- [
1117
- 79,
1118
- 100,
1119
- 152,
1120
- 159,
1121
- 256,
1122
- 92,
1123
- 246,
1124
- 64,
1125
- 40,
1126
- 106,
1127
- 218,
1128
- 254,
1129
- 34,
1130
- 56,
1131
- 257,
1132
- 204,
1133
- 144,
1134
- 0,
1135
- 61,
1136
- 230,
1137
- 113
1138
- ],
1139
- [
1140
- 93,
1141
- 141,
1142
- 156,
1143
- 167,
1144
- 227,
1145
- 82,
1146
- 227,
1147
- 115,
1148
- 101,
1149
- 120,
1150
- 182,
1151
- 234,
1152
- 94,
1153
- 113,
1154
- 243,
1155
- 184,
1156
- 110,
1157
- 61,
1158
- 0,
1159
- 212,
1160
- 124
1161
- ],
1162
- [
1163
- 156,
1164
- 190,
1165
- 94,
1166
- 100,
1167
- 52,
1168
- 138,
1169
- 16,
1170
- 215,
1171
- 252,
1172
- 138,
1173
- 73,
1174
- 24,
1175
- 252,
1176
- 230,
1177
- 34,
1178
- 29,
1179
- 107,
1180
- 230,
1181
- 212,
1182
- 0,
1183
- 130
1184
- ],
1185
- [
1186
- 34,
1187
- 63,
1188
- 41,
1189
- 47,
1190
- 170,
1191
- 49,
1192
- 146,
1193
- 85,
1194
- 126,
1195
- 8,
1196
- 149,
1197
- 154,
1198
- 127,
1199
- 100,
1200
- 152,
1201
- 111,
1202
- 93,
1203
- 113,
1204
- 124,
1205
- 130,
1206
- 0
1207
- ]
1208
- ]
1209
- },
1210
- "requests": [
1211
- {
1212
- "request_id": 1,
1213
- "pickup_vertex": 1,
1214
- "delivery_vertex": 1,
1215
- "item_size": 1
1216
- },
1217
- {
1218
- "request_id": 2,
1219
- "pickup_vertex": 2,
1220
- "delivery_vertex": 2,
1221
- "item_size": 1
1222
- },
1223
- {
1224
- "request_id": 3,
1225
- "pickup_vertex": 3,
1226
- "delivery_vertex": 3,
1227
- "item_size": 1
1228
- },
1229
- {
1230
- "request_id": 4,
1231
- "pickup_vertex": 4,
1232
- "delivery_vertex": 4,
1233
- "item_size": 1
1234
- },
1235
- {
1236
- "request_id": 5,
1237
- "pickup_vertex": 5,
1238
- "delivery_vertex": 5,
1239
- "item_size": 1
1240
- },
1241
- {
1242
- "request_id": 6,
1243
- "pickup_vertex": 6,
1244
- "delivery_vertex": 6,
1245
- "item_size": 1
1246
- },
1247
- {
1248
- "request_id": 7,
1249
- "pickup_vertex": 7,
1250
- "delivery_vertex": 7,
1251
- "item_size": 1
1252
- },
1253
- {
1254
- "request_id": 8,
1255
- "pickup_vertex": 8,
1256
- "delivery_vertex": 8,
1257
- "item_size": 1
1258
- },
1259
- {
1260
- "request_id": 9,
1261
- "pickup_vertex": 9,
1262
- "delivery_vertex": 9,
1263
- "item_size": 1
1264
- },
1265
- {
1266
- "request_id": 10,
1267
- "pickup_vertex": 10,
1268
- "delivery_vertex": 10,
1269
- "item_size": 1
1270
- },
1271
- {
1272
- "request_id": 11,
1273
- "pickup_vertex": 11,
1274
- "delivery_vertex": 11,
1275
- "item_size": 1
1276
- },
1277
- {
1278
- "request_id": 12,
1279
- "pickup_vertex": 12,
1280
- "delivery_vertex": 12,
1281
- "item_size": 1
1282
- },
1283
- {
1284
- "request_id": 13,
1285
- "pickup_vertex": 13,
1286
- "delivery_vertex": 13,
1287
- "item_size": 1
1288
- },
1289
- {
1290
- "request_id": 14,
1291
- "pickup_vertex": 14,
1292
- "delivery_vertex": 14,
1293
- "item_size": 1
1294
- },
1295
- {
1296
- "request_id": 15,
1297
- "pickup_vertex": 15,
1298
- "delivery_vertex": 15,
1299
- "item_size": 1
1300
- },
1301
- {
1302
- "request_id": 16,
1303
- "pickup_vertex": 16,
1304
- "delivery_vertex": 16,
1305
- "item_size": 1
1306
- },
1307
- {
1308
- "request_id": 17,
1309
- "pickup_vertex": 17,
1310
- "delivery_vertex": 17,
1311
- "item_size": 1
1312
- },
1313
- {
1314
- "request_id": 18,
1315
- "pickup_vertex": 18,
1316
- "delivery_vertex": 18,
1317
- "item_size": 1
1318
- },
1319
- {
1320
- "request_id": 19,
1321
- "pickup_vertex": 19,
1322
- "delivery_vertex": 19,
1323
- "item_size": 1
1324
- },
1325
- {
1326
- "request_id": 20,
1327
- "pickup_vertex": 20,
1328
- "delivery_vertex": 20,
1329
- "item_size": 1
1330
- }
1331
- ]
1332
- }