43 namespace Test {
namespace Int {
75 dsv(new
Gecode::IntSetValues[static_cast<unsigned int>(m+
n)]) {
103 if (
dsv[
i]() || (
i == 0)) {
106 for (
int k=0;k<
n_bins; k++)
144 for (
int i=
s.size();
i--; )
151 :
Test(
"BinPacking::"+
str(m0)+
"::"+
str(s0)+
"::"+(
v ?
"+" :
"-"),
152 m0+s0.
size(), 0, 100),
175 if ((
x[
m+j] < 0) || (
x[
m+j] >=
m))
180 for (
int i=
s.size();
i--; )
194 for (
int i=
s.size();
i--; )
212 mutable int il[4][8];
217 :
Test(
"MultiBinPacking::"+
str(d0)+
"::"+
str(m0)+
"::"+
218 str(s0)+
"::"+
str(c0), s0.
size() / d0, 0, m0-1),
219 d(d0),
m(m0),
s(s0),
c(c0) {
230 for (
int i=
x.size();
i--; )
242 for (
int j=
m*
d; j--; )
268 :
Base(
"Int::MultiBinPacking::Clique::"+
Test::
str(
c)), clique(
c) {}
281 int n_items = clique[clique.size()-1] + 1;
286 for (
int i=2*n_items;
i--; )
289 for (
int i=clique.size()-1;
i--; )
290 s[
rand(n_items)*2+0]=2;
292 for (
int i=clique.size();
i--; )
302 if (clique.size() != mc.
size()) {
306 for (
int i=clique.size();
i--; )
307 if (!mc.
in(clique[
i])) {
335 for (
int m=1;
m<4;
m++) {
336 (void)
new BPT(
m, s0);
337 (void)
new BPT(
m, s1);
338 (void)
new BPT(
m, s2);
339 (void)
new BPT(
m, s3);
340 (void)
new BPT(
m, s4);
341 (void)
new BPT(
m, s5);
342 (void)
new BPT(
m, s6);
343 (void)
new BPT(
m, s7);
344 (void)
new BPT(
m, s8);
345 (void)
new BPT(
m, s9);
346 (void)
new BPT(
m, s1,
false);
351 IntArgs s1(2*4, 1,2, 2,1, 1,2, 2,1);
353 (void)
new MBPT(2, 4, s1, c1);
354 (void)
new MBPT(2, 6, s1, c1);
355 IntArgs s2(2*3, 1,1, 1,1, 1,1);
358 (void)
new MBPT(2, 6, s2, c21);
359 (void)
new MBPT(2, 6, s2, c22);
360 IntArgs s3(3*4, 1,2,3, 3,2,1, 2,1,3, 1,3,2);
364 (void)
new MBPT(3, 4, s3, c31);
365 (void)
new MBPT(3, 4, s3, c32);
366 (void)
new MBPT(3, 4, s3, c33);
367 (void)
new MBPT(3, 5, s3, c31);
368 (void)
new MBPT(3, 5, s3, c32);
369 (void)
new MBPT(3, 5, s3, c33);
374 IntArgs c2(8, 1,2,3,4,5,6,7,8);
375 IntArgs c3(8, 1,3,7,10,15,22,27,97);
376 IntArgs c41(8, 1,2,3,4,5,6,7,14);
377 IntArgs c42(8, 1,2,3,4,5,6,7,15);
378 IntArgs c43(8, 1,2,3,4,5,6,7,16);
379 IntArgs c44(8, 1,2,3,4,5,6,7,30);
380 IntArgs c45(8, 1,2,3,4,5,6,7,31);
381 IntArgs c46(8, 1,2,3,4,5,6,7,32);
382 IntArgs c47(8, 1,2,3,4,5,6,7,62);
383 IntArgs c48(8, 1,2,3,4,5,6,7,63);
384 IntArgs c49(8, 1,2,3,4,5,6,7,64);