IE5600 – Applied Programming for Industrial Systems
IE5600 – Applied Programming for Industrial Systems
AY 2023/24 Semester 2 Individual Assignment 2 - PyWarehouse
Objectives
At the completion of the individual assignment, you should:
-
Develop a better understanding of how to apply the computational problem solving process to a complex problem that requires the use of appropriate data structures and algorithms.
-
Implement procedural and object-oriented programming paradigms in Python.
-
Apply appropriate user-defined data structures and algorithms.
General Requirements
You are required to develop a Python program known as PyWarehouse which is essentially a warehouse management system for a typical manufacturing and import/export company. PyWarehouse will manage the storage locations in the warehouse, the inventory items stored in the storage locations as well as the inbound and outbound movement of these inventory items.
Figure 1 shows a layout plan of a typical warehouse divided into several zones such as reception, loading & unloading, picking and storage. As illustrated in the layout plan, the storage zone is further organised into multiple storage racks.
Figure 2 shows a hypothetical layout plan based on Figure 1 which will constitute the actual warehouse that PyWarehouse would be managing. In this hypothetical layout plan, the storage racks are numbered sequentially with the odd numbered racks on one side and the even numbered racks on the other side.
Each storage rack is further divided into one or more levels of storage spaces known as shelves. Each storage shelf can be further divided into one or more compartments known as storage bins. Each storage bin is characterised by various key parameters such as length, width, depth, volumetric space, and load capacity. Refer to Figure 3 for a three-dimensional view of a typical storage rack. An inventory item may only be allocated to a storage bin of sufficient volumetric space and adequate load capacity. In addition, no part of the item should protrude out of the storage bin, i.e., the length
Figure 1 – Layout plan of a typical warehouse.
Rack 10
Rack 12
Rack 8
Rack 6
Rack 4
Rack 2
Storage
Rack 9
Rack 11
Rack 7
Rack 5
Rack 3
Rack 1
Picking, Putaway, Packing |
Forklift Parking X |
Loading & Unloading
Reception
Figure 2 – Hypothetical layout plan of PyWarehouse.
Shelf 3
Shelf 2
Shelf 1
Rack 1
Bin 2
Bin 3
Bin 1
Depth Width
Length
Figure 3 – Three-dimensional view of a typical storage rack (with numbering of rack, shelves and bins).
In general, the load capacity of a storage bin will remain the same or decrease as the shelf level increases in order to maintain the overall stability of the storage rack. In other words, heavier items should be stored on lower storage shelves. If a storage bin is shared among multiple items, it is necessary to check that the odd-shaped volumetric space remaining is sufficient and a heavier item is not stacked on top of a lighter item. See the two examples depicted in Figure 4.
Figure 4 – Sharing of storage bins by multiple items.
Rack 1 Shelf 2 Bin 2
Remaining odd-shaped volumetric space
Bin 1
Existing Item
New Item that is lighter weigh
Bin 2
Existing Item |
Design and Implementation of Classes
Design a set of suitable classes together with the necessary inheritance and/or association relationships to represent the warehouse shown in Figure 2 that PyWarehouse would be managing. You do not need to draw a UML class diagram as part of the deliverable submission. You are only required to define the classes in a Python module and import this module for use in the actual PyWarehouse program.
You need to take into consideration that each storage rack consists of multiple storage shelves and each shelf is further divided into multiple storage bins as shown in Figure 3 and 4.
In addition, the classes also need to be able to represent inventory items that are stored in the warehouse. For simplicity, PyWarehouse is only required to track inventory items in broad lot quantity that are packaged in carton boxes or pallets. In other words, each unit of an inventory item manifest as a single carton box or pallet stored at a particular storage bin.
-
SKU Code – MASK
-
Name – COVID-19 3-Ply Face Mask (100 Boxes)
-
Dimensions (LxWxD) – 100 cm x 100 cm x 100 cm
-
Volumetric Space – 1,000,000 cm3
-
Weight – 20 kg
-
Quantity – 10:
o 1 – Rack 1 Shelf 1 Bin 1 o 2 – Rack 1 Shelf 1 Bin 1 o 3 – Rack 1 Shelf 1 Bin 2 o 4 – Rack 1 Shelf 1 Bin 2 o 5 – Rack 1 Shelf 1 Bin 3 o 6 – Rack 1 Shelf 1 Bin 3 o 7 – Rack 1 Shelf 2 Bin 1 o 8 – Rack 1 Shelf 2 Bin 1 o 9 – Rack 1 Shelf 2 Bin 2 o 10 – Rack 1 Shelf 2 Bin 2
It is mandatory to apply the object-oriented programming paradigm to this assignment. Otherwise, you would only be awarded 50% of the marks for the use cases.
Use Cases
Use the classes that you have defined to implement the following use cases for PyWarehouse without the use of any Python modules. In other words, your program should NOT contain any import statement unless you are importing your own user-defined module(s).
S/N |
Use Case |
Use Case Description/Business Rules |
1 |
Create Storage Rack (2 marks) |
• Created the following storage bins: o Rack 1 Shelf 1 Bin 1 o Rack 1 Shelf 1 Bin 2 o Rack 1 Shelf 1 Bin 3 o... o Rack 1 Shelf 3 Bin 3 |
2 |
Create Inventory Item (1 marks) |
• Create a new inventory item record. Sample Input: 1,000,000 cm3 • Weight – 20 kg |
Tan Wee Kek, tanwk@comp.nus.edu.sg 5
IE5600 – Applied Programming for Industrial Systems
S/N |
Use Case |
Use Case Description/Business Rules |
||||
3 |
Add Inventory (4 marks) |
|
S/N |
Use Case |
Use Case Description/Business Rules |
||||
4 |
Remove Inventory (1 mark) |
|
||||
5 |
Query Inventory Item (1 mark) |
• SKU Code – MASK Sample Output: cm 1,000,000 cm3 o 1 – Rack 1 Shelf 1 Bin 1 Note that in use case 3, we added 2 units of MASK to Rack 1 Shelf 1 Bin 1 and in use case 4 we removed 1 unit of MASK. |
S/N |
Use Case |
Use Case Description/Business Rules |
||||
6 |
Query Storage Bin (1 mark) |
o 1 – MASK Note that in use case 3, we added 2 units of MASK to Rack 1 Shelf 1 Bin 1 and in use case 4 we removed 1 unit of MASK. |
Deliverable Submission
The assignment deliverable to be submitted to the Canvas Assignment tool are to be placed in a single zip archive file with the following folders structure:
• source subfolder containing:
o All Python source files that constitute your program.
o The main source file containing the program entry point should be named as
pywarehouse.py, i.e., your program should be runnable with the command
python pywarehouse.py
Upload this zip archive file to the designated Canvas Assignment: Individual Assignment 2.
Your deliverables must be submitted latest by Sunday, 26 November 2023, 11:59 pm. No assignment will be accepted for assessment after this date/time and you will be awarded 0 marks.
-- End of Assignment Specification --