I want to maximise the number of pallets of material I can send in a shipment. My pallets of material are one of three different classes:
- Material Type 1 (fragile): Can be stacked with another pallet of type 1, can be stacked on top of a pallet of material type 2.
- Material Type 2 (sturdy): Can be stacked with another pallet of material type 2, can be stacked underneath material type 1. Cannot be stacked on top of Material 1
- Material Type 3 (very fragile): Cannot be stacked.
I need to calculate how many pallet footprints or bottom pallets are required for any order if I am given a list of the materials pallets are ordered. For example: 10 Pallets of Material Type 1 and 20 pallets of Material Type 2 and 3 pallets of Material type 3. How many Bottom Pallets would the order take up?
EDIT: Let's set the limit of bottom pallets for the truck to 24. The max pallets stackable are two, that is to say, you can not stack more than two pallets on top of each other. Note: Material 2 cannot be stacked on top of Material 1.