packingsolver3d 0.0.1__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.
- packingsolver3d-0.0.1/CMakeLists.txt +76 -0
- packingsolver3d-0.0.1/LICENSE +21 -0
- packingsolver3d-0.0.1/LICENSE-packingsolver +21 -0
- packingsolver3d-0.0.1/MANIFEST.in +19 -0
- packingsolver3d-0.0.1/NOTICE.md +15 -0
- packingsolver3d-0.0.1/PKG-INFO +285 -0
- packingsolver3d-0.0.1/README.md +199 -0
- packingsolver3d-0.0.1/cmake/msvc_runtime.cmake +13 -0
- packingsolver3d-0.0.1/packingsolver3d/__init__.py +59 -0
- packingsolver3d-0.0.1/packingsolver3d/_core.cpp +396 -0
- packingsolver3d-0.0.1/packingsolver3d/_encode.py +162 -0
- packingsolver3d-0.0.1/packingsolver3d/_solve.py +284 -0
- packingsolver3d-0.0.1/packingsolver3d/box.py +154 -0
- packingsolver3d-0.0.1/packingsolver3d/boxstacks.py +192 -0
- packingsolver3d-0.0.1/packingsolver3d/config/__init__.py +25 -0
- packingsolver3d-0.0.1/packingsolver3d/config/meta.py +49 -0
- packingsolver3d-0.0.1/packingsolver3d/errors.py +80 -0
- packingsolver3d-0.0.1/packingsolver3d/model.py +406 -0
- packingsolver3d-0.0.1/packingsolver3d/result.py +314 -0
- packingsolver3d-0.0.1/packingsolver3d/visual.py +274 -0
- packingsolver3d-0.0.1/packingsolver3d.egg-info/PKG-INFO +285 -0
- packingsolver3d-0.0.1/packingsolver3d.egg-info/SOURCES.txt +340 -0
- packingsolver3d-0.0.1/packingsolver3d.egg-info/dependency_links.txt +1 -0
- packingsolver3d-0.0.1/packingsolver3d.egg-info/not-zip-safe +1 -0
- packingsolver3d-0.0.1/packingsolver3d.egg-info/requires.txt +37 -0
- packingsolver3d-0.0.1/packingsolver3d.egg-info/top_level.txt +1 -0
- packingsolver3d-0.0.1/pyproject.toml +36 -0
- packingsolver3d-0.0.1/pytest.ini +6 -0
- packingsolver3d-0.0.1/requirements-build.txt +5 -0
- packingsolver3d-0.0.1/requirements-cov.txt +5 -0
- packingsolver3d-0.0.1/requirements-doc.txt +7 -0
- packingsolver3d-0.0.1/requirements-plot.txt +3 -0
- packingsolver3d-0.0.1/requirements-test.txt +9 -0
- packingsolver3d-0.0.1/requirements.txt +0 -0
- packingsolver3d-0.0.1/setup.cfg +4 -0
- packingsolver3d-0.0.1/setup.py +243 -0
- packingsolver3d-0.0.1/test/__init__.py +0 -0
- packingsolver3d-0.0.1/test/config/__init__.py +0 -0
- packingsolver3d-0.0.1/test/config/test_meta.py +32 -0
- packingsolver3d-0.0.1/test/conftest.py +48 -0
- packingsolver3d-0.0.1/test/test_benchmarks_data.py +47 -0
- packingsolver3d-0.0.1/test/test_box.py +122 -0
- packingsolver3d-0.0.1/test/test_boxstacks.py +157 -0
- packingsolver3d-0.0.1/test/test_core.py +140 -0
- packingsolver3d-0.0.1/test/test_encode.py +114 -0
- packingsolver3d-0.0.1/test/test_errors.py +22 -0
- packingsolver3d-0.0.1/test/test_model.py +117 -0
- packingsolver3d-0.0.1/test/test_solve.py +188 -0
- packingsolver3d-0.0.1/test/test_upstream_cases.py +214 -0
- packingsolver3d-0.0.1/test/test_visual.py +101 -0
- packingsolver3d-0.0.1/test/testfile/upstream/SOURCE.md +5 -0
- packingsolver3d-0.0.1/test/testfile/upstream/box/knapsack_1_item/bins.csv +2 -0
- packingsolver3d-0.0.1/test/testfile/upstream/box/knapsack_1_item/items.csv +2 -0
- packingsolver3d-0.0.1/test/testfile/upstream/box/knapsack_1_item/parameters.csv +2 -0
- packingsolver3d-0.0.1/test/testfile/upstream/box/knapsack_1_item/solution.csv +3 -0
- packingsolver3d-0.0.1/test/testfile/upstream/box/knapsack_20_items/bins.csv +2 -0
- packingsolver3d-0.0.1/test/testfile/upstream/box/knapsack_20_items/items.csv +2 -0
- packingsolver3d-0.0.1/test/testfile/upstream/box/knapsack_20_items/parameters.csv +2 -0
- packingsolver3d-0.0.1/test/testfile/upstream/box/knapsack_20_items/solution.csv +22 -0
- packingsolver3d-0.0.1/test/testfile/upstream/box/knapsack_4_items/bins.csv +2 -0
- packingsolver3d-0.0.1/test/testfile/upstream/box/knapsack_4_items/items.csv +2 -0
- packingsolver3d-0.0.1/test/testfile/upstream/box/knapsack_4_items/parameters.csv +2 -0
- packingsolver3d-0.0.1/test/testfile/upstream/box/knapsack_4_items/solution.csv +6 -0
- packingsolver3d-0.0.1/test/testfile/upstream/box/open_dimension_x_4_different_items_xy/bins.csv +2 -0
- packingsolver3d-0.0.1/test/testfile/upstream/box/open_dimension_x_4_different_items_xy/items.csv +5 -0
- packingsolver3d-0.0.1/test/testfile/upstream/box/open_dimension_x_4_different_items_xy/parameters.csv +2 -0
- packingsolver3d-0.0.1/test/testfile/upstream/box/open_dimension_x_4_different_items_xy/solution.csv +6 -0
- packingsolver3d-0.0.1/test/testfile/upstream/box/open_dimension_x_4_different_items_xz/bins.csv +2 -0
- packingsolver3d-0.0.1/test/testfile/upstream/box/open_dimension_x_4_different_items_xz/items.csv +5 -0
- packingsolver3d-0.0.1/test/testfile/upstream/box/open_dimension_x_4_different_items_xz/parameters.csv +2 -0
- packingsolver3d-0.0.1/test/testfile/upstream/box/open_dimension_x_4_different_items_xz/solution.csv +6 -0
- packingsolver3d-0.0.1/test/testfile/upstream/box/open_dimension_x_4_different_items_yz/bins.csv +2 -0
- packingsolver3d-0.0.1/test/testfile/upstream/box/open_dimension_x_4_different_items_yz/items.csv +5 -0
- packingsolver3d-0.0.1/test/testfile/upstream/box/open_dimension_x_4_different_items_yz/parameters.csv +2 -0
- packingsolver3d-0.0.1/test/testfile/upstream/box/open_dimension_x_4_different_items_yz/solution.csv +6 -0
- packingsolver3d-0.0.1/test/testfile/upstream/box/variable_sized_bin_packing_two_bin_types/bins.csv +3 -0
- packingsolver3d-0.0.1/test/testfile/upstream/box/variable_sized_bin_packing_two_bin_types/items.csv +2 -0
- packingsolver3d-0.0.1/test/testfile/upstream/box/variable_sized_bin_packing_two_bin_types/parameters.csv +2 -0
- packingsolver3d-0.0.1/test/testfile/upstream/box/variable_sized_bin_packing_two_bin_types/solution.csv +4 -0
- packingsolver3d-0.0.1/test/testfile/upstream/boxstacks/semi_trailer_truck_middle_axle_bin_packing/bins.csv +2 -0
- packingsolver3d-0.0.1/test/testfile/upstream/boxstacks/semi_trailer_truck_middle_axle_bin_packing/items.csv +2 -0
- packingsolver3d-0.0.1/test/testfile/upstream/boxstacks/semi_trailer_truck_middle_axle_bin_packing/parameters.csv +2 -0
- packingsolver3d-0.0.1/test/testfile/upstream/boxstacks/semi_trailer_truck_middle_axle_bin_packing/solution.csv +1 -0
- packingsolver3d-0.0.1/test/testfile/upstream/boxstacks/semi_trailer_truck_middle_axle_knapsack/bins.csv +2 -0
- packingsolver3d-0.0.1/test/testfile/upstream/boxstacks/semi_trailer_truck_middle_axle_knapsack/items.csv +2 -0
- packingsolver3d-0.0.1/test/testfile/upstream/boxstacks/semi_trailer_truck_middle_axle_knapsack/parameters.csv +2 -0
- packingsolver3d-0.0.1/test/testfile/upstream/boxstacks/semi_trailer_truck_middle_axle_knapsack/solution.csv +1 -0
- packingsolver3d-0.0.1/test/testfile/upstream/boxstacks/semi_trailer_truck_middle_axle_knapsack/solution_optimize.csv +6 -0
- packingsolver3d-0.0.1/test/testfile/upstream/boxstacks/variable_sized_bin_packing_two_bin_types/bins.csv +3 -0
- packingsolver3d-0.0.1/test/testfile/upstream/boxstacks/variable_sized_bin_packing_two_bin_types/items.csv +2 -0
- packingsolver3d-0.0.1/test/testfile/upstream/boxstacks/variable_sized_bin_packing_two_bin_types/parameters.csv +2 -0
- packingsolver3d-0.0.1/test/testfile/upstream/boxstacks/variable_sized_bin_packing_two_bin_types/solution.csv +6 -0
- packingsolver3d-0.0.1/tools/__init__.py +0 -0
- packingsolver3d-0.0.1/tools/doctest_plugin.py +28 -0
- packingsolver3d-0.0.1/tools/make_benchmarks.py +559 -0
- packingsolver3d-0.0.1/tools/make_figures.py +141 -0
- packingsolver3d-0.0.1/upstream/packingsolver/.git +1 -0
- packingsolver3d-0.0.1/upstream/packingsolver/.gitattributes +1 -0
- packingsolver3d-0.0.1/upstream/packingsolver/.github/workflows/build.yml +59 -0
- packingsolver3d-0.0.1/upstream/packingsolver/.github/workflows/release.yml +101 -0
- packingsolver3d-0.0.1/upstream/packingsolver/.gitignore +12 -0
- packingsolver3d-0.0.1/upstream/packingsolver/CMakeLists.txt +31 -0
- packingsolver3d-0.0.1/upstream/packingsolver/LICENSE +21 -0
- packingsolver3d-0.0.1/upstream/packingsolver/README.md +864 -0
- packingsolver3d-0.0.1/upstream/packingsolver/extern/CMakeLists.txt +127 -0
- packingsolver3d-0.0.1/upstream/packingsolver/img/banner.png +0 -0
- packingsolver3d-0.0.1/upstream/packingsolver/img/banner.svg +229 -0
- packingsolver3d-0.0.1/upstream/packingsolver/img/box.png +0 -0
- packingsolver3d-0.0.1/upstream/packingsolver/img/boxstacks.png +0 -0
- packingsolver3d-0.0.1/upstream/packingsolver/img/commands.txt +19 -0
- packingsolver3d-0.0.1/upstream/packingsolver/img/irregular.png +0 -0
- packingsolver3d-0.0.1/upstream/packingsolver/img/onedimensional.png +0 -0
- packingsolver3d-0.0.1/upstream/packingsolver/img/rectangle.png +0 -0
- packingsolver3d-0.0.1/upstream/packingsolver/img/rectangleguillotine.png +0 -0
- packingsolver3d-0.0.1/upstream/packingsolver/img/solution.json +35526 -0
- packingsolver3d-0.0.1/upstream/packingsolver/img/solution_box.csv +103 -0
- packingsolver3d-0.0.1/upstream/packingsolver/img/solution_boxstacks.csv +92 -0
- packingsolver3d-0.0.1/upstream/packingsolver/img/solution_onedimensional.csv +68 -0
- packingsolver3d-0.0.1/upstream/packingsolver/img/solution_rectangle.csv +16 -0
- packingsolver3d-0.0.1/upstream/packingsolver/img/solution_rectangleguillotine.csv +128 -0
- packingsolver3d-0.0.1/upstream/packingsolver/include/packingsolver/algorithms/common.hpp +746 -0
- packingsolver3d-0.0.1/upstream/packingsolver/include/packingsolver/algorithms/truck.hpp +228 -0
- packingsolver3d-0.0.1/upstream/packingsolver/include/packingsolver/box/algorithm_formatter.hpp +106 -0
- packingsolver3d-0.0.1/upstream/packingsolver/include/packingsolver/box/instance.hpp +518 -0
- packingsolver3d-0.0.1/upstream/packingsolver/include/packingsolver/box/instance_builder.hpp +250 -0
- packingsolver3d-0.0.1/upstream/packingsolver/include/packingsolver/box/optimize.hpp +277 -0
- packingsolver3d-0.0.1/upstream/packingsolver/include/packingsolver/box/post_process.hpp +25 -0
- packingsolver3d-0.0.1/upstream/packingsolver/include/packingsolver/box/solution.hpp +361 -0
- packingsolver3d-0.0.1/upstream/packingsolver/include/packingsolver/boxstacks/algorithm_formatter.hpp +94 -0
- packingsolver3d-0.0.1/upstream/packingsolver/include/packingsolver/boxstacks/instance.hpp +556 -0
- packingsolver3d-0.0.1/upstream/packingsolver/include/packingsolver/boxstacks/instance_builder.hpp +272 -0
- packingsolver3d-0.0.1/upstream/packingsolver/include/packingsolver/boxstacks/optimize.hpp +209 -0
- packingsolver3d-0.0.1/upstream/packingsolver/include/packingsolver/boxstacks/post_process.hpp +25 -0
- packingsolver3d-0.0.1/upstream/packingsolver/include/packingsolver/boxstacks/solution.hpp +424 -0
- packingsolver3d-0.0.1/upstream/packingsolver/include/packingsolver/irregular/algorithm_formatter.hpp +102 -0
- packingsolver3d-0.0.1/upstream/packingsolver/include/packingsolver/irregular/instance.hpp +666 -0
- packingsolver3d-0.0.1/upstream/packingsolver/include/packingsolver/irregular/instance_builder.hpp +243 -0
- packingsolver3d-0.0.1/upstream/packingsolver/include/packingsolver/irregular/optimize.hpp +260 -0
- packingsolver3d-0.0.1/upstream/packingsolver/include/packingsolver/irregular/post_process.hpp +59 -0
- packingsolver3d-0.0.1/upstream/packingsolver/include/packingsolver/irregular/solution.hpp +333 -0
- packingsolver3d-0.0.1/upstream/packingsolver/include/packingsolver/onedimensional/algorithm_formatter.hpp +94 -0
- packingsolver3d-0.0.1/upstream/packingsolver/include/packingsolver/onedimensional/instance.hpp +412 -0
- packingsolver3d-0.0.1/upstream/packingsolver/include/packingsolver/onedimensional/instance_builder.hpp +269 -0
- packingsolver3d-0.0.1/upstream/packingsolver/include/packingsolver/onedimensional/optimize.hpp +204 -0
- packingsolver3d-0.0.1/upstream/packingsolver/include/packingsolver/onedimensional/post_process.hpp +25 -0
- packingsolver3d-0.0.1/upstream/packingsolver/include/packingsolver/onedimensional/solution.hpp +313 -0
- packingsolver3d-0.0.1/upstream/packingsolver/include/packingsolver/rectangle/algorithm_formatter.hpp +102 -0
- packingsolver3d-0.0.1/upstream/packingsolver/include/packingsolver/rectangle/instance.hpp +619 -0
- packingsolver3d-0.0.1/upstream/packingsolver/include/packingsolver/rectangle/instance_builder.hpp +296 -0
- packingsolver3d-0.0.1/upstream/packingsolver/include/packingsolver/rectangle/optimize.hpp +316 -0
- packingsolver3d-0.0.1/upstream/packingsolver/include/packingsolver/rectangle/post_process.hpp +25 -0
- packingsolver3d-0.0.1/upstream/packingsolver/include/packingsolver/rectangle/reduction.hpp +2067 -0
- packingsolver3d-0.0.1/upstream/packingsolver/include/packingsolver/rectangle/solution.hpp +342 -0
- packingsolver3d-0.0.1/upstream/packingsolver/include/packingsolver/rectangleguillotine/algorithm_formatter.hpp +104 -0
- packingsolver3d-0.0.1/upstream/packingsolver/include/packingsolver/rectangleguillotine/instance.hpp +766 -0
- packingsolver3d-0.0.1/upstream/packingsolver/include/packingsolver/rectangleguillotine/instance_builder.hpp +328 -0
- packingsolver3d-0.0.1/upstream/packingsolver/include/packingsolver/rectangleguillotine/optimize.hpp +272 -0
- packingsolver3d-0.0.1/upstream/packingsolver/include/packingsolver/rectangleguillotine/post_process.hpp +114 -0
- packingsolver3d-0.0.1/upstream/packingsolver/include/packingsolver/rectangleguillotine/solution.hpp +420 -0
- packingsolver3d-0.0.1/upstream/packingsolver/requirements.txt +9 -0
- packingsolver3d-0.0.1/upstream/packingsolver/scripts/convert_box.py +144 -0
- packingsolver3d-0.0.1/upstream/packingsolver/scripts/convert_irregular.py +183 -0
- packingsolver3d-0.0.1/upstream/packingsolver/scripts/convert_irregular_calendar_puzzle.py +143 -0
- packingsolver3d-0.0.1/upstream/packingsolver/scripts/convert_irregular_cgshop2024.py +426 -0
- packingsolver3d-0.0.1/upstream/packingsolver/scripts/convert_irregular_han2012_jotika.py +85 -0
- packingsolver3d-0.0.1/upstream/packingsolver/scripts/convert_irregular_kaggle2025.py +123 -0
- packingsolver3d-0.0.1/upstream/packingsolver/scripts/convert_irregular_lopez2013.py +85 -0
- packingsolver3d-0.0.1/upstream/packingsolver/scripts/convert_irregular_lopez2018.py +98 -0
- packingsolver3d-0.0.1/upstream/packingsolver/scripts/convert_irregular_packomania_coop.py +211 -0
- packingsolver3d-0.0.1/upstream/packingsolver/scripts/convert_irregular_powernest.py +149 -0
- packingsolver3d-0.0.1/upstream/packingsolver/scripts/convert_onedimensional.py +118 -0
- packingsolver3d-0.0.1/upstream/packingsolver/scripts/convert_onedimensional_rectangle.py +74 -0
- packingsolver3d-0.0.1/upstream/packingsolver/scripts/convert_rectangle.py +754 -0
- packingsolver3d-0.0.1/upstream/packingsolver/scripts/download_data.py +89 -0
- packingsolver3d-0.0.1/upstream/packingsolver/scripts/process_benchmarks.py +2746 -0
- packingsolver3d-0.0.1/upstream/packingsolver/scripts/run_benchmarks.py +1425 -0
- packingsolver3d-0.0.1/upstream/packingsolver/scripts/run_tests.py +1199 -0
- packingsolver3d-0.0.1/upstream/packingsolver/scripts/visualize_box.py +274 -0
- packingsolver3d-0.0.1/upstream/packingsolver/scripts/visualize_boxstacks.py +310 -0
- packingsolver3d-0.0.1/upstream/packingsolver/scripts/visualize_irregular.py +207 -0
- packingsolver3d-0.0.1/upstream/packingsolver/scripts/visualize_irregular_instance.py +184 -0
- packingsolver3d-0.0.1/upstream/packingsolver/scripts/visualize_onedimensional.py +156 -0
- packingsolver3d-0.0.1/upstream/packingsolver/scripts/visualize_rectangle.py +311 -0
- packingsolver3d-0.0.1/upstream/packingsolver/scripts/visualize_rectangleguillotine.py +222 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/CMakeLists.txt +7 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/algorithms/CMakeLists.txt +17 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/algorithms/column_generation.hpp +1689 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/algorithms/common.cpp +218 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/algorithms/dichotomic_search.hpp +275 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/algorithms/meet_in_the_middle.hpp +456 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/algorithms/sequential_value_correction.hpp +576 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/algorithms/thread_pool.hpp +199 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/box/CMakeLists.txt +44 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/box/algorithm_formatter.cpp +431 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/box/block.cpp +419 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/box/block.hpp +98 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/box/dual_feasible_functions.cpp +552 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/box/dual_feasible_functions.hpp +47 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/box/instance.cpp +480 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/box/instance_builder.cpp +1020 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/box/instance_flipper.cpp +135 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/box/instance_flipper.hpp +48 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/box/main.cpp +259 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/box/optimize.cpp +891 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/box/post_process.cpp +13 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/box/solution.cpp +389 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/box/solution_builder.cpp +143 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/box/solution_builder.hpp +52 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/box/tree_search.cpp +1205 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/box/tree_search.hpp +594 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/box/tree_search_maximal_spaces.cpp +968 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/box/tree_search_maximal_spaces.hpp +661 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/boxstacks/CMakeLists.txt +43 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/boxstacks/algorithm_formatter.cpp +356 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/boxstacks/instance.cpp +403 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/boxstacks/instance_builder.cpp +1072 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/boxstacks/instance_flipper.cpp +128 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/boxstacks/instance_flipper.hpp +33 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/boxstacks/main.cpp +217 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/boxstacks/optimize.cpp +379 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/boxstacks/post_process.cpp +13 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/boxstacks/sequential_onedimensional_rectangle.cpp +1314 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/boxstacks/sequential_onedimensional_rectangle.hpp +84 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/boxstacks/solution.cpp +629 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/boxstacks/solution_builder.cpp +197 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/boxstacks/solution_builder.hpp +60 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/boxstacks/tree_search.cpp +1850 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/boxstacks/tree_search.hpp +726 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/irregular/CMakeLists.txt +84 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/irregular/algorithm_formatter.cpp +409 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/irregular/convert.cpp +86 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/irregular/convert.hpp +28 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/irregular/convert_main.cpp +55 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/irregular/fill_solution_file_main.cpp +47 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/irregular/instance.cpp +860 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/irregular/instance_builder.cpp +1109 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/irregular/large_item_first.cpp +224 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/irregular/large_item_first.hpp +76 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/irregular/linear_programming.cpp +1339 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/irregular/linear_programming.hpp +126 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/irregular/local_search.cpp +353 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/irregular/local_search.hpp +38 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/irregular/main.cpp +231 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/irregular/milp_raster.cpp +555 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/irregular/milp_raster.hpp +38 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/irregular/optimize.cpp +1134 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/irregular/periodic_packing.cpp +894 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/irregular/periodic_packing.hpp +72 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/irregular/post_process.cpp +116 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/irregular/rotations.cpp +581 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/irregular/rotations.hpp +70 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/irregular/sequential_feasibility.cpp +251 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/irregular/sequential_feasibility.hpp +43 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/irregular/shape_simplification.cpp +252 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/irregular/shape_simplification.hpp +41 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/irregular/solution.cpp +803 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/irregular/solution_builder.cpp +106 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/irregular/solution_builder.hpp +54 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/irregular/tree_search.cpp +3076 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/irregular/tree_search.hpp +789 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/irregular/tree_search_periodic_packing.cpp +1322 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/irregular/tree_search_periodic_packing.hpp +546 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/irregular/trivial.cpp +91 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/irregular/trivial.hpp +34 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/irregular/utils.hpp +368 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/onedimensional/CMakeLists.txt +41 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/onedimensional/algorithm_formatter.cpp +320 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/onedimensional/dual_feasible_functions.cpp +385 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/onedimensional/dual_feasible_functions.hpp +44 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/onedimensional/instance.cpp +413 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/onedimensional/instance_builder.cpp +986 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/onedimensional/main.cpp +232 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/onedimensional/milp_assignment.cpp +1731 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/onedimensional/milp_assignment.hpp +93 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/onedimensional/optimize.cpp +921 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/onedimensional/post_process.cpp +13 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/onedimensional/solution.cpp +455 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/onedimensional/solution_builder.cpp +141 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/onedimensional/solution_builder.hpp +50 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/onedimensional/tree_search.cpp +689 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/onedimensional/tree_search.hpp +447 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangle/CMakeLists.txt +53 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangle/algorithm_formatter.cpp +394 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangle/bar_relaxation.cpp +629 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangle/bar_relaxation.hpp +143 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangle/benders_decomposition.cpp +1165 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangle/benders_decomposition.hpp +74 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangle/benders_decomposition_contiguity.cpp +1467 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangle/benders_decomposition_contiguity.hpp +209 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangle/block.cpp +466 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangle/block.hpp +121 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangle/conservative_scales.cpp +329 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangle/conservative_scales.hpp +73 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangle/dual_feasible_functions.cpp +770 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangle/dual_feasible_functions.hpp +86 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangle/instance.cpp +733 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangle/instance_builder.cpp +1240 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangle/instance_flipper.cpp +134 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangle/instance_flipper.hpp +33 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangle/main.cpp +283 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangle/onedimentional_contiguity/milp.cpp +389 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangle/onedimentional_contiguity/milp.hpp +299 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangle/onedimentional_contiguity/tree_search.cpp +382 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangle/onedimentional_contiguity/tree_search.hpp +323 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangle/optimize.cpp +1337 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangle/post_process.cpp +13 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangle/reduction.cpp +2654 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangle/solution.cpp +484 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangle/solution_builder.cpp +142 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangle/solution_builder.hpp +56 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangle/tree_search.cpp +1717 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangle/tree_search.hpp +777 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangle/tree_search_maximal_spaces.cpp +877 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangle/tree_search_maximal_spaces.hpp +549 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangleguillotine/CMakeLists.txt +49 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangleguillotine/algorithm_formatter.cpp +418 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangleguillotine/block.cpp +281 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangleguillotine/block.hpp +90 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangleguillotine/column_generation_strips.cpp +2388 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangleguillotine/column_generation_strips.hpp +88 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangleguillotine/instance.cpp +704 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangleguillotine/instance_builder.cpp +1546 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangleguillotine/instance_flipper.cpp +130 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangleguillotine/instance_flipper.hpp +33 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangleguillotine/main.cpp +366 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangleguillotine/optimize.cpp +1148 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangleguillotine/post_process.cpp +588 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangleguillotine/sequential_feasibility.cpp +202 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangleguillotine/sequential_feasibility.hpp +41 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangleguillotine/sequential_strips_onedimensional.cpp +376 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangleguillotine/sequential_strips_onedimensional.hpp +49 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangleguillotine/solution.cpp +836 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangleguillotine/solution_builder.cpp +525 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangleguillotine/solution_builder.hpp +70 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangleguillotine/tree_search.cpp +2580 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangleguillotine/tree_search.hpp +894 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangleguillotine/tree_search_hypergraph.cpp +626 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangleguillotine/tree_search_hypergraph.hpp +47 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangleguillotine/tree_search_hypergraph_infinite_copies.cpp +231 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangleguillotine/tree_search_hypergraph_infinite_copies.hpp +35 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangleguillotine/tree_search_maximal_spaces.cpp +967 -0
- packingsolver3d-0.0.1/upstream/packingsolver/src/rectangleguillotine/tree_search_maximal_spaces.hpp +345 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.28)
|
|
2
|
+
|
|
3
|
+
project(packingsolver3d LANGUAGES CXX)
|
|
4
|
+
|
|
5
|
+
set(CMAKE_CXX_STANDARD 17)
|
|
6
|
+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
7
|
+
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
8
|
+
# Upstream's static libraries end up inside a shared extension module.
|
|
9
|
+
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
|
10
|
+
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
|
11
|
+
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
|
|
12
|
+
endif()
|
|
13
|
+
|
|
14
|
+
# The one supported upstream configuration: HiGHS as the only LP backend, no
|
|
15
|
+
# executables, no upstream unit tests. Never disable both LP backends -- the
|
|
16
|
+
# column generation code throws at runtime otherwise.
|
|
17
|
+
set(PACKINGSOLVER_USE_CLP OFF CACHE BOOL "" FORCE)
|
|
18
|
+
set(PACKINGSOLVER_USE_HIGHS ON CACHE BOOL "" FORCE)
|
|
19
|
+
set(PACKINGSOLVER_USE_KNITRO OFF CACHE BOOL "" FORCE)
|
|
20
|
+
set(PACKINGSOLVER_BUILD_MAIN OFF CACHE BOOL "" FORCE)
|
|
21
|
+
set(PACKINGSOLVER_BUILD_TEST OFF CACHE BOOL "" FORCE)
|
|
22
|
+
# Every project() call underneath upstream (its own and its FetchContent
|
|
23
|
+
# dependencies) resets the default MSVC runtime to the DLL one, see the file.
|
|
24
|
+
set(CMAKE_PROJECT_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/cmake/msvc_runtime.cmake")
|
|
25
|
+
add_subdirectory(upstream/packingsolver EXCLUDE_FROM_ALL)
|
|
26
|
+
|
|
27
|
+
# Upstream's own targets are created after its set(CMAKE_MSVC_RUNTIME_LIBRARY
|
|
28
|
+
# MultiThreaded), which the project() hook above cannot pre-empt, so they are
|
|
29
|
+
# switched to the DLL runtime by property afterwards. Only real binary targets
|
|
30
|
+
# carry the property; BUILDSYSTEM_TARGETS also lists INTERFACE, IMPORTED and
|
|
31
|
+
# utility targets, and a name shadowed by a same-named ALIAS cannot be modified
|
|
32
|
+
# at all (those are covered by the hook).
|
|
33
|
+
set(PS3D_RUNTIME_TARGET_TYPES STATIC_LIBRARY SHARED_LIBRARY MODULE_LIBRARY OBJECT_LIBRARY EXECUTABLE)
|
|
34
|
+
function(ps3d_use_dll_runtime dir)
|
|
35
|
+
get_property(targets DIRECTORY "${dir}" PROPERTY BUILDSYSTEM_TARGETS)
|
|
36
|
+
foreach(target IN LISTS targets)
|
|
37
|
+
get_target_property(aliased "${target}" ALIASED_TARGET)
|
|
38
|
+
get_target_property(imported "${target}" IMPORTED)
|
|
39
|
+
get_target_property(type "${target}" TYPE)
|
|
40
|
+
if(NOT aliased AND NOT imported AND type IN_LIST PS3D_RUNTIME_TARGET_TYPES)
|
|
41
|
+
set_target_properties("${target}" PROPERTIES
|
|
42
|
+
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
|
|
43
|
+
endif()
|
|
44
|
+
endforeach()
|
|
45
|
+
get_property(subdirs DIRECTORY "${dir}" PROPERTY SUBDIRECTORIES)
|
|
46
|
+
foreach(subdir IN LISTS subdirs)
|
|
47
|
+
ps3d_use_dll_runtime("${subdir}")
|
|
48
|
+
endforeach()
|
|
49
|
+
endfunction()
|
|
50
|
+
if(MSVC)
|
|
51
|
+
ps3d_use_dll_runtime("${CMAKE_CURRENT_SOURCE_DIR}/upstream/packingsolver")
|
|
52
|
+
endif()
|
|
53
|
+
|
|
54
|
+
# Development.Module, not Development: manylinux images ship no libpython.
|
|
55
|
+
set(PYBIND11_FINDPYTHON ON)
|
|
56
|
+
find_package(Python 3.7 COMPONENTS Interpreter Development.Module REQUIRED)
|
|
57
|
+
find_package(pybind11 CONFIG REQUIRED)
|
|
58
|
+
|
|
59
|
+
pybind11_add_module(_core MODULE packingsolver3d/_core.cpp)
|
|
60
|
+
target_link_libraries(_core PRIVATE PackingSolver::box PackingSolver::boxstacks)
|
|
61
|
+
|
|
62
|
+
# Coverage of the bridge itself (not of upstream): gcov instrumentation on the
|
|
63
|
+
# module's own translation unit, read back with gcovr after the test run.
|
|
64
|
+
option(PS3D_COVERAGE "Instrument packingsolver3d/_core.cpp for gcov" OFF)
|
|
65
|
+
if(PS3D_COVERAGE)
|
|
66
|
+
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
|
67
|
+
target_compile_options(_core PRIVATE --coverage -O0)
|
|
68
|
+
target_link_options(_core PRIVATE --coverage)
|
|
69
|
+
else()
|
|
70
|
+
message(WARNING "PS3D_COVERAGE needs GCC or Clang; ignored for ${CMAKE_CXX_COMPILER_ID}")
|
|
71
|
+
endif()
|
|
72
|
+
endif()
|
|
73
|
+
if(MSVC)
|
|
74
|
+
set_target_properties(_core PROPERTIES
|
|
75
|
+
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
|
|
76
|
+
endif()
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 HansBug
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 Florian Fontan
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
include README.md
|
|
2
|
+
include LICENSE
|
|
3
|
+
include LICENSE-packingsolver
|
|
4
|
+
include NOTICE.md
|
|
5
|
+
include MANIFEST.in
|
|
6
|
+
include CMakeLists.txt
|
|
7
|
+
recursive-include cmake *.cmake
|
|
8
|
+
include pytest.ini
|
|
9
|
+
include requirements.txt
|
|
10
|
+
include requirements-*.txt
|
|
11
|
+
recursive-include packingsolver3d *.py *.cpp
|
|
12
|
+
recursive-include test *.py *.csv *.md
|
|
13
|
+
recursive-include tools *.py
|
|
14
|
+
# Upstream sources travel with the sdist so a source install can build them.
|
|
15
|
+
graft upstream/packingsolver
|
|
16
|
+
prune upstream/packingsolver/data
|
|
17
|
+
prune upstream/packingsolver/test
|
|
18
|
+
prune upstream/packingsolver/.git
|
|
19
|
+
global-exclude __pycache__ *.py[cod] *.so *.pyd *.dylib
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Notice
|
|
2
|
+
|
|
3
|
+
`packingsolver3d` is an **unofficial** Python distribution of two solvers from [PackingSolver](https://github.com/fontanf/packingsolver) by Florian Fontan. It is not affiliated with or endorsed by the upstream project; please report solver behaviour to upstream only after reproducing it with the upstream command-line executables.
|
|
4
|
+
|
|
5
|
+
## What is redistributed
|
|
6
|
+
|
|
7
|
+
Every wheel ships one extension module, `packingsolver3d._core`, into which the unmodified upstream libraries `PackingSolver::box` and `PackingSolver::boxstacks` are statically linked together with a thin pybind11 bridge (`packingsolver3d/_core.cpp`). The upstream commit is recorded in `packingsolver3d/config/meta.py` (`__UPSTREAM_COMMIT__`) and vendored as the git submodule `upstream/packingsolver`; it is never patched in this repository, and a required fix is sent upstream as a pull request instead.
|
|
8
|
+
|
|
9
|
+
## Build configuration
|
|
10
|
+
|
|
11
|
+
The top-level `CMakeLists.txt` adds the upstream tree with exactly these options: `PACKINGSOLVER_USE_CLP=OFF PACKINGSOLVER_USE_HIGHS=ON PACKINGSOLVER_USE_KNITRO=OFF PACKINGSOLVER_BUILD_MAIN=OFF PACKINGSOLVER_BUILD_TEST=OFF`, in a `Release` configuration with position-independent code. HiGHS is the only linear-programming backend compiled in, which is why every call made by this package sets upstream's `linear_programming_solver_name` to HiGHS. On Windows the upstream targets are switched from the static to the DLL MSVC runtime so the module links against the runtime CPython uses. The solver libraries that upstream pulls in through CMake `FetchContent` (Boost, HiGHS, nlohmann/json, optimizationtools, treesearchsolver, columngenerationsolver, knapsacksolver, multiplechoicesubsetsumsolver, shape, mathoptsolverscmake) are statically linked into the module.
|
|
12
|
+
|
|
13
|
+
## Licenses
|
|
14
|
+
|
|
15
|
+
This repository is released under the MIT License (`LICENSE`). PackingSolver is released under the MIT License, reproduced verbatim in `LICENSE-packingsolver`. pybind11 is released under a BSD-style license. The statically linked third-party libraries keep their own licenses; see the corresponding upstream repositories referenced from `upstream/packingsolver/extern/CMakeLists.txt`.
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: packingsolver3d
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Pythonic bindings for the 3D (box / boxstacks) solvers of PackingSolver, compiled into one in-process extension module.
|
|
5
|
+
Home-page: https://github.com/HansBug/packingsolver3d
|
|
6
|
+
Author: HansBug
|
|
7
|
+
Author-email: hansbug@buaa.edu.cn
|
|
8
|
+
License: MIT
|
|
9
|
+
Project-URL: Homepage, https://github.com/HansBug/packingsolver3d
|
|
10
|
+
Project-URL: Documentation, https://packingsolver3d.readthedocs.io/en/latest/
|
|
11
|
+
Project-URL: Source, https://github.com/HansBug/packingsolver3d
|
|
12
|
+
Project-URL: Tracker, https://github.com/HansBug/packingsolver3d/issues
|
|
13
|
+
Project-URL: Issues, https://github.com/HansBug/packingsolver3d/issues
|
|
14
|
+
Project-URL: CI, https://github.com/HansBug/packingsolver3d/actions
|
|
15
|
+
Project-URL: Download, https://pypi.org/project/packingsolver3d/#files
|
|
16
|
+
Project-URL: Upstream, https://github.com/fontanf/packingsolver
|
|
17
|
+
Keywords: packingsolver bin-packing 3d box boxstacks knapsack container-loading pybind11
|
|
18
|
+
Classifier: Development Status :: 3 - Alpha
|
|
19
|
+
Classifier: Intended Audience :: Developers
|
|
20
|
+
Classifier: Intended Audience :: Science/Research
|
|
21
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
22
|
+
Classifier: Natural Language :: English
|
|
23
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
24
|
+
Classifier: Operating System :: MacOS
|
|
25
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
26
|
+
Classifier: Topic :: Scientific/Engineering
|
|
27
|
+
Classifier: Topic :: Scientific/Engineering :: Mathematics
|
|
28
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
29
|
+
Classifier: Programming Language :: C++
|
|
30
|
+
Classifier: Programming Language :: Python
|
|
31
|
+
Classifier: Programming Language :: Python :: 3
|
|
32
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
33
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
34
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
35
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
36
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
37
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
38
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
39
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
40
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
41
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
42
|
+
Requires-Python: >=3.7
|
|
43
|
+
Description-Content-Type: text/markdown
|
|
44
|
+
License-File: LICENSE
|
|
45
|
+
License-File: LICENSE-packingsolver
|
|
46
|
+
License-File: NOTICE.md
|
|
47
|
+
Provides-Extra: build
|
|
48
|
+
Requires-Dist: setuptools>=42; extra == "build"
|
|
49
|
+
Requires-Dist: wheel; extra == "build"
|
|
50
|
+
Requires-Dist: build>=0.7.0; extra == "build"
|
|
51
|
+
Requires-Dist: cmake>=3.28; extra == "build"
|
|
52
|
+
Requires-Dist: pybind11>=2.10; extra == "build"
|
|
53
|
+
Provides-Extra: doc
|
|
54
|
+
Requires-Dist: Jinja2>=3.0.0; extra == "doc"
|
|
55
|
+
Requires-Dist: sphinx<9,>=3.2.0; extra == "doc"
|
|
56
|
+
Requires-Dist: sphinx_rtd_theme>=0.4.3; extra == "doc"
|
|
57
|
+
Requires-Dist: enum_tools>=0.9.0; extra == "doc"
|
|
58
|
+
Requires-Dist: sphinx-toolbox; extra == "doc"
|
|
59
|
+
Requires-Dist: packaging; extra == "doc"
|
|
60
|
+
Requires-Dist: sphinx-multiversion>=0.2.4; extra == "doc"
|
|
61
|
+
Provides-Extra: test
|
|
62
|
+
Requires-Dist: coverage>=5; extra == "test"
|
|
63
|
+
Requires-Dist: pytest<8,>=7.4.4; python_version < "3.8" and extra == "test"
|
|
64
|
+
Requires-Dist: pytest<9,>=8.3.5; python_version >= "3.8" and extra == "test"
|
|
65
|
+
Requires-Dist: pytest-cov<5,>=4.1; python_version < "3.8" and extra == "test"
|
|
66
|
+
Requires-Dist: pytest-cov<6,>=5; python_version >= "3.8" and extra == "test"
|
|
67
|
+
Requires-Dist: pytest-timeout<3,>=2.4; extra == "test"
|
|
68
|
+
Requires-Dist: hbutils; extra == "test"
|
|
69
|
+
Provides-Extra: plot
|
|
70
|
+
Requires-Dist: plotly>=5; extra == "plot"
|
|
71
|
+
Provides-Extra: cov
|
|
72
|
+
Requires-Dist: gcovr>=8; python_version >= "3.8" and extra == "cov"
|
|
73
|
+
Dynamic: author
|
|
74
|
+
Dynamic: author-email
|
|
75
|
+
Dynamic: classifier
|
|
76
|
+
Dynamic: description
|
|
77
|
+
Dynamic: description-content-type
|
|
78
|
+
Dynamic: home-page
|
|
79
|
+
Dynamic: keywords
|
|
80
|
+
Dynamic: license
|
|
81
|
+
Dynamic: license-file
|
|
82
|
+
Dynamic: project-url
|
|
83
|
+
Dynamic: provides-extra
|
|
84
|
+
Dynamic: requires-python
|
|
85
|
+
Dynamic: summary
|
|
86
|
+
|
|
87
|
+
# packingsolver3d
|
|
88
|
+
|
|
89
|
+
[](https://pypi.org/project/packingsolver3d/)
|
|
90
|
+

|
|
91
|
+

|
|
92
|
+

|
|
93
|
+
|
|
94
|
+
[](https://github.com/HansBug/packingsolver3d/actions?query=workflow%3A%22Code+Test%22)
|
|
95
|
+
[](https://github.com/HansBug/packingsolver3d/actions?query=workflow%3A%22Release+Test%22)
|
|
96
|
+
[](https://github.com/HansBug/packingsolver3d/actions?query=workflow%3A%22Release%22)
|
|
97
|
+
[](https://codecov.io/gh/HansBug/packingsolver3d)
|
|
98
|
+
|
|
99
|
+
[](https://github.com/HansBug/packingsolver3d/stargazers)
|
|
100
|
+
[](https://github.com/HansBug/packingsolver3d/network)
|
|
101
|
+

|
|
102
|
+
[](https://github.com/HansBug/packingsolver3d/issues)
|
|
103
|
+
[](https://github.com/HansBug/packingsolver3d/pulls)
|
|
104
|
+
[](https://github.com/HansBug/packingsolver3d/graphs/contributors)
|
|
105
|
+
[](https://github.com/HansBug/packingsolver3d/blob/main/LICENSE)
|
|
106
|
+
|
|
107
|
+
Pythonic bindings for the two three-dimensional solvers of [PackingSolver](https://github.com/fontanf/packingsolver), `box` and `boxstacks`. The upstream C++ is compiled together with a thin pybind11 bridge into one extension module, so a wheel install needs no compiler and every solve runs in-process.
|
|
108
|
+
|
|
109
|
+
> **Unofficial distribution.** This project is maintained independently of PackingSolver and is not endorsed by its author. The solvers are built unmodified from the upstream commit recorded in `packingsolver3d/config/meta.py`; see [NOTICE.md](NOTICE.md) for the exact build configuration and licensing.
|
|
110
|
+
|
|
111
|
+
## Installation
|
|
112
|
+
|
|
113
|
+
```shell
|
|
114
|
+
pip install packingsolver3d
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Wheels are published for Linux (x86_64, aarch64), macOS (x86_64, arm64) and Windows (AMD64, ARM64), for every CPython the platform has an official build of: 3.7 through 3.14 on Linux x86_64 and Windows AMD64, 3.8 through 3.14 on Linux aarch64 and macOS, 3.11 through 3.14 on Windows ARM64. No compiler is needed for a wheel install. Other architectures (i686, ppc64le, s390x, armv7l, riscv64, loongarch64) are not built as wheels; `pip` falls back to the sdist there. Installing from the sdist compiles PackingSolver and the bridge from the vendored sources and needs a C++17 compiler, `git`, network access for upstream's `FetchContent` dependencies and CMake 3.28 or newer (installed into the build environment by `pip` where a `cmake` wheel exists). The optional plotting extra pulls in plotly:
|
|
118
|
+
|
|
119
|
+
```shell
|
|
120
|
+
pip install "packingsolver3d[plot]"
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Quick start
|
|
124
|
+
|
|
125
|
+
A 55 x 40 x 23 cm carry-on, the things you would like to take and how much you want each of them. The solver picks the subset with the highest total value that really fits, places every piece, and the result draws itself:
|
|
126
|
+
|
|
127
|
+
```python
|
|
128
|
+
from packingsolver3d import ALL_ROTATIONS, BinType, Instance, ItemType, Objective, box
|
|
129
|
+
from packingsolver3d.visual import plot_result # needs the plot extra
|
|
130
|
+
|
|
131
|
+
luggage = { # name: (x, y, z, value, copies)
|
|
132
|
+
'laptop': (36, 25, 3, 10, 1), 'camera': (15, 10, 8, 9, 1), 'shoes': (30, 20, 12, 8, 1),
|
|
133
|
+
'jacket': (35, 20, 15, 6, 1), 'sweater': (30, 25, 8, 5, 2), 'toiletry bag': (25, 12, 10, 4, 1),
|
|
134
|
+
'hair dryer': (22, 9, 20, 3, 1), 'book': (24, 16, 4, 3, 4), 'souvenir': (10, 10, 10, 2, 6),
|
|
135
|
+
'water bottle': (8, 8, 25, 1, 1),
|
|
136
|
+
}
|
|
137
|
+
names = list(luggage)
|
|
138
|
+
instance = Instance(
|
|
139
|
+
bin_types=[BinType(x=55, y=40, z=23)],
|
|
140
|
+
item_types=[ItemType(x=x, y=y, z=z, profit=value, copies=n, rotations=ALL_ROTATIONS)
|
|
141
|
+
for x, y, z, value, n in luggage.values()],
|
|
142
|
+
objective=Objective.KNAPSACK, # maximise the value of what fits
|
|
143
|
+
)
|
|
144
|
+
result = box.solve(instance, time_limit=3.0)
|
|
145
|
+
|
|
146
|
+
print(result.status, result.value, result.bound) # Status.FEASIBLE 69.0 72.0
|
|
147
|
+
packed = [0] * len(names)
|
|
148
|
+
for placement in result.placements:
|
|
149
|
+
packed[placement.item_type_id] += 1
|
|
150
|
+
for name, count in zip(names, packed):
|
|
151
|
+
print(f'{name:13s} {count}/{luggage[name][4]}' + ('' if count == luggage[name][4] else ' <- left out'))
|
|
152
|
+
|
|
153
|
+
plot_result(result, title='What fits in the carry-on').show() # rotate, zoom, hover a box for its item type
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
```text
|
|
157
|
+
Status.FEASIBLE 69.0 72.0
|
|
158
|
+
laptop 1/1
|
|
159
|
+
camera 1/1
|
|
160
|
+
shoes 1/1
|
|
161
|
+
jacket 0/1 <- left out
|
|
162
|
+
sweater 2/2
|
|
163
|
+
toiletry bag 1/1
|
|
164
|
+
hair dryer 1/1
|
|
165
|
+
book 4/4
|
|
166
|
+
souvenir 6/6
|
|
167
|
+
water bottle 1/1
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
[](https://packingsolver3d.readthedocs.io/en/latest/tutorials/quick_start/index.html)
|
|
171
|
+
|
|
172
|
+
Everything but the jacket fits, for a value of 69 out of 75. `result.bound` is what the solver proved: no packing is worth more than 72, so the status stays `FEASIBLE` rather than `OPTIMAL` -- the package never relabels a good incumbent as a proven optimum. The figure is interactive in the [documentation](https://packingsolver3d.readthedocs.io/en/latest/tutorials/quick_start/index.html); on another machine the anytime search may leave a different low-value item out.
|
|
173
|
+
|
|
174
|
+
Stacking rules, weights, trucks and unloading order switch the engine to `boxstacks`:
|
|
175
|
+
|
|
176
|
+
```python
|
|
177
|
+
from packingsolver3d import BinType, Instance, ItemType, Objective, boxstacks
|
|
178
|
+
|
|
179
|
+
pallets = Instance(
|
|
180
|
+
bin_types=[BinType(x=100, y=100, z=100, cost=10, copies=5, maximum_weight=1000)],
|
|
181
|
+
item_types=[ItemType(x=20, y=30, z=40, copies=6, weight=5,
|
|
182
|
+
stackability_id=0, maximum_stackability=3, maximum_weight_above=100)],
|
|
183
|
+
objective=Objective.BIN_PACKING,
|
|
184
|
+
)
|
|
185
|
+
result = boxstacks.solve(pallets, time_limit=2.0)
|
|
186
|
+
print(result.status, result.number_of_bins, len(result.bins[0].stacks)) # Status.OPTIMAL 1 3
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
Passing that instance to `box.solve` raises `UnsupportedFeatureError` instead of silently dropping the stacking fields, which is what the upstream CSV reader would do. Every result can be drawn with `plot_result(result, color_by='stack')`; see the [visualisation guide](https://packingsolver3d.readthedocs.io/en/latest/how_to/visualization/index.html).
|
|
190
|
+
|
|
191
|
+
## Scope
|
|
192
|
+
|
|
193
|
+
PackingSolver covers several problem families. This package deliberately exposes only the two 3D ones:
|
|
194
|
+
|
|
195
|
+
| Module | Upstream solver | What it adds |
|
|
196
|
+
|---|---|---|
|
|
197
|
+
| `packingsolver3d.box` | `PackingSolver::box` | Plain 3D bin packing: bins, items, rotations, weight capacity, the full algorithm portfolio as keyword switches |
|
|
198
|
+
| `packingsolver3d.boxstacks` | `PackingSolver::boxstacks` | Everything above plus stacks, stackability ids, nesting, maximum weight above, stack density, semi-trailer truck axle weights, defects and unloading constraints |
|
|
199
|
+
|
|
200
|
+
`rectangle`, `rectangleguillotine`, `onedimensional` and `irregular` are out of scope; use upstream directly for those.
|
|
201
|
+
|
|
202
|
+
| `box`: ten items in one bin | `boxstacks`: two item types, coloured by stack |
|
|
203
|
+
|---|---|
|
|
204
|
+
|  |  |
|
|
205
|
+
| `box`: four item types over several bins | `boxstacks`: a semi-trailer truck, axle limits leave one item out |
|
|
206
|
+
|  |  |
|
|
207
|
+
|
|
208
|
+
The figures are real solves drawn with `packingsolver3d.visual` (optional dependency `plotly`, `pip install "packingsolver3d[plot]"`), the same drawing upstream's `scripts/visualize_box.py` produces; in the [documentation](https://packingsolver3d.readthedocs.io/en/latest/how_to/visualization/index.html) they are interactive.
|
|
209
|
+
|
|
210
|
+
## Benchmarks
|
|
211
|
+
|
|
212
|
+
A reproducible capability study is part of the documentation: 97 cases from three public instance families with known or proven optima (all twenty 20-item Egeblad-Pisinger 3D knapsack instances, thirty Martello-Pisinger-Vigo generator class-9 instances of 30, 60 and 90 items cut from exactly three bins, and all 47 Ivancic-Mathur-Mohanty THPACK9 loading instances), run through `box.solve` with a 10 s time limit next to py3dbp, jerry800416/3D-bin-packing, gedex/bp3d, the five 3D strategies of U-Nesting, an exact CP-SAT model and the Martello-Pisinger-Vigo branch-and-bound as references. Every solution, ours and third-party, is re-validated by an independent geometry checker and every objective is recomputed from the placements. Totals over all cases; a smaller gap is better:
|
|
213
|
+
|
|
214
|
+
| Participant | EP 3D knapsack, 20 cases: profit (gap to bound) | MPV class 9, 30 cases: bins (bound 90) | THPACK9, 47 cases: containers (bound 655) |
|
|
215
|
+
|---|---|---|---|
|
|
216
|
+
| packingsolver3d (PackingSolver `box`) | 42,650,877 (-3.4%, all 16 proven optima reached) | 109 (+19, all ten 30-item cuts proven) | 689 (+34, 31 proven) |
|
|
217
|
+
| OR-Tools CP-SAT exact model (reference, 20 s) | 42,808,814 (-3.0%, 13 proofs) | - | - |
|
|
218
|
+
| jerry800416 / py3dbp, rotation relaxed on the first two | 41,234,099 / 40,933,828 (-6.6% / -7.2%) | 125 (+35) | 822 (+167) |
|
|
219
|
+
| gedex/bp3d, rotation relaxed on the first two | 39,480,331 (-10.5%) | 155 (+65) | 890 (+235) |
|
|
220
|
+
| U-Nesting, best of five strategies | 37,233,229 (-15.6%, SA) | 139 (+49, ExtremePoint) | 821 (+166, ExtremePoint) |
|
|
221
|
+
| Martello-Pisinger-Vigo 3dbpp.c (reference, 1 s) | - | 168 (+78) | - |
|
|
222
|
+
|
|
223
|
+
| packingsolver3d: three bins, proven optimal | py3dbp: four bins, rotation relaxed |
|
|
224
|
+
|---|---|
|
|
225
|
+
| [](https://packingsolver3d.readthedocs.io/en/latest/benchmarks/gallery/index.html) | [](https://packingsolver3d.readthedocs.io/en/latest/benchmarks/gallery/index.html) |
|
|
226
|
+
|
|
227
|
+
The pictures above are static previews because GitHub cannot run plotly; the [gallery in the documentation](https://packingsolver3d.readthedocs.io/en/latest/benchmarks/gallery/index.html) has the same scenes as rotatable, zoomable figures for our solution and four or five other participants on one case of each benchmark. The instances are small and constraint-free, each number is a single run, and the greedy libraries were designed for speed rather than optimality, so this is a capability study, not a ranking of packing software. Sources, versions, the protocol, the [complete per-case tables](https://packingsolver3d.readthedocs.io/en/latest/benchmarks/leaderboards/index.html) (roster, cases and bounds, leaderboards, items placed, times) and the gallery are in the [benchmark section of the documentation](https://packingsolver3d.readthedocs.io/en/latest/benchmarks/index.html); `make benchmarks` regenerates everything from `tools/make_benchmarks.py`.
|
|
228
|
+
|
|
229
|
+
## Design
|
|
230
|
+
|
|
231
|
+
* **Value in, value out.** Public types are frozen dataclasses. There is no live solver handle, mutable session or callback; each `solve` call builds the upstream instance, runs `optimize()` and copies the best solution back into Python values.
|
|
232
|
+
* **No Python object owns C++ memory.** The bridge in `packingsolver3d/_core.cpp` takes plain dicts and returns plain dicts; no upstream object outlives the call.
|
|
233
|
+
* **Auditable.** `Result.run` records the problem type, the exact options handed to upstream, upstream's captured log and the wall time.
|
|
234
|
+
* **Honest statuses.** `OPTIMAL` requires a solver-reported bound for the requested objective and an achieved value meeting it; otherwise the result is `FEASIBLE`, however good it looks.
|
|
235
|
+
* **Thread-friendly.** The GIL is released while upstream runs and its log is collected through a per-call stream, not by redirecting `std::cout`, so several threads may solve at once (sixteen concurrent solves are in the test suite).
|
|
236
|
+
* **In-process, by design.** `time_limit` and `memory_limit` are upstream's own checks. There is no process boundary: a crash inside upstream takes the interpreter with it, so callers who need isolation run `solve` in a worker process of their own.
|
|
237
|
+
|
|
238
|
+
## Behaviours inherited from upstream
|
|
239
|
+
|
|
240
|
+
packingsolver3d is a faithful binding: it does what PackingSolver does at the pinned commit and does not paper over it. These points were found while building the package; each is backed by an upstream source location or a reproducible observation, and the documentation page [Upstream behaviours you should know](https://packingsolver3d.readthedocs.io/en/latest/explanations/upstream_behaviours/index.html) carries the details.
|
|
241
|
+
|
|
242
|
+
* **The LP backend is HiGHS and is always set.** Upstream defaults the name to CLP and throws "no linear programming solver found" once column generation starts; the bundled build has HiGHS only.
|
|
243
|
+
* **`copies_min` defaults to "all copies".** Upstream's `-1` means every copy is mandatory (none under knapsack); an explicit `0` makes an empty packing the correct bin-packing optimum. `ItemType.copies_min` is therefore `None` unless you mean a minimum.
|
|
244
|
+
* **`boxstacks` groups stacks by `(group_id, stackability_id)` without checking footprints**, and its solution builder then throws. `boxstacks.validate` refuses such instances up front with `StackSemanticsError`; give differently shaped items different `stackability_id` values.
|
|
245
|
+
* **`boxstacks` keeps items upright.** Only the `XYZ` and `YXZ` rotations are placed; item types allowing neither are refused with `UnsupportedFeatureError`. `box` places all six rotations.
|
|
246
|
+
* **`boxstacks` accepts floor defects but places stacks over them** at the pinned commit (observed with corner, interior and full-width defects). `defects` are forwarded faithfully; do not rely on them being avoided.
|
|
247
|
+
* **Limits are upstream's own checks and the solver runs in-process.** `time_limit` and `memory_limit` are checked at algorithm checkpoints; there is no hard memory limit and a crash inside upstream ends the interpreter. The [budgets guide](https://packingsolver3d.readthedocs.io/en/latest/how_to/budgets/index.html) shows the worker-process pattern that restores both.
|
|
248
|
+
* **Unset profit and cost default to geometry**: item profit to `x * y * z`, bin cost to `x * y` (an area).
|
|
249
|
+
* **The `default` objective produces no solution.** It is upstream's unset placeholder, so `Instance` requires an explicit `objective` and `Objective.DEFAULT` is refused with `InvalidInstanceError`.
|
|
250
|
+
* **`OPTIMAL` is only reported when the achieved value meets a bound upstream reported for that objective**; otherwise the result is `FEASIBLE`, however good it looks. Keep `value` and `bound` as two columns when you publish numbers.
|
|
251
|
+
|
|
252
|
+
## Supported platforms
|
|
253
|
+
|
|
254
|
+
| Platform | Wheels for CPython | Why the range stops where it does |
|
|
255
|
+
|---|---|---|
|
|
256
|
+
| Linux x86_64 (manylinux) | 3.7 -- 3.14 | full range |
|
|
257
|
+
| Linux aarch64 (manylinux) | 3.8 -- 3.14 | no 3.7 build exists for arm64 on the CI toolchain; 3.7 has been end-of-life since 2023 |
|
|
258
|
+
| macOS x86_64 and arm64 (11.0+) | 3.8 -- 3.14 | same 3.7 gap |
|
|
259
|
+
| Windows AMD64 | 3.7 -- 3.14 | full range |
|
|
260
|
+
| Windows ARM64 | 3.11 -- 3.14 | see below |
|
|
261
|
+
| everything else (i686, ppc64le, s390x, armv7l, riscv64, loongarch64, PyPy, free-threaded builds) | none | `pip` builds the sdist; see Installation |
|
|
262
|
+
|
|
263
|
+
**Windows on ARM and older Pythons.** CPython 3.7 and 3.8 never had a Windows ARM64 build at all. 3.9 and 3.10 exist for ARM64 only as python.org's `pythonarm64` nuget package (marked experimental at the time, meant for embedding and CI): there was no installer and no Store package before 3.11, and the CI toolchain (`actions/setup-python`) provides ARM64 hosts from 3.11 on. Wheels for 3.9/3.10 on Windows ARM64 are deliberately not built: the scientific stack does not ship them either (numpy and scipy start at 3.12, pandas at 3.11), 3.9 is end-of-life and 3.10 reaches end-of-life in October 2026, and users of those interpreters on ARM hardware almost always run the x64 build under emulation, which the AMD64 wheels cover. On such a machine `pip` falls back to the sdist, which builds with the MSVC ARM64 toolchain.
|
|
264
|
+
|
|
265
|
+
## Development
|
|
266
|
+
|
|
267
|
+
```shell
|
|
268
|
+
git clone --recursive https://github.com/HansBug/packingsolver3d.git
|
|
269
|
+
cd packingsolver3d
|
|
270
|
+
pip install -r requirements-build.txt -r requirements-test.txt -r requirements-cov.txt -r requirements-plot.txt
|
|
271
|
+
make build # compile upstream + the pybind11 bridge into packingsolver3d/_core
|
|
272
|
+
make unittest # pytest + docstring examples, with coverage
|
|
273
|
+
make doctest # only the docstring examples (pytest --doctest-modules)
|
|
274
|
+
LINETRACE=1 make build && make unittest # coverage.xml then also covers the C++ bridge
|
|
275
|
+
make rst_auto # regenerate API reference pages
|
|
276
|
+
make docs # sphinx html
|
|
277
|
+
make package # sdist + wheel
|
|
278
|
+
make try_sdist # install the sdist from source in a clean docker image and run the unit tests there
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
`make help` lists every target; `RANGE_DIR=<subdir>` narrows `unittest` and `rst_auto` to one directory.
|
|
282
|
+
|
|
283
|
+
## License
|
|
284
|
+
|
|
285
|
+
This repository is released under the [MIT License](LICENSE). PackingSolver is released under the MIT License, reproduced in [LICENSE-packingsolver](LICENSE-packingsolver).
|