packingsolver 0.1.1235__tar.gz → 0.1.1237__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/PKG-INFO +41 -28
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/README.md +40 -27
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/box/instance.hpp +16 -7
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/box/instance_builder.hpp +13 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/box/optimize.hpp +26 -0
- packingsolver-0.1.1237/include/packingsolver/box/post_process.hpp +56 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/box/solution.hpp +32 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/boxstacks/instance.hpp +25 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/boxstacks/instance_builder.hpp +3 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/boxstacks/optimize.hpp +12 -0
- packingsolver-0.1.1237/include/packingsolver/boxstacks/post_process.hpp +56 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/boxstacks/solution.hpp +33 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/rectangle/instance.hpp +8 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/rectangle/instance_builder.hpp +3 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/rectangle/optimize.hpp +12 -0
- packingsolver-0.1.1237/include/packingsolver/rectangle/post_process.hpp +56 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/rectangle/solution.hpp +33 -0
- packingsolver-0.1.1237/python/packingsolver/_version.py +1 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/src/box.cpp +1 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/src/boxstacks.cpp +1 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/src/rectangle.cpp +1 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/tests/test_box.py +2 -0
- packingsolver-0.1.1237/src/algorithms/staircase.hpp +142 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/box/CMakeLists.txt +1 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/box/instance.cpp +2 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/box/instance_builder.cpp +31 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/box/main.cpp +6 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/box/optimize.cpp +206 -11
- packingsolver-0.1.1237/src/box/post_process.cpp +109 -0
- packingsolver-0.1.1237/src/box/sequential_feasibility.cpp +239 -0
- packingsolver-0.1.1237/src/box/sequential_feasibility.hpp +47 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/box/solution.cpp +78 -40
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/box/tree_search.cpp +80 -7
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/box/tree_search.hpp +47 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/box/tree_search_maximal_spaces.cpp +42 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/boxstacks/instance.cpp +3 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/boxstacks/instance_builder.cpp +4 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/boxstacks/main.cpp +6 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/boxstacks/optimize.cpp +91 -0
- packingsolver-0.1.1237/src/boxstacks/post_process.cpp +110 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/boxstacks/solution.cpp +71 -35
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/boxstacks/tree_search.cpp +74 -9
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/boxstacks/tree_search.hpp +40 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangle/CMakeLists.txt +1 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangle/instance.cpp +4 -1
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangle/instance_builder.cpp +4 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangle/main.cpp +6 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangle/optimize.cpp +70 -84
- packingsolver-0.1.1237/src/rectangle/post_process.cpp +109 -0
- packingsolver-0.1.1237/src/rectangle/sequential_feasibility.cpp +227 -0
- packingsolver-0.1.1237/src/rectangle/sequential_feasibility.hpp +45 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangle/solution.cpp +80 -40
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangle/tree_search.cpp +67 -3
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangle/tree_search.hpp +34 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangle/tree_search_maximal_spaces.cpp +41 -0
- packingsolver-0.1.1235/include/packingsolver/box/post_process.hpp +0 -25
- packingsolver-0.1.1235/include/packingsolver/boxstacks/post_process.hpp +0 -25
- packingsolver-0.1.1235/include/packingsolver/rectangle/post_process.hpp +0 -25
- packingsolver-0.1.1235/python/packingsolver/_version.py +0 -1
- packingsolver-0.1.1235/src/box/post_process.cpp +0 -13
- packingsolver-0.1.1235/src/boxstacks/post_process.cpp +0 -13
- packingsolver-0.1.1235/src/rectangle/post_process.cpp +0 -13
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/CMakeLists.txt +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/LICENSE +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/extern/CMakeLists.txt +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/algorithms/common.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/algorithms/truck.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/box/algorithm_formatter.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/box/reduction.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/boxstacks/algorithm_formatter.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/boxstacks/reduction.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/irregular/algorithm_formatter.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/irregular/instance.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/irregular/instance_builder.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/irregular/optimize.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/irregular/post_process.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/irregular/reduction.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/irregular/solution.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/onedimensional/algorithm_formatter.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/onedimensional/instance.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/onedimensional/instance_builder.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/onedimensional/optimize.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/onedimensional/post_process.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/onedimensional/reduction.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/onedimensional/solution.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/rectangle/algorithm_formatter.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/rectangle/reduction.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/rectangleguillotine/algorithm_formatter.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/rectangleguillotine/instance.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/rectangleguillotine/instance_builder.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/rectangleguillotine/optimize.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/rectangleguillotine/post_process.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/rectangleguillotine/reduction.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/rectangleguillotine/solution.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/pyproject.toml +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/CMakeLists.txt +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/packingsolver/__init__.py +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/packingsolver/_visualize.py +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/packingsolver/box.py +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/packingsolver/boxstacks.py +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/packingsolver/irregular.py +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/packingsolver/onedimensional.py +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/packingsolver/rectangle.py +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/packingsolver/rectangleguillotine.py +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/packingsolver/visualize/__init__.py +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/packingsolver/visualize/box.py +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/packingsolver/visualize/boxstacks.py +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/packingsolver/visualize/irregular.py +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/packingsolver/visualize/onedimensional.py +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/packingsolver/visualize/rectangle.py +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/packingsolver/visualize/rectangleguillotine.py +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/src/common.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/src/common.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/src/irregular.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/src/module.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/src/onedimensional.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/src/rectangleguillotine.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/tests/test_bin_cost.py +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/tests/test_boxstacks.py +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/tests/test_boxstacks_json.py +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/tests/test_copies_min.py +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/tests/test_doc_examples.py +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/tests/test_group_weight_constraints.py +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/tests/test_infeasibility.py +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/tests/test_instance.py +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/tests/test_irregular.py +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/tests/test_item_fits.py +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/tests/test_leftover_modes.py +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/tests/test_onedimensional.py +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/tests/test_parameters.py +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/tests/test_rectangle.py +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/tests/test_rectangleguillotine.py +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/tests/test_visualize.py +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/tests/test_visualize_box.py +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/tests/test_visualize_boxstacks.py +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/tests/test_visualize_irregular.py +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/tests/test_visualize_onedimensional.py +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/tests/test_visualize_rectangle.py +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/python/tests/test_visualize_rectangleguillotine.py +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/CMakeLists.txt +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/algorithms/CMakeLists.txt +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/algorithms/column_generation.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/algorithms/common.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/algorithms/dichotomic_search.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/algorithms/dominated_items.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/algorithms/meet_in_the_middle.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/algorithms/sequential_value_correction.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/algorithms/subset_sum_bound.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/algorithms/thread_pool.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/box/algorithm_formatter.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/box/block.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/box/block.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/box/dual_feasible_functions.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/box/dual_feasible_functions.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/box/instance_flipper.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/box/instance_flipper.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/box/reduction.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/box/solution_builder.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/box/solution_builder.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/box/tree_search_maximal_spaces.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/box/trivial.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/box/trivial.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/boxstacks/CMakeLists.txt +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/boxstacks/algorithm_formatter.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/boxstacks/instance_flipper.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/boxstacks/instance_flipper.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/boxstacks/reduction.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/boxstacks/sequential_onedimensional_rectangle.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/boxstacks/sequential_onedimensional_rectangle.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/boxstacks/solution_builder.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/boxstacks/solution_builder.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/CMakeLists.txt +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/algorithm_formatter.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/black_box_optimization/no_fit_polygon.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/black_box_optimization/no_fit_polygon.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/black_box_optimization/separator.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/black_box_optimization/separator.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/convert.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/convert.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/convert_main.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/direct_trigonometry/polygon.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/direct_trigonometry/polygon.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/direct_trigonometry/separator.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/direct_trigonometry/separator.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/fill_solution_file_main.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/instance.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/instance_builder.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/large_item_first.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/large_item_first.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/leftover.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/leftover.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/linear_programming/anchor.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/linear_programming/anchor.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/linear_programming/separation_model.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/linear_programming/separation_model.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/linear_programming/separator.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/linear_programming/separator.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/local_search.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/local_search.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/main.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/milp_raster.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/milp_raster.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/nonlinear_programming/separating_line.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/nonlinear_programming/separating_line.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/nonlinear_programming/separation_model.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/nonlinear_programming/separation_model.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/nonlinear_programming/separator.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/nonlinear_programming/separator.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/optimize.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/periodic_packing.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/periodic_packing.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/post_process.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/reduction.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/rotations.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/rotations.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/sequential_feasibility.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/sequential_feasibility.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/shape_simplification.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/shape_simplification.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/solution.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/solution_builder.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/solution_builder.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/tree_search.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/tree_search.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/tree_search_periodic_packing.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/tree_search_periodic_packing.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/trivial.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/trivial.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/irregular/utils.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/onedimensional/CMakeLists.txt +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/onedimensional/algorithm_formatter.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/onedimensional/dual_feasible_functions.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/onedimensional/dual_feasible_functions.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/onedimensional/dynamic_programming.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/onedimensional/dynamic_programming.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/onedimensional/instance.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/onedimensional/instance_builder.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/onedimensional/main.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/onedimensional/milp_assignment.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/onedimensional/milp_assignment.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/onedimensional/optimize.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/onedimensional/post_process.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/onedimensional/reduction.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/onedimensional/solution.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/onedimensional/solution_builder.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/onedimensional/solution_builder.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/onedimensional/tree_search.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/onedimensional/tree_search.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangle/algorithm_formatter.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangle/bar_relaxation.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangle/bar_relaxation.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangle/benders_decomposition.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangle/benders_decomposition.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangle/benders_decomposition_contiguity.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangle/benders_decomposition_contiguity.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangle/block.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangle/block.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangle/conservative_scales.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangle/conservative_scales.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangle/dual_feasible_functions.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangle/dual_feasible_functions.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangle/instance_flipper.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangle/instance_flipper.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangle/item_subset_incompatibility.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangle/item_subset_incompatibility.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangle/onedimentional_contiguity/milp.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangle/onedimentional_contiguity/milp.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangle/onedimentional_contiguity/tree_search.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangle/onedimentional_contiguity/tree_search.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangle/reduction.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangle/solution_builder.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangle/solution_builder.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangle/tree_search_maximal_spaces.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangleguillotine/CMakeLists.txt +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangleguillotine/algorithm_formatter.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangleguillotine/block.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangleguillotine/block.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangleguillotine/column_generation_strips.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangleguillotine/column_generation_strips.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangleguillotine/instance.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangleguillotine/instance_builder.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangleguillotine/instance_flipper.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangleguillotine/instance_flipper.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangleguillotine/main.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangleguillotine/optimize.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangleguillotine/post_process.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangleguillotine/reduction.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangleguillotine/sequential_feasibility.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangleguillotine/sequential_feasibility.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangleguillotine/sequential_strips_onedimensional.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangleguillotine/sequential_strips_onedimensional.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangleguillotine/solution.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangleguillotine/solution_builder.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangleguillotine/solution_builder.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangleguillotine/tree_search.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangleguillotine/tree_search.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangleguillotine/tree_search_hypergraph.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangleguillotine/tree_search_hypergraph.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangleguillotine/tree_search_hypergraph_infinite_copies.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangleguillotine/tree_search_hypergraph_infinite_copies.hpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangleguillotine/tree_search_maximal_spaces.cpp +0 -0
- {packingsolver-0.1.1235 → packingsolver-0.1.1237}/src/rectangleguillotine/tree_search_maximal_spaces.hpp +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: packingsolver
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1237
|
|
4
4
|
Summary: A solver for geometrical packing and cutting-stock problems
|
|
5
5
|
Author: Florian Fontan
|
|
6
6
|
License-Expression: MIT
|
|
@@ -29,7 +29,8 @@ Description-Content-Type: text/markdown
|
|
|
29
29
|
</p>
|
|
30
30
|
|
|
31
31
|
<p align="center">
|
|
32
|
-
<b>A state-of-the-art solver for cutting and packing problems
|
|
32
|
+
<b>A state-of-the-art solver for cutting and packing problems</b><br>
|
|
33
|
+
Nesting, cutting optimization, load planning etc
|
|
33
34
|
</p>
|
|
34
35
|
|
|
35
36
|
<p align="center">
|
|
@@ -38,45 +39,57 @@ Description-Content-Type: text/markdown
|
|
|
38
39
|
<a href="https://github.com/fontanf/packingsolver/discussions">Ask a question</a>
|
|
39
40
|
</p>
|
|
40
41
|
|
|
41
|
-
|
|
42
|
+
<p align="center">
|
|
43
|
+
<a href="https://fontanf.github.io/packingsolver/rectangleguillotine.html"><img src="https://raw.githubusercontent.com/fontanf/packingsolver/master/img/rectangleguillotine.png" width="32%" alt="Rectangles, guillotine cuts"></a>
|
|
44
|
+
<a href="https://fontanf.github.io/packingsolver/rectangle.html"><img src="https://raw.githubusercontent.com/fontanf/packingsolver/master/img/rectangle.png" width="32%" alt="Rectangles"></a>
|
|
45
|
+
<a href="https://fontanf.github.io/packingsolver/irregular.html"><img src="https://raw.githubusercontent.com/fontanf/packingsolver/master/img/irregular.png" width="32%" alt="Irregular shapes"></a>
|
|
46
|
+
<a href="https://fontanf.github.io/packingsolver/box.html"><img src="https://raw.githubusercontent.com/fontanf/packingsolver/master/img/box.png" width="32%" alt="Boxes"></a>
|
|
47
|
+
<a href="https://fontanf.github.io/packingsolver/boxstacks.html"><img src="https://raw.githubusercontent.com/fontanf/packingsolver/master/img/boxstacks.png" width="32%" alt="Box stacks"></a>
|
|
48
|
+
<a href="https://fontanf.github.io/packingsolver/onedimensional.html"><img src="https://raw.githubusercontent.com/fontanf/packingsolver/master/img/onedimensional.png" width="32%" alt="One-dimensional"></a>
|
|
49
|
+
</p>
|
|
42
50
|
|
|
43
|
-
|
|
51
|
+
PackingSolver computes cutting and loading plans. Given the pieces to cut or to load (the **items**: parts, panels, bars, boxes...) and what they must go into (the **bins**: sheets, plates, stock bars, pallets, trucks, containers...), it finds how to place the items in the bins, for example to use as little material as possible.
|
|
44
52
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
|
50
|
-
|
|
51
|
-
|
|
|
52
|
-
| [
|
|
53
|
+
It is available as a C++ library, a command-line tool, a Python package, and a web page that runs in the browser.
|
|
54
|
+
|
|
55
|
+
## Applications
|
|
56
|
+
|
|
57
|
+
| Application | Typical use | Problem type |
|
|
58
|
+
|:--|:--|:--|
|
|
59
|
+
| **Panel saws**: wood panels, furniture and cabinet making, glass, stone, paper | Cutting plans with edge-to-edge cuts, taking into account the saw blade thickness, the trims and the defects of the panels | [Rectangles, guillotine cuts](https://fontanf.github.io/packingsolver/rectangleguillotine.html) |
|
|
60
|
+
| **Nesting for CNC, laser, plasma and waterjet cutting**: sheet metal, wood, plastics, foam | Nesting of parts of any shape on sheets, with the spacing between the parts and to the edges, part rotations and mirroring, parts with holes, sheet defects and remnants | [Irregular shapes](https://fontanf.github.io/packingsolver/irregular.html), or [Rectangles](https://fontanf.github.io/packingsolver/rectangle.html) for rectangular parts |
|
|
61
|
+
| **Textile, garment, leather and composite cutting** | Nesting of patterns on a roll, minimizing the length used, or on hides of irregular shapes with defects | [Irregular shapes](https://fontanf.github.io/packingsolver/irregular.html) |
|
|
62
|
+
| **Cutting of bars, tubes, profiles, beams, cables, paper rolls**: window and door frames, steel construction... | Cutting lengths out of stock bars, minimizing the number of bars and keeping the offcuts as long as possible | [One-dimensional](https://fontanf.github.io/packingsolver/onedimensional.html) |
|
|
63
|
+
| **Truck and trailer loading** | Loading stacks of pallets or boxes, with stackability rules, weight limits, the weight on the axles and the unloading order | [Box stacks](https://fontanf.github.io/packingsolver/boxstacks.html) |
|
|
64
|
+
| **Container, pallet and parcel loading** | Placing boxes in containers, on pallets or in cartons, with weight limits | [Boxes](https://fontanf.github.io/packingsolver/box.html) |
|
|
65
|
+
| **Palletizing, floor and warehouse planning** | Placing rectangles on a surface: pallet layers, pallets on a truck or warehouse floor | [Rectangles](https://fontanf.github.io/packingsolver/rectangle.html) |
|
|
53
66
|
|
|
54
67
|
## Features
|
|
55
68
|
|
|
56
|
-
|
|
69
|
+
| Problem type | Example |
|
|
70
|
+
|:--|:--|
|
|
71
|
+
| [**Rectangles, guillotine cuts**](https://fontanf.github.io/packingsolver/rectangleguillotine.html) `rectangleguillotine`<br>Two-dimensional rectangles cut with edge-to-edge (guillotine) cuts<br><br>Maximum number of cutting stages · cut types · first stage orientation · item rotations · cut thickness · trims · defects · cuts through defects · cutting sequences (stacks) · minimum and maximum distances between cuts · maximum number of consecutive 1-cuts and 2-cuts | <img src="https://raw.githubusercontent.com/fontanf/packingsolver/master/img/rectangleguillotine.png" width="480"> |
|
|
72
|
+
| [**Rectangles**](https://fontanf.github.io/packingsolver/rectangle.html) `rectangle`<br>Two-dimensional rectangles<br><br>Item rotations · defects · maximum weight of a bin · unloading constraints | <img src="https://raw.githubusercontent.com/fontanf/packingsolver/master/img/rectangle.png" width="480"> |
|
|
73
|
+
| [**Boxes**](https://fontanf.github.io/packingsolver/box.html) `box`<br>Three-dimensional boxes<br><br>Item rotations · maximum weight of a bin | <img src="https://raw.githubusercontent.com/fontanf/packingsolver/master/img/box.png" width="480"> |
|
|
74
|
+
| [**Box stacks**](https://fontanf.github.io/packingsolver/boxstacks.html) `boxstacks`<br>Three-dimensional boxes, packed in stacks of items with the same width and length<br><br>Item rotations · nesting height · maximum number of items in a stack · maximum weight above an item · maximum stack density · unloading constraints · maximum weight on the middle and rear axles | <img src="https://raw.githubusercontent.com/fontanf/packingsolver/master/img/boxstacks.png" width="480"> |
|
|
75
|
+
| [**One-dimensional**](https://fontanf.github.io/packingsolver/onedimensional.html) `onedimensional`<br>One-dimensional items<br><br>Nesting length · maximum number of items in a bin · maximum weight of a bin · maximum weight after an item | <img src="https://raw.githubusercontent.com/fontanf/packingsolver/master/img/onedimensional.png" width="480"> |
|
|
76
|
+
| [**Irregular shapes**](https://fontanf.github.io/packingsolver/irregular.html) `irregular`<br>Two-dimensional shapes: polygons, possibly with circular arcs and holes<br><br>Irregular bins · discrete and continuous item rotations · item mirroring · holes · defects · item-item, item-bin and item-defect spacing | <img src="https://raw.githubusercontent.com/fontanf/packingsolver/master/img/irregular.png" width="480"> |
|
|
57
77
|
|
|
58
|
-
|
|
59
|
-
* **Variable-sized bin packing**: pack all the items in bins of minimum total cost
|
|
60
|
-
* **Open dimension** (all problem types except one-dimensional): pack all the items in a single bin of minimum length
|
|
61
|
-
* **Knapsack**: pack a subset of the items of maximum total profit
|
|
62
|
-
* **Feasibility**: pack all the items in the given bins
|
|
78
|
+
## Objectives
|
|
63
79
|
|
|
64
|
-
|
|
80
|
+
PackingSolver supports the following [objectives](https://fontanf.github.io/packingsolver/objectives.html):
|
|
65
81
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
| [Box stacks](https://fontanf.github.io/packingsolver/boxstacks.html) | Item rotations · nesting height · maximum number of items in a stack · maximum weight above an item · maximum stack density · unloading constraints · maximum weight on the middle and rear axles |
|
|
72
|
-
| [One-dimensional](https://fontanf.github.io/packingsolver/onedimensional.html) | Nesting length · maximum number of items in a bin · maximum weight of a bin · maximum weight after an item |
|
|
73
|
-
| [Irregular shapes](https://fontanf.github.io/packingsolver/irregular.html) | Irregular bins · discrete and continuous item rotations · item mirroring · holes · defects · item-item, item-bin and item-defect spacing |
|
|
82
|
+
* **Bin packing**: pack all the items in a minimum number of bins, e.g. use as few sheets as possible (optionally keeping the leftover of the last sheet as large as possible, to reuse it as a remnant)
|
|
83
|
+
* **Variable-sized bin packing**: pack all the items in bins of minimum total cost, e.g. choose the cheapest combination of sheet sizes or trucks
|
|
84
|
+
* **Open dimension** (all problem types except one-dimensional): pack all the items in a single bin of minimum length, e.g. use as little fabric as possible from a roll
|
|
85
|
+
* **Knapsack**: pack a subset of the items of maximum total profit, e.g. fit the most valuable orders in a truck
|
|
86
|
+
* **Feasibility**: pack all the items in the given bins, e.g. check that a load fits in a container
|
|
74
87
|
|
|
75
88
|
## Getting started
|
|
76
89
|
|
|
77
90
|
### In the browser
|
|
78
91
|
|
|
79
|
-
The [online solver](https://packingsolver.pages.dev/) runs PackingSolver in
|
|
92
|
+
The [online solver](https://packingsolver.pages.dev/) runs PackingSolver in the browser. No installation is needed, and the computation runs locally: nothing is sent to a server.
|
|
80
93
|
|
|
81
94
|
### Python
|
|
82
95
|
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
11
|
<p align="center">
|
|
12
|
-
<b>A state-of-the-art solver for cutting and packing problems
|
|
12
|
+
<b>A state-of-the-art solver for cutting and packing problems</b><br>
|
|
13
|
+
Nesting, cutting optimization, load planning etc
|
|
13
14
|
</p>
|
|
14
15
|
|
|
15
16
|
<p align="center">
|
|
@@ -18,45 +19,57 @@
|
|
|
18
19
|
<a href="https://github.com/fontanf/packingsolver/discussions">Ask a question</a>
|
|
19
20
|
</p>
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
<p align="center">
|
|
23
|
+
<a href="https://fontanf.github.io/packingsolver/rectangleguillotine.html"><img src="https://raw.githubusercontent.com/fontanf/packingsolver/master/img/rectangleguillotine.png" width="32%" alt="Rectangles, guillotine cuts"></a>
|
|
24
|
+
<a href="https://fontanf.github.io/packingsolver/rectangle.html"><img src="https://raw.githubusercontent.com/fontanf/packingsolver/master/img/rectangle.png" width="32%" alt="Rectangles"></a>
|
|
25
|
+
<a href="https://fontanf.github.io/packingsolver/irregular.html"><img src="https://raw.githubusercontent.com/fontanf/packingsolver/master/img/irregular.png" width="32%" alt="Irregular shapes"></a>
|
|
26
|
+
<a href="https://fontanf.github.io/packingsolver/box.html"><img src="https://raw.githubusercontent.com/fontanf/packingsolver/master/img/box.png" width="32%" alt="Boxes"></a>
|
|
27
|
+
<a href="https://fontanf.github.io/packingsolver/boxstacks.html"><img src="https://raw.githubusercontent.com/fontanf/packingsolver/master/img/boxstacks.png" width="32%" alt="Box stacks"></a>
|
|
28
|
+
<a href="https://fontanf.github.io/packingsolver/onedimensional.html"><img src="https://raw.githubusercontent.com/fontanf/packingsolver/master/img/onedimensional.png" width="32%" alt="One-dimensional"></a>
|
|
29
|
+
</p>
|
|
22
30
|
|
|
23
|
-
|
|
31
|
+
PackingSolver computes cutting and loading plans. Given the pieces to cut or to load (the **items**: parts, panels, bars, boxes...) and what they must go into (the **bins**: sheets, plates, stock bars, pallets, trucks, containers...), it finds how to place the items in the bins, for example to use as little material as possible.
|
|
24
32
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
|
30
|
-
|
|
31
|
-
|
|
|
32
|
-
| [
|
|
33
|
+
It is available as a C++ library, a command-line tool, a Python package, and a web page that runs in the browser.
|
|
34
|
+
|
|
35
|
+
## Applications
|
|
36
|
+
|
|
37
|
+
| Application | Typical use | Problem type |
|
|
38
|
+
|:--|:--|:--|
|
|
39
|
+
| **Panel saws**: wood panels, furniture and cabinet making, glass, stone, paper | Cutting plans with edge-to-edge cuts, taking into account the saw blade thickness, the trims and the defects of the panels | [Rectangles, guillotine cuts](https://fontanf.github.io/packingsolver/rectangleguillotine.html) |
|
|
40
|
+
| **Nesting for CNC, laser, plasma and waterjet cutting**: sheet metal, wood, plastics, foam | Nesting of parts of any shape on sheets, with the spacing between the parts and to the edges, part rotations and mirroring, parts with holes, sheet defects and remnants | [Irregular shapes](https://fontanf.github.io/packingsolver/irregular.html), or [Rectangles](https://fontanf.github.io/packingsolver/rectangle.html) for rectangular parts |
|
|
41
|
+
| **Textile, garment, leather and composite cutting** | Nesting of patterns on a roll, minimizing the length used, or on hides of irregular shapes with defects | [Irregular shapes](https://fontanf.github.io/packingsolver/irregular.html) |
|
|
42
|
+
| **Cutting of bars, tubes, profiles, beams, cables, paper rolls**: window and door frames, steel construction... | Cutting lengths out of stock bars, minimizing the number of bars and keeping the offcuts as long as possible | [One-dimensional](https://fontanf.github.io/packingsolver/onedimensional.html) |
|
|
43
|
+
| **Truck and trailer loading** | Loading stacks of pallets or boxes, with stackability rules, weight limits, the weight on the axles and the unloading order | [Box stacks](https://fontanf.github.io/packingsolver/boxstacks.html) |
|
|
44
|
+
| **Container, pallet and parcel loading** | Placing boxes in containers, on pallets or in cartons, with weight limits | [Boxes](https://fontanf.github.io/packingsolver/box.html) |
|
|
45
|
+
| **Palletizing, floor and warehouse planning** | Placing rectangles on a surface: pallet layers, pallets on a truck or warehouse floor | [Rectangles](https://fontanf.github.io/packingsolver/rectangle.html) |
|
|
33
46
|
|
|
34
47
|
## Features
|
|
35
48
|
|
|
36
|
-
|
|
49
|
+
| Problem type | Example |
|
|
50
|
+
|:--|:--|
|
|
51
|
+
| [**Rectangles, guillotine cuts**](https://fontanf.github.io/packingsolver/rectangleguillotine.html) `rectangleguillotine`<br>Two-dimensional rectangles cut with edge-to-edge (guillotine) cuts<br><br>Maximum number of cutting stages · cut types · first stage orientation · item rotations · cut thickness · trims · defects · cuts through defects · cutting sequences (stacks) · minimum and maximum distances between cuts · maximum number of consecutive 1-cuts and 2-cuts | <img src="https://raw.githubusercontent.com/fontanf/packingsolver/master/img/rectangleguillotine.png" width="480"> |
|
|
52
|
+
| [**Rectangles**](https://fontanf.github.io/packingsolver/rectangle.html) `rectangle`<br>Two-dimensional rectangles<br><br>Item rotations · defects · maximum weight of a bin · unloading constraints | <img src="https://raw.githubusercontent.com/fontanf/packingsolver/master/img/rectangle.png" width="480"> |
|
|
53
|
+
| [**Boxes**](https://fontanf.github.io/packingsolver/box.html) `box`<br>Three-dimensional boxes<br><br>Item rotations · maximum weight of a bin | <img src="https://raw.githubusercontent.com/fontanf/packingsolver/master/img/box.png" width="480"> |
|
|
54
|
+
| [**Box stacks**](https://fontanf.github.io/packingsolver/boxstacks.html) `boxstacks`<br>Three-dimensional boxes, packed in stacks of items with the same width and length<br><br>Item rotations · nesting height · maximum number of items in a stack · maximum weight above an item · maximum stack density · unloading constraints · maximum weight on the middle and rear axles | <img src="https://raw.githubusercontent.com/fontanf/packingsolver/master/img/boxstacks.png" width="480"> |
|
|
55
|
+
| [**One-dimensional**](https://fontanf.github.io/packingsolver/onedimensional.html) `onedimensional`<br>One-dimensional items<br><br>Nesting length · maximum number of items in a bin · maximum weight of a bin · maximum weight after an item | <img src="https://raw.githubusercontent.com/fontanf/packingsolver/master/img/onedimensional.png" width="480"> |
|
|
56
|
+
| [**Irregular shapes**](https://fontanf.github.io/packingsolver/irregular.html) `irregular`<br>Two-dimensional shapes: polygons, possibly with circular arcs and holes<br><br>Irregular bins · discrete and continuous item rotations · item mirroring · holes · defects · item-item, item-bin and item-defect spacing | <img src="https://raw.githubusercontent.com/fontanf/packingsolver/master/img/irregular.png" width="480"> |
|
|
37
57
|
|
|
38
|
-
|
|
39
|
-
* **Variable-sized bin packing**: pack all the items in bins of minimum total cost
|
|
40
|
-
* **Open dimension** (all problem types except one-dimensional): pack all the items in a single bin of minimum length
|
|
41
|
-
* **Knapsack**: pack a subset of the items of maximum total profit
|
|
42
|
-
* **Feasibility**: pack all the items in the given bins
|
|
58
|
+
## Objectives
|
|
43
59
|
|
|
44
|
-
|
|
60
|
+
PackingSolver supports the following [objectives](https://fontanf.github.io/packingsolver/objectives.html):
|
|
45
61
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
| [Box stacks](https://fontanf.github.io/packingsolver/boxstacks.html) | Item rotations · nesting height · maximum number of items in a stack · maximum weight above an item · maximum stack density · unloading constraints · maximum weight on the middle and rear axles |
|
|
52
|
-
| [One-dimensional](https://fontanf.github.io/packingsolver/onedimensional.html) | Nesting length · maximum number of items in a bin · maximum weight of a bin · maximum weight after an item |
|
|
53
|
-
| [Irregular shapes](https://fontanf.github.io/packingsolver/irregular.html) | Irregular bins · discrete and continuous item rotations · item mirroring · holes · defects · item-item, item-bin and item-defect spacing |
|
|
62
|
+
* **Bin packing**: pack all the items in a minimum number of bins, e.g. use as few sheets as possible (optionally keeping the leftover of the last sheet as large as possible, to reuse it as a remnant)
|
|
63
|
+
* **Variable-sized bin packing**: pack all the items in bins of minimum total cost, e.g. choose the cheapest combination of sheet sizes or trucks
|
|
64
|
+
* **Open dimension** (all problem types except one-dimensional): pack all the items in a single bin of minimum length, e.g. use as little fabric as possible from a roll
|
|
65
|
+
* **Knapsack**: pack a subset of the items of maximum total profit, e.g. fit the most valuable orders in a truck
|
|
66
|
+
* **Feasibility**: pack all the items in the given bins, e.g. check that a load fits in a container
|
|
54
67
|
|
|
55
68
|
## Getting started
|
|
56
69
|
|
|
57
70
|
### In the browser
|
|
58
71
|
|
|
59
|
-
The [online solver](https://packingsolver.pages.dev/) runs PackingSolver in
|
|
72
|
+
The [online solver](https://packingsolver.pages.dev/) runs PackingSolver in the browser. No installation is needed, and the computation runs locally: nothing is sent to a server.
|
|
60
73
|
|
|
61
74
|
### Python
|
|
62
75
|
|
|
@@ -140,11 +140,11 @@ struct Box
|
|
|
140
140
|
};
|
|
141
141
|
|
|
142
142
|
/**
|
|
143
|
-
* Get the
|
|
144
|
-
* '
|
|
145
|
-
*
|
|
143
|
+
* Get the box used in a bin of dimensions 'bin' whose items end at 'x_max',
|
|
144
|
+
* 'y_max', 'z_max', for a leftover mode (see 'LeftoverMode'): the leftover is
|
|
145
|
+
* the volume of the bin minus the volume of this box.
|
|
146
146
|
*/
|
|
147
|
-
inline
|
|
147
|
+
inline Box leftover_mode_used_box(
|
|
148
148
|
LeftoverMode leftover_mode,
|
|
149
149
|
const Box& bin,
|
|
150
150
|
Length x_max,
|
|
@@ -163,9 +163,10 @@ inline Volume leftover_mode_used_volume(
|
|
|
163
163
|
|| leftover_mode == LeftoverMode::XZ
|
|
164
164
|
|| leftover_mode == LeftoverMode::YZ
|
|
165
165
|
|| leftover_mode == LeftoverMode::XYZ);
|
|
166
|
-
return
|
|
167
|
-
|
|
168
|
-
|
|
166
|
+
return {
|
|
167
|
+
(along_x? x_max: bin.x),
|
|
168
|
+
(along_y? y_max: bin.y),
|
|
169
|
+
(along_z? z_max: bin.z)};
|
|
169
170
|
}
|
|
170
171
|
|
|
171
172
|
inline bool operator==(const Box& box_1, const Box& box_2) { return box_1.x == box_2.x && box_1.y == box_2.y && box_1.z == box_2.z; }
|
|
@@ -326,6 +327,14 @@ struct Parameters
|
|
|
326
327
|
|
|
327
328
|
/** Leftover mode (see 'LeftoverMode'). */
|
|
328
329
|
LeftoverMode leftover_mode = LeftoverMode::XYZ;
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* For the BinPackingWithLeftovers objective, also compare the solutions
|
|
333
|
+
* on the sum of the leftover values of the bins and on the sum of their
|
|
334
|
+
* staircase leftover values, after the leftover value and the staircase
|
|
335
|
+
* leftover value of the last bin.
|
|
336
|
+
*/
|
|
337
|
+
bool leftover_all_bins = true;
|
|
329
338
|
};
|
|
330
339
|
|
|
331
340
|
////////////////////////////////////////////////////////////////////////////////
|
{packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/box/instance_builder.hpp
RENAMED
|
@@ -64,6 +64,9 @@ public:
|
|
|
64
64
|
/** Set the leftover mode (see 'LeftoverMode'). */
|
|
65
65
|
void set_leftover_mode(LeftoverMode leftover_mode) { instance_.parameters_.leftover_mode = leftover_mode; }
|
|
66
66
|
|
|
67
|
+
/** Set whether the leftover values of all the bins are compared. */
|
|
68
|
+
void set_leftover_all_bins(bool leftover_all_bins) { instance_.parameters_.leftover_all_bins = leftover_all_bins; }
|
|
69
|
+
|
|
67
70
|
/** Set the feasibility callback. */
|
|
68
71
|
void set_feasibility_callback(const FeasibilityCallback& feasibility_callback) { instance_.feasibility_callback_ = feasibility_callback; }
|
|
69
72
|
|
|
@@ -82,6 +85,16 @@ public:
|
|
|
82
85
|
BinTypeId bin_type_id,
|
|
83
86
|
Profit cost);
|
|
84
87
|
|
|
88
|
+
/**
|
|
89
|
+
* Set the dimensions of a bin type, overriding whatever 'add_bin_type'
|
|
90
|
+
* gave it. Used by the sequential feasibility algorithm to shrink a bin.
|
|
91
|
+
*/
|
|
92
|
+
void set_bin_type_box(
|
|
93
|
+
BinTypeId bin_type_id,
|
|
94
|
+
Length x,
|
|
95
|
+
Length y,
|
|
96
|
+
Length z);
|
|
97
|
+
|
|
85
98
|
/** Set the maximum weight of a bin type. */
|
|
86
99
|
void set_bin_type_maximum_weight(
|
|
87
100
|
BinTypeId bin_type_id,
|
|
@@ -214,12 +214,38 @@ struct OptimizeParameters: packingsolver::Parameters<Instance, Solution, Output>
|
|
|
214
214
|
/** Guides used in the tree search algorithm. */
|
|
215
215
|
std::vector<GuideId> tree_search_guides;
|
|
216
216
|
|
|
217
|
+
/** Directions used in the tree search algorithm; see 'TreeSearchParameters::directions'. */
|
|
218
|
+
std::vector<Direction> tree_search_directions;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Re-optimize the bins of the best solution at the end, for the
|
|
222
|
+
* BinPackingWithLeftovers objective in a not-anytime mode.
|
|
223
|
+
*/
|
|
224
|
+
bool post_process = true;
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* The last bin is re-optimized in the post-process only if it contains
|
|
228
|
+
* (strictly) fewer items than this threshold.
|
|
229
|
+
*/
|
|
230
|
+
ItemPos post_process_last_bin_maximum_number_of_items = 32;
|
|
231
|
+
|
|
217
232
|
/** Threshold to consider that a bin contains "many" items. */
|
|
218
233
|
Counter many_items_in_bins_threshold = 16;
|
|
219
234
|
|
|
220
235
|
/** Threshold to consider that a bin contains "many" items. */
|
|
221
236
|
Counter many_items_in_bins_threshold_2 = 64;
|
|
222
237
|
|
|
238
|
+
/**
|
|
239
|
+
* Threshold to consider that a bin x (resp. y, z) section - a slice of
|
|
240
|
+
* the bin as long along x (resp. y, z) as the mean item - contains
|
|
241
|
+
* "many" items, i.e. mean bin y-z (resp. x-z, x-y) area / mean item y-z
|
|
242
|
+
* (resp. x-z, x-y) area. Used to choose between 'tree_search' (whose
|
|
243
|
+
* skyline branching factor grows with how many items pack into a single
|
|
244
|
+
* such section) and 'tree_search_maximal_spaces' (higher overhead per
|
|
245
|
+
* node, but does not degrade the same way).
|
|
246
|
+
*/
|
|
247
|
+
Counter many_items_in_section_threshold = 8;
|
|
248
|
+
|
|
223
249
|
/** Factor to consider that the number of copies of items is "high". */
|
|
224
250
|
Counter many_item_type_copies_factor = 1;
|
|
225
251
|
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include "packingsolver/box/optimize.hpp"
|
|
4
|
+
|
|
5
|
+
namespace packingsolver
|
|
6
|
+
{
|
|
7
|
+
namespace box
|
|
8
|
+
{
|
|
9
|
+
|
|
10
|
+
struct GroupIdenticalBinsOutput: packingsolver::Output<Instance, Solution>
|
|
11
|
+
{
|
|
12
|
+
GroupIdenticalBinsOutput(const Instance& instance):
|
|
13
|
+
packingsolver::Output<Instance, Solution>(instance) { }
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Group identical bins of a solution together.
|
|
18
|
+
*
|
|
19
|
+
* Bins with the same bin type and the same items at the same positions are
|
|
20
|
+
* merged into a single entry with the combined copy count.
|
|
21
|
+
*/
|
|
22
|
+
GroupIdenticalBinsOutput group_identical_bins(const Solution& solution);
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Re-optimize the bin at 'bin_pos' of a solution, as its own single-bin
|
|
26
|
+
* BinPackingWithLeftovers instance, with 'optimize' and 'parameters' (its
|
|
27
|
+
* output and its post-process being disabled).
|
|
28
|
+
*
|
|
29
|
+
* Return the solution with that bin replaced by the re-optimized one, or the
|
|
30
|
+
* solution itself if the re-optimization didn't pack all the items of the
|
|
31
|
+
* bin.
|
|
32
|
+
*/
|
|
33
|
+
Solution reoptimize_bin(
|
|
34
|
+
const Solution& solution,
|
|
35
|
+
BinPos bin_pos,
|
|
36
|
+
const OptimizeParameters& parameters = {});
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Re-optimize each bin of a solution except the last one (see
|
|
40
|
+
* 'reoptimize_bin'), and keep a re-optimized bin if its leftover value is
|
|
41
|
+
* greater, or if its leftover value is the same and its staircase leftover
|
|
42
|
+
* value is greater.
|
|
43
|
+
*
|
|
44
|
+
* With the algorithms selected as for any instance, a bin with many items
|
|
45
|
+
* found quickly is re-optimized quickly too.
|
|
46
|
+
*
|
|
47
|
+
* The leftover values of the other bins only come after the ones of the last
|
|
48
|
+
* bin in the objective, so the algorithms hardly try to keep the free space
|
|
49
|
+
* of the other bins in a single region.
|
|
50
|
+
*/
|
|
51
|
+
Solution reoptimize_non_last_bins(
|
|
52
|
+
const Solution& solution,
|
|
53
|
+
const OptimizeParameters& parameters = {});
|
|
54
|
+
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -41,6 +41,17 @@ struct SolutionBin
|
|
|
41
41
|
|
|
42
42
|
/** Resource consumption, indexed by resource_id. */
|
|
43
43
|
std::vector<double> resource_consumption;
|
|
44
|
+
|
|
45
|
+
/** Leftover value of the bin (see 'LeftoverMode'). */
|
|
46
|
+
Volume leftover_value = 0;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Staircase leftover value of the bin: the volume of the bin which is not
|
|
50
|
+
* dominated by an item. An item dominates the points of the box between
|
|
51
|
+
* the origin of the bin and its opposite corner (see 'LeftoverMode' for
|
|
52
|
+
* the dimensions of the bin which are not considered).
|
|
53
|
+
*/
|
|
54
|
+
Volume staircase_leftover_value = 0;
|
|
44
55
|
};
|
|
45
56
|
|
|
46
57
|
bool operator==(const SolutionBin& solution_bin_1, const SolutionBin& solution_bin_2);
|
|
@@ -203,6 +214,18 @@ public:
|
|
|
203
214
|
/** Get the area of the solution. */
|
|
204
215
|
inline Profit leftover_value() const { return leftover_value_; }
|
|
205
216
|
|
|
217
|
+
/** Get the staircase leftover value of the last bin of the solution. */
|
|
218
|
+
inline Volume staircase_leftover_value() const { return staircase_leftover_value_; }
|
|
219
|
+
|
|
220
|
+
/** Get the sum of the leftover values of the bins of the solution. */
|
|
221
|
+
inline Volume total_leftover_value() const { return total_leftover_value_; }
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Get the sum of the staircase leftover values of the bins of the
|
|
225
|
+
* solution.
|
|
226
|
+
*/
|
|
227
|
+
inline Volume total_staircase_leftover_value() const { return total_staircase_leftover_value_; }
|
|
228
|
+
|
|
206
229
|
/** Get the volume of the solution. */
|
|
207
230
|
inline Volume volume() const { return volume_; }
|
|
208
231
|
|
|
@@ -306,6 +329,15 @@ private:
|
|
|
306
329
|
/** Value of the leftover. */
|
|
307
330
|
Profit leftover_value_ = 0.0;
|
|
308
331
|
|
|
332
|
+
/** Staircase leftover value of the last bin. */
|
|
333
|
+
Volume staircase_leftover_value_ = 0;
|
|
334
|
+
|
|
335
|
+
/** Sum of the leftover values of the bins. */
|
|
336
|
+
Volume total_leftover_value_ = 0;
|
|
337
|
+
|
|
338
|
+
/** Sum of the staircase leftover values of the bins. */
|
|
339
|
+
Volume total_staircase_leftover_value_ = 0;
|
|
340
|
+
|
|
309
341
|
/** Total volume of the bins of the solution. */
|
|
310
342
|
Volume bin_volume_ = 0;
|
|
311
343
|
|
{packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/boxstacks/instance.hpp
RENAMED
|
@@ -111,6 +111,23 @@ std::ostream& operator<<(
|
|
|
111
111
|
std::ostream& os,
|
|
112
112
|
Box box);
|
|
113
113
|
|
|
114
|
+
/**
|
|
115
|
+
* Get the box used in a bin of dimensions 'bin' whose stacks end at 'x_max'
|
|
116
|
+
* and 'y_max', for a leftover mode (see 'LeftoverMode'): the leftover is the
|
|
117
|
+
* volume of the bin minus the volume of this box.
|
|
118
|
+
*/
|
|
119
|
+
inline Box leftover_mode_used_box(
|
|
120
|
+
LeftoverMode leftover_mode,
|
|
121
|
+
const Box& bin,
|
|
122
|
+
Length x_max,
|
|
123
|
+
Length y_max)
|
|
124
|
+
{
|
|
125
|
+
return {
|
|
126
|
+
(leftover_mode == LeftoverMode::Y)? bin.x: x_max,
|
|
127
|
+
(leftover_mode == LeftoverMode::X)? bin.y: y_max,
|
|
128
|
+
bin.z};
|
|
129
|
+
}
|
|
130
|
+
|
|
114
131
|
////////////////////////////////////////////////////////////////////////////////
|
|
115
132
|
///////////////////////// Item type, Bin type, Defect //////////////////////////
|
|
116
133
|
////////////////////////////////////////////////////////////////////////////////
|
|
@@ -357,6 +374,14 @@ struct Parameters
|
|
|
357
374
|
/** Leftover mode (see 'LeftoverMode'). */
|
|
358
375
|
LeftoverMode leftover_mode = LeftoverMode::XY;
|
|
359
376
|
|
|
377
|
+
/**
|
|
378
|
+
* For the BinPackingWithLeftovers objective, also compare the solutions
|
|
379
|
+
* on the sum of the leftover values of the bins and on the sum of their
|
|
380
|
+
* staircase leftover values, after the leftover value and the staircase
|
|
381
|
+
* leftover value of the last bin.
|
|
382
|
+
*/
|
|
383
|
+
bool leftover_all_bins = true;
|
|
384
|
+
|
|
360
385
|
/**
|
|
361
386
|
* 'true' iff weight constraints must be satisfied for all items belonging
|
|
362
387
|
* to a larger or equal group.
|
|
@@ -78,6 +78,9 @@ public:
|
|
|
78
78
|
/** Set the leftover mode (see 'LeftoverMode'). */
|
|
79
79
|
void set_leftover_mode(LeftoverMode leftover_mode) { instance_.parameters_.leftover_mode = leftover_mode; }
|
|
80
80
|
|
|
81
|
+
/** Set whether the leftover values of all the bins are compared. */
|
|
82
|
+
void set_leftover_all_bins(bool leftover_all_bins) { instance_.parameters_.leftover_all_bins = leftover_all_bins; }
|
|
83
|
+
|
|
81
84
|
/*
|
|
82
85
|
* Set bin types
|
|
83
86
|
*/
|
{packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/boxstacks/optimize.hpp
RENAMED
|
@@ -186,6 +186,18 @@ struct OptimizeParameters: packingsolver::Parameters<Instance, Solution, Output>
|
|
|
186
186
|
/** Guides used in the tree search algorithm. */
|
|
187
187
|
std::vector<GuideId> tree_search_guides;
|
|
188
188
|
|
|
189
|
+
/**
|
|
190
|
+
* Re-optimize the bins of the best solution at the end, for the
|
|
191
|
+
* BinPackingWithLeftovers objective in a not-anytime mode.
|
|
192
|
+
*/
|
|
193
|
+
bool post_process = true;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* The last bin is re-optimized in the post-process only if it contains
|
|
197
|
+
* (strictly) fewer items than this threshold.
|
|
198
|
+
*/
|
|
199
|
+
ItemPos post_process_last_bin_maximum_number_of_items = 32;
|
|
200
|
+
|
|
189
201
|
/**
|
|
190
202
|
* Threshold to consider that a bin contains "many" items - see the
|
|
191
203
|
* automatic selection between 'use_sequential_single_knapsack' and
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include "packingsolver/boxstacks/optimize.hpp"
|
|
4
|
+
|
|
5
|
+
namespace packingsolver
|
|
6
|
+
{
|
|
7
|
+
namespace boxstacks
|
|
8
|
+
{
|
|
9
|
+
|
|
10
|
+
struct GroupIdenticalBinsOutput: packingsolver::Output<Instance, Solution>
|
|
11
|
+
{
|
|
12
|
+
GroupIdenticalBinsOutput(const Instance& instance):
|
|
13
|
+
packingsolver::Output<Instance, Solution>(instance) { }
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Group identical bins of a solution together.
|
|
18
|
+
*
|
|
19
|
+
* Bins with the same bin type and the same stacks at the same positions are
|
|
20
|
+
* merged into a single entry with the combined copy count.
|
|
21
|
+
*/
|
|
22
|
+
GroupIdenticalBinsOutput group_identical_bins(const Solution& solution);
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Re-optimize the bin at 'bin_pos' of a solution, as its own single-bin
|
|
26
|
+
* BinPackingWithLeftovers instance, with 'optimize' and 'parameters' (its
|
|
27
|
+
* output and its post-process being disabled).
|
|
28
|
+
*
|
|
29
|
+
* Return the solution with that bin replaced by the re-optimized one, or the
|
|
30
|
+
* solution itself if the re-optimization didn't pack all the items of the
|
|
31
|
+
* bin.
|
|
32
|
+
*/
|
|
33
|
+
Solution reoptimize_bin(
|
|
34
|
+
const Solution& solution,
|
|
35
|
+
BinPos bin_pos,
|
|
36
|
+
const OptimizeParameters& parameters = {});
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Re-optimize each bin of a solution except the last one (see
|
|
40
|
+
* 'reoptimize_bin'), and keep a re-optimized bin if its leftover value is
|
|
41
|
+
* greater, or if its leftover value is the same and its staircase leftover
|
|
42
|
+
* value is greater.
|
|
43
|
+
*
|
|
44
|
+
* With the algorithms selected as for any instance, a bin with many items
|
|
45
|
+
* found quickly is re-optimized quickly too.
|
|
46
|
+
*
|
|
47
|
+
* The leftover values of the other bins only come after the ones of the last
|
|
48
|
+
* bin in the objective, so the algorithms hardly try to keep the free space
|
|
49
|
+
* of the other bins in a single region.
|
|
50
|
+
*/
|
|
51
|
+
Solution reoptimize_non_last_bins(
|
|
52
|
+
const Solution& solution,
|
|
53
|
+
const OptimizeParameters& parameters = {});
|
|
54
|
+
|
|
55
|
+
}
|
|
56
|
+
}
|
{packingsolver-0.1.1235 → packingsolver-0.1.1237}/include/packingsolver/boxstacks/solution.hpp
RENAMED
|
@@ -84,6 +84,18 @@ struct SolutionBin
|
|
|
84
84
|
|
|
85
85
|
/** Profit. */
|
|
86
86
|
Profit profit = 0.0;
|
|
87
|
+
|
|
88
|
+
/** Leftover value of the bin (see 'LeftoverMode'). */
|
|
89
|
+
Volume leftover_value = 0;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Staircase leftover value of the bin: the volume of the bin which is not
|
|
93
|
+
* dominated by a stack. A stack dominates the points of the box between
|
|
94
|
+
* the origin of the bin and its opposite corner, over the whole height
|
|
95
|
+
* of the bin (see 'LeftoverMode' for the dimensions of the bin which are
|
|
96
|
+
* not considered).
|
|
97
|
+
*/
|
|
98
|
+
Volume staircase_leftover_value = 0;
|
|
87
99
|
};
|
|
88
100
|
|
|
89
101
|
bool operator==(const SolutionBin& solution_bin_1, const SolutionBin& solution_bin_2);
|
|
@@ -277,6 +289,18 @@ public:
|
|
|
277
289
|
*/
|
|
278
290
|
inline Volume leftover_value() const { return bin_volume_ - volume_; }
|
|
279
291
|
|
|
292
|
+
/** Get the staircase leftover value of the last bin of the solution. */
|
|
293
|
+
inline Volume staircase_leftover_value() const { return staircase_leftover_value_; }
|
|
294
|
+
|
|
295
|
+
/** Get the sum of the leftover values of the bins of the solution. */
|
|
296
|
+
inline Volume total_leftover_value() const { return total_leftover_value_; }
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Get the sum of the staircase leftover values of the bins of the
|
|
300
|
+
* solution.
|
|
301
|
+
*/
|
|
302
|
+
inline Volume total_staircase_leftover_value() const { return total_staircase_leftover_value_; }
|
|
303
|
+
|
|
280
304
|
/** Get the fraction of waste of the solution. */
|
|
281
305
|
inline double waste_percentage() const { return (volume() == 0)? 0: (double)waste() / volume(); }
|
|
282
306
|
|
|
@@ -397,6 +421,15 @@ private:
|
|
|
397
421
|
/** Total volume of the solution. */
|
|
398
422
|
Volume volume_ = 0;
|
|
399
423
|
|
|
424
|
+
/** Staircase leftover value of the last bin. */
|
|
425
|
+
Volume staircase_leftover_value_ = 0;
|
|
426
|
+
|
|
427
|
+
/** Sum of the leftover values of the bins. */
|
|
428
|
+
Volume total_leftover_value_ = 0;
|
|
429
|
+
|
|
430
|
+
/** Sum of the staircase leftover values of the bins. */
|
|
431
|
+
Volume total_staircase_leftover_value_ = 0;
|
|
432
|
+
|
|
400
433
|
/** Total volume of the bins of the solution. */
|
|
401
434
|
Volume bin_volume_ = 0;
|
|
402
435
|
|