Skip to content

Commit 03d081f

Browse files
authored
Parse instances with optional tasks (#4)
* Parser for RCPSP-PS * Initial commit parse aslib This is the original parser file that I used during prototyping * Parse ASLIB instances * Revert to Py3.9 style * Introduce Optional * Update README * Add README to instance formats * Change order optional/selection groups * Example notebook * Explain ASLIB format
1 parent de52119 commit 03d081f

21 files changed

+2307
-50
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55

66
This library implements parsers for various project scheduling benchmark instances, including:
77
- Resource-Constrained Project Scheduling Problem (RCPSP)
8-
- Multi-Mode Resource-Constrained Project Scheduling Problem (MMRCPSP)
9-
- Resource-Constrained Project Scheduling Problem with Minimal and Maximal Time Lags (RCPSP/max)
8+
- Multi-Mode RCPSP (MMRCPSP)
9+
- RCPSP with Minimal and Maximal Time Lags (RCPSP/max)
1010
- Resource-Constrained Multi Project Scheduling Problem (RCMPSP)
11+
- RCPSP with flexible project structure (RCPSP-PS) and RCPSP with alternative subgraphs (RCPSP-AS)
1112

1213
`psplib` has no dependencies and can be installed in the usual way:
1314

@@ -47,6 +48,11 @@ To parse a specific instance format, set the `instance_format` argument in `pars
4748
2. `patterson`: The **Patterson format**: used for RCPSP instances, mostly used by the [OR&S](https://www.projectmanagement.ugent.be/research/data) library. See [this](http://www.p2engine.com/p2reader/patterson_format) website for more details.
4849
3. `rcpsp_max`: The **RCPSP/max format** is used for RCPSP/max instances from [TU Clausthal](https://www.wiwi.tu-clausthal.de/en/ueber-uns/abteilungen/betriebswirtschaftslehre-insbesondere-produktion-und-logistik/research/research-areas/project-generator-progen/max-and-psp/max-library/single-mode-project-duration-problem-rcpsp/max).
4950
4. `mplib`: The **MPLIB format** is used for RCMPSP instances from the [MPLIB](https://www.projectmanagement.ugent.be/research/data) library.
51+
5. `rcpsp_ps`: The **RCPSP-PS format** is the format used by [Van der Beek et al. (2024)](https://www.sciencedirect.com/science/article/pii/S0377221724008269).
52+
Specifically, we included an extra line that defines for each task whether it is optional or not.
53+
6. `aslib`: The **ASLIB format** is the format used by RCPSP-AS instances from the ASLIB instance set at [OR&S project database](https://www.projectmanagement.ugent.be/research/data).
54+
ASLIB consist of three different parts (a, b, c).
55+
To use this parser, you have to merge parts (a) and (b) into a single file - part (c) is not parsed.
5056

5157
## Instance databases
5258

data/aslib0_0.rcp

Lines changed: 251 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,251 @@
1+
122 5
2+
10 10 10 10 10
3+
4+
0 0 0 0 0 0 5 2 14 26 38 50
5+
0 0 0 0 0 0 6 3 4 5 6 7 8
6+
1 0 0 1 0 0 2 10 9
7+
1 0 0 5 0 0 2 10 9
8+
7 0 0 4 0 0 2 10 9
9+
1 0 0 4 0 0 2 10 9
10+
5 0 0 3 0 0 2 10 9
11+
6 0 0 1 0 0 1 9
12+
3 0 0 1 0 0 2 12 11
13+
8 0 0 2 0 0 2 12 11
14+
3 0 0 2 0 0 1 13
15+
9 0 0 2 0 0 1 13
16+
0 0 0 0 0 0 1 62
17+
0 0 0 0 0 0 6 15 16 18 19 20 24
18+
6 0 0 0 0 1 2 23 22
19+
5 0 0 0 0 3 1 17
20+
9 0 0 0 0 2 1 21
21+
5 0 0 0 0 2 1 21
22+
2 0 0 0 0 5 1 21
23+
9 0 0 0 0 2 1 21
24+
1 0 0 0 0 2 1 25
25+
4 0 0 0 0 2 1 25
26+
1 0 0 0 0 4 1 25
27+
1 0 0 0 0 2 1 25
28+
0 0 0 0 0 0 1 62
29+
0 0 0 0 0 0 6 27 28 29 30 32 36
30+
10 0 0 0 1 0 3 35 34 33
31+
2 0 0 0 2 0 2 34 31
32+
8 0 0 0 2 0 2 34 33
33+
1 0 0 0 1 0 1 31
34+
1 0 0 0 4 0 1 33
35+
3 0 0 0 5 0 1 33
36+
4 0 0 0 4 0 1 37
37+
2 0 0 0 1 0 1 37
38+
8 0 0 0 3 0 1 37
39+
9 0 0 0 2 0 1 37
40+
0 0 0 0 0 0 1 62
41+
0 0 0 0 0 0 3 39 40 43
42+
4 0 0 0 1 0 3 48 42 41
43+
8 0 0 0 3 0 3 47 44 41
44+
5 0 0 0 3 0 2 46 45
45+
5 0 0 0 3 0 2 47 46
46+
10 0 0 0 1 0 1 44
47+
6 0 0 0 2 0 1 45
48+
2 0 0 0 4 0 1 49
49+
2 0 0 0 2 0 1 49
50+
3 0 0 0 2 0 1 49
51+
10 0 0 0 4 0 1 49
52+
0 0 0 0 0 0 1 62
53+
0 0 0 0 0 0 4 51 52 53 56
54+
5 1 0 0 0 0 4 60 59 58 54
55+
10 2 0 0 0 0 4 59 58 55 54
56+
2 2 0 0 0 0 3 60 59 57
57+
9 4 0 0 0 0 1 57
58+
2 2 0 0 0 0 1 57
59+
6 1 0 0 0 0 1 58
60+
1 3 0 0 0 0 1 61
61+
4 1 0 0 0 0 1 61
62+
7 4 0 0 0 0 1 61
63+
10 5 0 0 0 0 1 61
64+
0 0 0 0 0 0 1 62
65+
0 0 0 0 0 0 2 63 75
66+
0 0 0 0 0 0 3 64 65 69
67+
5 0 0 1 0 0 3 68 67 66
68+
6 0 0 2 0 0 3 68 67 66
69+
5 0 0 2 0 0 4 73 72 71 70
70+
3 0 0 3 0 0 2 72 70
71+
9 0 0 5 0 0 2 71 70
72+
1 0 0 3 0 0 2 71 70
73+
4 0 0 4 0 0 1 74
74+
5 0 0 2 0 0 1 74
75+
3 0 0 1 0 0 1 74
76+
10 0 0 2 0 0 1 74
77+
0 0 0 0 0 0 1 87
78+
0 0 0 0 0 0 6 76 78 80 83 84 85
79+
6 0 0 0 0 1 1 77
80+
3 0 0 0 0 3 2 82 81
81+
7 0 0 0 0 2 1 79
82+
9 0 0 0 0 1 1 81
83+
6 0 0 0 0 5 1 81
84+
4 0 0 0 0 1 1 86
85+
10 0 0 0 0 3 1 86
86+
7 0 0 0 0 1 1 86
87+
2 0 0 0 0 3 1 86
88+
8 0 0 0 0 5 1 86
89+
0 0 0 0 0 0 1 87
90+
0 0 0 0 0 0 5 88 89 90 91 92
91+
1 0 0 0 1 0 4 97 96 95 93
92+
10 0 0 0 3 0 3 97 95 94
93+
1 0 0 0 3 0 3 96 95 94
94+
4 0 0 0 3 0 2 96 93
95+
2 0 0 0 3 0 2 95 93
96+
10 0 0 0 1 0 1 94
97+
3 0 0 0 4 0 1 98
98+
10 0 0 0 2 0 1 98
99+
7 0 0 0 3 0 1 98
100+
4 0 0 0 2 0 1 98
101+
0 0 0 0 0 0 1 99
102+
0 0 0 0 0 0 7 100 102 103 106 107 108 109
103+
3 0 0 0 1 0 1 101
104+
7 0 0 0 2 0 2 105 104
105+
9 0 0 0 4 0 1 104
106+
8 0 0 0 2 0 1 104
107+
8 0 0 0 2 0 1 110
108+
1 0 0 0 3 0 1 110
109+
7 0 0 0 3 0 1 110
110+
6 0 0 0 3 0 1 110
111+
10 0 0 0 2 0 1 110
112+
2 0 0 0 3 0 1 110
113+
0 0 0 0 0 0 1 111
114+
0 0 0 0 0 0 3 112 113 114
115+
10 0 0 0 0 1 4 121 120 118 115
116+
3 0 0 0 0 3 3 120 119 115
117+
6 0 0 0 0 3 3 119 117 116
118+
9 0 0 0 0 2 1 117
119+
5 0 0 0 0 2 1 118
120+
8 0 0 0 0 3 1 122
121+
8 0 0 0 0 3 1 122
122+
7 0 0 0 0 3 1 122
123+
8 0 0 0 0 3 1 122
124+
2 0 0 0 0 2 1 122
125+
0 0 0 0 0 0 0
126+
0.250000 0.000000 0.000000
127+
2
128+
5 2 3 4 5 6
129+
2 7 8
130+
1 1
131+
1 2
132+
1 2
133+
1 2
134+
1 2
135+
1 2
136+
1 2
137+
1 2
138+
1 2
139+
1 2
140+
1 2
141+
1 2
142+
1 2
143+
1 3
144+
1 3
145+
1 3
146+
1 3
147+
1 3
148+
1 3
149+
1 3
150+
1 3
151+
1 3
152+
1 3
153+
1 3
154+
1 3
155+
1 4
156+
1 4
157+
1 4
158+
1 4
159+
1 4
160+
1 4
161+
1 4
162+
1 4
163+
1 4
164+
1 4
165+
1 4
166+
1 4
167+
1 5
168+
1 5
169+
1 5
170+
1 5
171+
1 5
172+
1 5
173+
1 5
174+
1 5
175+
1 5
176+
1 5
177+
1 5
178+
1 5
179+
1 6
180+
1 6
181+
1 6
182+
1 6
183+
1 6
184+
1 6
185+
1 6
186+
1 6
187+
1 6
188+
1 6
189+
1 6
190+
1 6
191+
1 1
192+
1 7
193+
1 7
194+
1 7
195+
1 7
196+
1 7
197+
1 7
198+
1 7
199+
1 7
200+
1 7
201+
1 7
202+
1 7
203+
1 7
204+
1 8
205+
1 8
206+
1 8
207+
1 8
208+
1 8
209+
1 8
210+
1 8
211+
1 8
212+
1 8
213+
1 8
214+
1 8
215+
1 8
216+
1 1
217+
1 1
218+
1 1
219+
1 1
220+
1 1
221+
1 1
222+
1 1
223+
1 1
224+
1 1
225+
1 1
226+
1 1
227+
1 1
228+
1 1
229+
1 1
230+
1 1
231+
1 1
232+
1 1
233+
1 1
234+
1 1
235+
1 1
236+
1 1
237+
1 1
238+
1 1
239+
1 1
240+
1 1
241+
1 1
242+
1 1
243+
1 1
244+
1 1
245+
1 1
246+
1 1
247+
1 1
248+
1 1
249+
1 1
250+
1 1
251+
1 1

0 commit comments

Comments
 (0)