Python Forum
Cage filling algorithm - Python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cage filling algorithm - Python
#1
Cage filling exercise - Design an algorithm to fill a cage as efficiently as possible Within Tesco’s supply chain, utilisation of space is key to maximising efficiency in both the transport and storage of stock. Stock is typically transported in cages and remains in them until they can fit out onto a shelf in-store. It is therefore crucial that we make the best possible use of the volume of these cages to keep transporting costs in control and free up storage space in a store’s warehouse. We would like you to design an algorithm in Python to fill a cage given a set of products and their dimensions.

A cage can be assumed to be perfectly cuboid with the following dimensions:  Height = 1.603m  Width = 0.697m  Length = 0.846m

Packaging dimensions and the quantities required of each product can be found in the attached file “cage_products.csv”. Products are also perfect cuboids, non-compressible (can’t be damaged/crushed) and can be freely rotated. We would like the cage filling algorithm to return:  The number of cages required to accommodate the listed products  The volume utilisation percentage of the cages (volume of products on the cage / cage’s

Product ID Height (mm) Width (mm) Length (mm) Quantity needed
1 57 80 300 1
2 326 100 100 2
3 100 100 200 1
4 50 125 80 1
5 41 100 133 1
6 300 500 400 3
7 100 100 101 1
8 57 500 300 2
9 153 268 398 1
10 112 325 157 2
11 275 320 270 1
12 400 400 600 3
13 520 400 600 1
14 60 167 100 2
15 10 10 10 1
Reply


Messages In This Thread
Cage filling algorithm - Python - by bnbehera - Jul-02-2018, 08:58 AM
RE: Cage filling algorithm - Python - by Larz60+ - Jul-02-2018, 04:04 PM
RE: Cage filling algorithm - Python - by bnbehera - Jul-02-2018, 04:29 PM
RE: Cage filling algorithm - Python - by ichabod801 - Jul-02-2018, 04:55 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Algorithm for extracting comments from Python source code Pavel1982 6 637 Feb-28-2024, 09:52 PM
Last Post: Pavel1982
  pandas : problem with conditional filling of a column Xigris 2 674 Jul-22-2023, 11:44 AM
Last Post: Xigris
  Numpy error while filling up matrix with Characters august 4 1,915 Apr-13-2022, 10:28 PM
Last Post: august
  Rock paper scissors in python with "algorithm" Agat0 23 6,219 Mar-01-2022, 03:20 PM
Last Post: Agat0
  [SOLVED] Filling multidict from CSV file? Winfried 3 2,012 Oct-24-2020, 08:26 PM
Last Post: Winfried
  filling and printing numpy arrays of str pjfarley3 4 3,360 Jun-07-2020, 09:09 PM
Last Post: pjfarley3
  TypeError: size; expecting a recognized type filling string dict a11_m11 0 2,569 Feb-10-2020, 08:26 AM
Last Post: a11_m11
  Filling an Excel file starter_student 3 3,010 Jul-05-2019, 06:29 AM
Last Post: starter_student
  Can Python 3.6 program handle Python 2.7 algorithm? Socrates123 2 1,891 May-14-2019, 09:20 PM
Last Post: snippsat
  python result problem of an iteration algorithm for power allocation Jessica 1 2,697 Sep-07-2018, 08:08 PM
Last Post: micseydel

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020