@Test void testBouwcampCodes33x32A() { BouwkampCodeDirectory directory = BouwkampCodeDirectory.getInstance(); BouwkampCode bkpLine = directory.codesForCount(9, "33x32A"); List<Container> containers = new ArrayList<>(); containers.add(toContainer(bkpLine)); BruteForcePackager packager = new BruteForcePackager(containers); List<BoxItem> products = new ArrayList<>(); List<Box> boxes = toBoxes(bkpLine); for(Box box : boxes) { products.add(new BoxItem(box, 1)); } Container fits = packager.pack(products); assertNull(fits); }
public BruteForceResult pack(List<Placement> placements, Container container, PermutationRotationIterator rotator, long deadline, int checkpointsPerDeadlineCheck) { return pack(placements, container, rotator, BooleanSupplierBuilder.builder().withDeadline(deadline, checkpointsPerDeadlineCheck).build()); }
BruteForcePackager extends Packager { public BruteForceResult pack(List<Placement> placements, Container container, PermutationRotationIterator rotator, long deadline, int checkpointsPerDeadlineCheck) { return pack(placements, container, rotator, BooleanSupplierBuilder.builder().withDeadline(deadline, checkpointsPerDeadlineCheck).build()); } }
BruteForcePackager extends Packager { public BruteForceResult pack(List<Placement> placements, Container container, PermutationRotationIterator rotator, long deadline, int checkpointsPerDeadlineCheck) { return pack(placements, container, rotator, BooleanSupplierBuilder.builder().withDeadline(deadline, checkpointsPerDeadlineCheck).build()); } BruteForcePackager(List<Container> containers, boolean rotate3D, boolean binarySearch, int checkpointsPerDeadlineCheck);  BruteForcePackager(List<Container> containers); }
BruteForcePackager extends Packager { public BruteForceResult pack(List<Placement> placements, Container container, PermutationRotationIterator rotator, long deadline, int checkpointsPerDeadlineCheck) { return pack(placements, container, rotator, BooleanSupplierBuilder.builder().withDeadline(deadline, checkpointsPerDeadlineCheck).build()); } BruteForcePackager(List<Container> containers, boolean rotate3D, boolean binarySearch, int checkpointsPerDeadlineCheck);  BruteForcePackager(List<Container> containers); static BruteForcePackagerBuilder newBuilder(); BruteForceResult pack(List<Placement> placements, Container container, PermutationRotationIterator rotator, long deadline, int checkpointsPerDeadlineCheck); BruteForceResult pack(List<Placement> placements, Container container, PermutationRotationIterator rotator, long deadline, int checkpointsPerDeadlineCheck, BooleanSupplier interrupt); BruteForceResult pack(List<Placement> placements, Container container, PermutationRotationIterator rotator, BooleanSupplier interrupt); static int pack(List<Placement> placements, Dimension container, PermutationRotationIterator rotator, long deadline, int checkpointsPerDeadlineCheck, Container holder, int index); static int pack(List<Placement> placements, Dimension container, PermutationRotationIterator rotator, long deadline, int checkpointsPerDeadlineCheck, Container holder, int index, BooleanSupplier interrupt); static int pack(List<Placement> placements, Dimension remainingSpace, PermutationRotationIterator rotator, Container holder, int index, BooleanSupplier interrupt); }
BruteForcePackager extends Packager { public BruteForceResult pack(List<Placement> placements, Container container, PermutationRotationIterator rotator, long deadline, int checkpointsPerDeadlineCheck) { return pack(placements, container, rotator, BooleanSupplierBuilder.builder().withDeadline(deadline, checkpointsPerDeadlineCheck).build()); } BruteForcePackager(List<Container> containers, boolean rotate3D, boolean binarySearch, int checkpointsPerDeadlineCheck);  BruteForcePackager(List<Container> containers); static BruteForcePackagerBuilder newBuilder(); BruteForceResult pack(List<Placement> placements, Container container, PermutationRotationIterator rotator, long deadline, int checkpointsPerDeadlineCheck); BruteForceResult pack(List<Placement> placements, Container container, PermutationRotationIterator rotator, long deadline, int checkpointsPerDeadlineCheck, BooleanSupplier interrupt); BruteForceResult pack(List<Placement> placements, Container container, PermutationRotationIterator rotator, BooleanSupplier interrupt); static int pack(List<Placement> placements, Dimension container, PermutationRotationIterator rotator, long deadline, int checkpointsPerDeadlineCheck, Container holder, int index); static int pack(List<Placement> placements, Dimension container, PermutationRotationIterator rotator, long deadline, int checkpointsPerDeadlineCheck, Container holder, int index, BooleanSupplier interrupt); static int pack(List<Placement> placements, Dimension remainingSpace, PermutationRotationIterator rotator, Container holder, int index, BooleanSupplier interrupt);  }