File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -420,8 +420,6 @@ packingsolver::rectangle::Output packingsolver::rectangle::optimize(
420420 algorithm_formatter.start ();
421421 algorithm_formatter.print_header ();
422422
423- algorithm_formatter.update_knapsack_bound (instance.item_profit ());
424-
425423 // Select algorithms to run.
426424 ItemPos mean_number_of_items_in_bins
427425 = largest_bin_space (instance) / mean_item_space (instance);
@@ -551,6 +549,9 @@ packingsolver::rectangle::Output packingsolver::rectangle::optimize(
551549 }
552550 }
553551
552+ if (instance.objective () == Objective::Knapsack)
553+ algorithm_formatter.update_knapsack_bound (instance.item_profit ());
554+
554555 if (instance.objective () == Objective::BinPacking) {
555556 if (instance.number_of_bin_types () == 1
556557 && instance.number_of_items () <= 100 ) {
You can’t perform that action at this time.
0 commit comments