Skip to content

Commit

Permalink
Update rectangle test instance
Browse files Browse the repository at this point in the history
  • Loading branch information
fontanf committed Oct 9, 2024
1 parent 1c64045 commit e5af22d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
6 changes: 3 additions & 3 deletions data/rectangle/tests/bin_packing_with_leftovers_items.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ID,WIDTH,HEIGHT,COPIES
1,600,353,2
3,400,251,3
2,300,149,4
1,600,370,2
3,400,260,3
2,300,140,4
18 changes: 9 additions & 9 deletions data/rectangle/tests/bin_packing_with_leftovers_solution.csv
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
TYPE,ID,COPIES,BIN,X,Y,LX,LY
BIN,0,1,0,0,0,3000,2000
ITEM,0,1,0,0,0,600,353
ITEM,0,1,0,600,0,600,353
ITEM,1,1,0,0,353,400,251
ITEM,1,1,0,400,353,400,251
ITEM,1,1,0,800,353,400,251
ITEM,2,1,0,0,604,300,149
ITEM,2,1,0,300,604,300,149
ITEM,2,1,0,600,604,300,149
ITEM,2,1,0,900,604,300,149
ITEM,0,1,0,0,0,600,370
ITEM,0,1,0,600,0,600,370
ITEM,1,1,0,0,370,400,260
ITEM,1,1,0,400,370,400,260
ITEM,1,1,0,800,370,400,260
ITEM,2,1,0,0,630,300,140
ITEM,2,1,0,300,630,300,140
ITEM,2,1,0,600,630,300,140
ITEM,2,1,0,900,630,300,140
5 changes: 5 additions & 0 deletions test/rectangle/rectangle_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ TEST_P(AlgorithmTest, Algorithm)
Output output = optimize(instance, optimize_parameters);

Solution solution(instance, test_params.certificate_path.string());
std::cout << std::endl
<< "Reference solution" << std::endl
<< "------------------" << std::endl;
solution.format(std::cout);

EXPECT_EQ(!(output.solution_pool.best() < solution), true);
EXPECT_EQ(!(solution < output.solution_pool.best()), true);
}
Expand Down

0 comments on commit e5af22d

Please sign in to comment.