Skip to content

Commit

Permalink
Fix rectangle::BranchingScheme::dominates
Browse files Browse the repository at this point in the history
  • Loading branch information
fontanf committed Oct 20, 2024
1 parent b49cf9c commit 34cc3b6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/rectangle/branching_scheme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,8 @@ const std::vector<BranchingScheme::Insertion>& BranchingScheme::insertions(
{
//std::cout << "id " << parent->id
// << " number_of_items " << parent->number_of_items
// << " number_of_bins " << parent->number_of_bins
// << " waste " << parent->waste
// << " group_score " << parent->group_score
// << " load " << (double)parent->item_area / parent->guide_area
// << " last_bin_middle_axle_weight " << parent->groups.front().last_bin_middle_axle_weight
Expand Down
5 changes: 5 additions & 0 deletions src/rectangle/branching_scheme.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,11 @@ class BranchingScheme
}
}

if (node_1->number_of_bins < node_2->number_of_bins)
return true;
if (node_1->number_of_bins > node_2->number_of_bins)
return false;

//if (unbounded_knapsck_ && node_1->profit < node_2->profit)
// return false;
ItemPos pos_1 = node_1->uncovered_items.size() - 1;
Expand Down

0 comments on commit 34cc3b6

Please sign in to comment.