|
| 1 | +# PackingSolver |
| 2 | + |
| 3 | +A state-of-the-art tree search based solver for (geometrical) Packing Problems. |
| 4 | + |
| 5 | +Only rectangle two- and three staged guillotine variants have been implemented yet. |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | +* Code author: Florian Fontan |
| 10 | +* Algorithm design: [Luc Libralesso](https://github.com/librallu), Florian Fontan |
| 11 | + |
| 12 | +For commercial support, custom developments or industrial collaboration, please do not hesitate to contact me (Florian Fontan). |
| 13 | +For academic collaboration, please do not hesitate to contact Luc Libralesso. |
| 14 | + |
| 15 | +## Usage |
| 16 | + |
| 17 | +Note: PackingSolver favours efficiency and flexibility over ease of use. Therefore, some knowledge about tree search algorithms and packing problems is required in order to use it. |
| 18 | + |
| 19 | +Compile: |
| 20 | +```shell |
| 21 | +bazel build -- //... |
| 22 | +``` |
| 23 | + |
| 24 | +Execute: |
| 25 | +```shell |
| 26 | +./bazel-bin/packingsolver/main -v \ |
| 27 | + --problem-type rectangleguillotine \ |
| 28 | + --objective knapsack \ |
| 29 | + --items data/rectangle/alvarez2002/ATP30_items.csv \ |
| 30 | + --bins data/rectangle/alvarez2002/ATP30_bins.csv \ |
| 31 | + --certificate ATP30_solution.csv \ |
| 32 | + --output ATP30_output.json \ |
| 33 | + --time-limit 2 \ |
| 34 | + -q "RG -p 3NHO -s 2" -a "MBA* -f 1.5 -c 4" \ |
| 35 | + -q "RG -p 3NHO -s 3" -a "MBA* -f 1.5 -c 4" |
| 36 | +``` |
| 37 | + |
| 38 | +Problem types: `rectangleguillotine` (`RG`) |
| 39 | + |
| 40 | +The problem type defines the the certificate format. |
| 41 | +Each problem type has a list of available objectives and a list of available branching schemes. |
| 42 | + |
| 43 | +Each branching scheme has a list a compatible algorithms. |
| 44 | + |
| 45 | +Each pair `-q`/`-a` respectively defines the branching scheme and the algorithm for a thread. |
| 46 | + |
| 47 | +Options `--bin-infinite-copies`, `--bin-infinite-width`, `--bin-infinite-height` and `--unweighted` are available to modify the instance properties. |
| 48 | + |
| 49 | +### Problem type rectangleguillotine (RG) |
| 50 | + |
| 51 | +* Available objectives: `default`, `bin-packing` (`BPP`), `knapsack` (`KP`), `strip-packing` (`SPP`), `bin-packing-with-leftovers` (`BPPL`) |
| 52 | +* Available branching schemes: `rectangle-guillotine` (`RG`) |
| 53 | + |
| 54 | +### Branching scheme rectangle-guillotine (RG) |
| 55 | + |
| 56 | +options: |
| 57 | +* `--cut-type-1`: `three-staged-guillotine`, `two-staged-guillotine` |
| 58 | +* `--cut-type-2`: `roadef2018`, `non-exact`, `exact`, `homogenous` |
| 59 | +* `--first-stage-orientation`: `vertical`, `horizontal`, `any` |
| 60 | +* `--min1cut`, `--max1cut`, `--min2cut`, `--max2cut`: positive integer |
| 61 | +* `--min-waste`: positive integer |
| 62 | +* `--no-item-rotation` |
| 63 | +* `--cut-through-defects` |
| 64 | +* `--symmetry`, `-s`: 1, 2, 3 or 4 |
| 65 | +* `--no-symmetry-2` |
| 66 | +* `-p`: predefined configurations. Examples: |
| 67 | + * `3RVR`: `--cut-type-1 three-staged-guillotine --cut-type-2 roadef2018 --first-stage-orientation vertical` |
| 68 | + * `2NHO`: `--cut-type-1 two-staged-guillotine --cut-type-2 non-exact --first-stage-orientation horizontal --no-item-rotation` |
| 69 | + * `3EAR`: `--cut-type-1 three-staged-guillotine --cut-type-2 exact --first-stage-orientation any` |
| 70 | + * `roadef2018` |
| 71 | + |
| 72 | +Compatible algorithms: `A*`, `DFS`, `MBA*`, `DPA*` |
| 73 | + |
| 74 | +## Benchmarks |
| 75 | + |
| 76 | +The performances of PackingSolver have been compared to all published results from the scientific literature on corresponding Packing Problems. |
| 77 | +Detailed results are available in `results.ods`. |
| 78 | +`output.7z` contains all output files and solutions. |
| 79 | + |
| 80 | +Do not hesitate to contact us if you are aware of any variant or article that we missed. |
| 81 | + |
| 82 | +All experiments can be reproduced using the following scripts: |
| 83 | +```shell |
| 84 | +./packingsolver/scripts/bench "roadef2018_A" "roadef2018_B" "roadef2018_X" # ~50h |
| 85 | +./packingsolver/scripts/bench "3NEGH-BPP-O" "3NEGH-BPP-R" "3GH-BPP-O" "3HGV-BPP-O" # ~30h |
| 86 | +./packingsolver/scripts/bench "2NEGH-BPP-O" "2NEGH-BPP-R" "2GH-BPP-O" # ~30h |
| 87 | +./packingsolver/scripts/bench "3NEG-KP-O" "3NEG-KP-R" "3NEGV-KP-O" "3HG-KP-O" # ~10h |
| 88 | +./packingsolver/scripts/bench "2NEG-KP-O" "2NEGH-KP-O" "2NEGV-KP-O" "2NEGH-KP-R" "2G-KP-O" "2GH-KP-O" "2GV-KP-O" # 1h |
| 89 | +./packingsolver/scripts/bench "3NEGH-SPP-O" "3NEGH-SPP-R" # ~10h |
| 90 | +./packingsolver/scripts/bench "2NEGH-SPP-O" # ~2h |
| 91 | +``` |
| 92 | + |
0 commit comments