Presentation on theme: "D1 Algorithms Sorting algorithms. Bubble sort- repeated passes through a list of numbers by comparing and switching adjacent numbers Try for 16, 9, 4,"— Presentation transcript:
Bin packing algorithms packing with as few bins/boxes as possible BoxABCDEFGHIJ HEIGHT (M) 0.80.60.70.22.214.171.124.60.50.6
Full bin combinations only suitable for small problems BoxABCDEFGHIJ HEIGHT (M) 0.80.60.70.126.96.36.199.60.50.6 Example A + C 8+7=15 FULL BIN B + E6+9=15 FULL BIN H + J + G6+6+3=15 FULL BIN D + I + F 5+5+ 4=14REMAINING BIN
First fit algorithm taking the boxes in the order listed and place in the next box available A (8) BIN 1LEAVING 7 B(6) BIN 1LEAVING 1 C(7)BIN 2LEAVING 8 D(5)BIN 2LEAVING 3 E(9)BIN 3LEAVING 6 F(4)BIN 3 LEAVING 2 G(3)BIN 2LEAVING 0 H(6)BIN 4LEAVING 9 I (5) BIN 4LEAVING 4 J(6) BIN 5 LEAVING 9 Although this has led to a further bin being used it is an attempt for a good solution known as a HEURISTIC ALGORITHM FIRST FIT DECREASING ALGORITHM- REORDER BOXES USING A SORTING ALGORITHM FIRST THEN FOLLOW THE FIRST FIT ALGORITHM
Your consent to our cookies if you continue to use this website.