Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions include/packingsolver/irregular/optimize.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,13 @@ struct OptimizeParameters: packingsolver::Parameters<Instance, Solution, Output>
*/
bool benders_decomposition_use_tree_search_relative_positions = false;

/**
* Solve the open dimension X, open dimension Y and bin packing with
* leftovers objectives with the tree search maximal spaces algorithm
* through the sequential feasibility algorithm, instead of directly.
*/
bool tree_search_maximal_spaces_use_sequential_feasibility = true;

/**
* Use the tree search on relative positions (only for the 'Feasibility'
* objective with a single bin, and for the open dimension objectives;
Expand Down
1 change: 1 addition & 0 deletions python/src/irregular.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,7 @@ void bind_irregular(nb::module_& m)
.def_rw("use_global_nonlinear_programming", &OptimizeParameters::use_global_nonlinear_programming)
.def_rw("use_benders_decomposition", &OptimizeParameters::use_benders_decomposition)
.def_rw("benders_decomposition_use_tree_search_relative_positions", &OptimizeParameters::benders_decomposition_use_tree_search_relative_positions)
.def_rw("tree_search_maximal_spaces_use_sequential_feasibility", &OptimizeParameters::tree_search_maximal_spaces_use_sequential_feasibility)
.def_rw("benders_decomposition_bottom_up_maximum_number_of_subproblem_solves", &OptimizeParameters::benders_decomposition_bottom_up_maximum_number_of_subproblem_solves)
.def_rw("benders_decomposition_bottom_up_maximum_number_of_cuts", &OptimizeParameters::benders_decomposition_bottom_up_maximum_number_of_cuts)
.def_rw("benders_decomposition_use_lifting", &OptimizeParameters::benders_decomposition_use_lifting)
Expand Down
3 changes: 3 additions & 0 deletions src/irregular/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ int main(int argc, char *argv[])
("use-column-generation,", po::value<bool>(), "enable column-generation")
("use-benders-decomposition,", po::value<bool>(), "enable Benders decomposition algorithm")
("benders-decomposition-use-tree-search-relative-positions,", po::value<bool>(), "use the tree search on relative positions in the subproblems of the Benders decomposition algorithm")
("tree-search-maximal-spaces-use-sequential-feasibility,", po::value<bool>(), "solve the open dimension and bin packing with leftovers objectives with the tree search maximal spaces algorithm through the sequential feasibility algorithm")
("benders-decomposition-bottom-up-maximum-number-of-subproblem-solves,", po::value<Counter>(), "maximum number of subproblem solves of the bottom-up enumeration of the minimal infeasible subsets of a bin in the Benders decomposition algorithm (0 disables it)")
("benders-decomposition-bottom-up-maximum-number-of-cuts,", po::value<Counter>(), "maximum number of cuts of the bottom-up enumeration of the minimal infeasible subsets of a bin in the Benders decomposition algorithm")
("benders-decomposition-use-lifting,", po::value<bool>(), "lift the no-good cuts of the Benders decomposition algorithm")
Expand Down Expand Up @@ -214,6 +215,8 @@ int main(int argc, char *argv[])
parameters.use_benders_decomposition = vm["use-benders-decomposition"].as<bool>();
if (vm.count("benders-decomposition-use-tree-search-relative-positions"))
parameters.benders_decomposition_use_tree_search_relative_positions = vm["benders-decomposition-use-tree-search-relative-positions"].as<bool>();
if (vm.count("tree-search-maximal-spaces-use-sequential-feasibility"))
parameters.tree_search_maximal_spaces_use_sequential_feasibility = vm["tree-search-maximal-spaces-use-sequential-feasibility"].as<bool>();
if (vm.count("benders-decomposition-bottom-up-maximum-number-of-subproblem-solves"))
parameters.benders_decomposition_bottom_up_maximum_number_of_subproblem_solves = vm["benders-decomposition-bottom-up-maximum-number-of-subproblem-solves"].as<Counter>();
if (vm.count("benders-decomposition-bottom-up-maximum-number-of-cuts"))
Expand Down
2 changes: 2 additions & 0 deletions src/irregular/optimize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -922,6 +922,8 @@ void optimize_tree_search_maximal_spaces(
= parameters.not_anytime_tree_search_maximal_spaces_queue_size;
ts_ms_parameters.maximum_approximation_ratio
= parameters.not_anytime_maximum_approximation_ratio;
ts_ms_parameters.use_sequential_feasibility
= parameters.tree_search_maximal_spaces_use_sequential_feasibility;
ts_ms_parameters.new_solution_callback = [&algorithm_formatter](
const packingsolver::Output<Instance, Solution>& ts_output)
{
Expand Down
Loading
Loading