Skip to content

Commit 5b1006c

Browse files
committed
Improve free rotations for large items
1 parent c8d107f commit 5b1006c

11 files changed

Lines changed: 814 additions & 212 deletions

File tree

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"objective": "knapsack",
3+
"bin_types": [
4+
{
5+
"type": "polygon",
6+
"vertices": [
7+
{
8+
"x": 0,
9+
"y": 0
10+
},
11+
{
12+
"x": 100,
13+
"y": 0
14+
},
15+
{
16+
"x": 100,
17+
"y": 50
18+
},
19+
{
20+
"x": 0,
21+
"y": 50
22+
}
23+
]
24+
}
25+
],
26+
"item_types": [
27+
{
28+
"type": "polygon",
29+
"allowed_rotations": [
30+
{"start": 0, "end": 360}
31+
],
32+
"vertices": [
33+
{
34+
"x": 0,
35+
"y": 0
36+
},
37+
{
38+
"x": 105,
39+
"y": 0
40+
},
41+
{
42+
"x": 105,
43+
"y": 5
44+
},
45+
{
46+
"x": 0,
47+
"y": 5
48+
}
49+
]
50+
}
51+
]
52+
}
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
{
2+
"bins": [
3+
{
4+
"copies": 1,
5+
"id": 0,
6+
"items": [
7+
{
8+
"angle": 159.31944436399348,
9+
"id": 0,
10+
"item_shapes": [
11+
{
12+
"shape": [
13+
{
14+
"type": "LineSegment",
15+
"xe": 1.7657868174950835,
16+
"xs": 99.99999999999999,
17+
"ye": 41.75934284275408,
18+
"ys": 4.677819675357377
19+
},
20+
{
21+
"type": "LineSegment",
22+
"xe": 0.0,
23+
"xs": 1.7657868174950835,
24+
"ye": 37.0815231673967,
25+
"ys": 41.75934284275408
26+
},
27+
{
28+
"type": "LineSegment",
29+
"xe": 98.2342131825049,
30+
"xs": 0.0,
31+
"ye": 0.0,
32+
"ys": 37.0815231673967
33+
},
34+
{
35+
"type": "LineSegment",
36+
"xe": 99.99999999999999,
37+
"xs": 98.2342131825049,
38+
"ye": 4.677819675357377,
39+
"ys": 0.0
40+
}
41+
]
42+
}
43+
],
44+
"mirror": false,
45+
"x": 99.99999999999999,
46+
"y": 4.677819675357377
47+
}
48+
],
49+
"shape": [
50+
{
51+
"type": "LineSegment",
52+
"xe": 100.0,
53+
"xs": 0.0,
54+
"ye": 0.0,
55+
"ys": 0.0
56+
},
57+
{
58+
"type": "LineSegment",
59+
"xe": 100.0,
60+
"xs": 100.0,
61+
"ye": 50.0,
62+
"ys": 0.0
63+
},
64+
{
65+
"type": "LineSegment",
66+
"xe": 0.0,
67+
"xs": 100.0,
68+
"ye": 50.0,
69+
"ys": 50.0
70+
},
71+
{
72+
"type": "LineSegment",
73+
"xe": 0.0,
74+
"xs": 0.0,
75+
"ye": 0.0,
76+
"ys": 50.0
77+
}
78+
]
79+
}
80+
]
81+
}

0 commit comments

Comments
 (0)