Skip to content

Commit

Permalink
Parse ASLIB instances
Browse files Browse the repository at this point in the history
  • Loading branch information
leonlan committed Feb 5, 2025
1 parent 7db37e2 commit fbe88ce
Show file tree
Hide file tree
Showing 6 changed files with 692 additions and 161 deletions.
251 changes: 251 additions & 0 deletions data/aslib0_0.rcp
Original file line number Diff line number Diff line change
@@ -0,0 +1,251 @@
122 5
10 10 10 10 10

0 0 0 0 0 0 5 2 14 26 38 50
0 0 0 0 0 0 6 3 4 5 6 7 8
1 0 0 1 0 0 2 10 9
1 0 0 5 0 0 2 10 9
7 0 0 4 0 0 2 10 9
1 0 0 4 0 0 2 10 9
5 0 0 3 0 0 2 10 9
6 0 0 1 0 0 1 9
3 0 0 1 0 0 2 12 11
8 0 0 2 0 0 2 12 11
3 0 0 2 0 0 1 13
9 0 0 2 0 0 1 13
0 0 0 0 0 0 1 62
0 0 0 0 0 0 6 15 16 18 19 20 24
6 0 0 0 0 1 2 23 22
5 0 0 0 0 3 1 17
9 0 0 0 0 2 1 21
5 0 0 0 0 2 1 21
2 0 0 0 0 5 1 21
9 0 0 0 0 2 1 21
1 0 0 0 0 2 1 25
4 0 0 0 0 2 1 25
1 0 0 0 0 4 1 25
1 0 0 0 0 2 1 25
0 0 0 0 0 0 1 62
0 0 0 0 0 0 6 27 28 29 30 32 36
10 0 0 0 1 0 3 35 34 33
2 0 0 0 2 0 2 34 31
8 0 0 0 2 0 2 34 33
1 0 0 0 1 0 1 31
1 0 0 0 4 0 1 33
3 0 0 0 5 0 1 33
4 0 0 0 4 0 1 37
2 0 0 0 1 0 1 37
8 0 0 0 3 0 1 37
9 0 0 0 2 0 1 37
0 0 0 0 0 0 1 62
0 0 0 0 0 0 3 39 40 43
4 0 0 0 1 0 3 48 42 41
8 0 0 0 3 0 3 47 44 41
5 0 0 0 3 0 2 46 45
5 0 0 0 3 0 2 47 46
10 0 0 0 1 0 1 44
6 0 0 0 2 0 1 45
2 0 0 0 4 0 1 49
2 0 0 0 2 0 1 49
3 0 0 0 2 0 1 49
10 0 0 0 4 0 1 49
0 0 0 0 0 0 1 62
0 0 0 0 0 0 4 51 52 53 56
5 1 0 0 0 0 4 60 59 58 54
10 2 0 0 0 0 4 59 58 55 54
2 2 0 0 0 0 3 60 59 57
9 4 0 0 0 0 1 57
2 2 0 0 0 0 1 57
6 1 0 0 0 0 1 58
1 3 0 0 0 0 1 61
4 1 0 0 0 0 1 61
7 4 0 0 0 0 1 61
10 5 0 0 0 0 1 61
0 0 0 0 0 0 1 62
0 0 0 0 0 0 2 63 75
0 0 0 0 0 0 3 64 65 69
5 0 0 1 0 0 3 68 67 66
6 0 0 2 0 0 3 68 67 66
5 0 0 2 0 0 4 73 72 71 70
3 0 0 3 0 0 2 72 70
9 0 0 5 0 0 2 71 70
1 0 0 3 0 0 2 71 70
4 0 0 4 0 0 1 74
5 0 0 2 0 0 1 74
3 0 0 1 0 0 1 74
10 0 0 2 0 0 1 74
0 0 0 0 0 0 1 87
0 0 0 0 0 0 6 76 78 80 83 84 85
6 0 0 0 0 1 1 77
3 0 0 0 0 3 2 82 81
7 0 0 0 0 2 1 79
9 0 0 0 0 1 1 81
6 0 0 0 0 5 1 81
4 0 0 0 0 1 1 86
10 0 0 0 0 3 1 86
7 0 0 0 0 1 1 86
2 0 0 0 0 3 1 86
8 0 0 0 0 5 1 86
0 0 0 0 0 0 1 87
0 0 0 0 0 0 5 88 89 90 91 92
1 0 0 0 1 0 4 97 96 95 93
10 0 0 0 3 0 3 97 95 94
1 0 0 0 3 0 3 96 95 94
4 0 0 0 3 0 2 96 93
2 0 0 0 3 0 2 95 93
10 0 0 0 1 0 1 94
3 0 0 0 4 0 1 98
10 0 0 0 2 0 1 98
7 0 0 0 3 0 1 98
4 0 0 0 2 0 1 98
0 0 0 0 0 0 1 99
0 0 0 0 0 0 7 100 102 103 106 107 108 109
3 0 0 0 1 0 1 101
7 0 0 0 2 0 2 105 104
9 0 0 0 4 0 1 104
8 0 0 0 2 0 1 104
8 0 0 0 2 0 1 110
1 0 0 0 3 0 1 110
7 0 0 0 3 0 1 110
6 0 0 0 3 0 1 110
10 0 0 0 2 0 1 110
2 0 0 0 3 0 1 110
0 0 0 0 0 0 1 111
0 0 0 0 0 0 3 112 113 114
10 0 0 0 0 1 4 121 120 118 115
3 0 0 0 0 3 3 120 119 115
6 0 0 0 0 3 3 119 117 116
9 0 0 0 0 2 1 117
5 0 0 0 0 2 1 118
8 0 0 0 0 3 1 122
8 0 0 0 0 3 1 122
7 0 0 0 0 3 1 122
8 0 0 0 0 3 1 122
2 0 0 0 0 2 1 122
0 0 0 0 0 0 0
0.250000 0.000000 0.000000
2
5 2 3 4 5 6
2 7 8
1 1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 3
1 3
1 3
1 3
1 3
1 3
1 3
1 3
1 3
1 3
1 3
1 3
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 5
1 5
1 5
1 5
1 5
1 5
1 5
1 5
1 5
1 5
1 5
1 5
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 1
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 change: 1 addition & 0 deletions psplib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from .parse import parse as parse
from .parse_aslib import parse_aslib as parse_aslib
from .parse_mplib import parse_mplib as parse_mplib
from .parse_patterson import parse_patterson as parse_patterson
from .parse_psplib import parse_psplib as parse_psplib
Expand Down
3 changes: 3 additions & 0 deletions psplib/parse.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from pathlib import Path
from typing import Union

from .parse_aslib import parse_aslib
from .parse_mplib import parse_mplib
from .parse_patterson import parse_patterson
from .parse_psplib import parse_psplib
Expand Down Expand Up @@ -38,5 +39,7 @@ def parse(
return parse_mplib(loc)
elif instance_format == "rcpsp_ps":
return parse_rcpsp_ps(loc)
elif instance_format == "aslib":
return parse_aslib(loc)

raise ValueError(f"Unknown instance format: {instance_format}")
Loading

0 comments on commit fbe88ce

Please sign in to comment.