Calculate TI HI given carton dimensions and pallet area

Im trying to figure out how many cartons can fit on a pallet. Normally quite simple if you have the physical cartons but I do not, they are still on a container ship.

The cartons are various sizes but lucky for me there is only 1 carton size/type per pallet.

One thing to note is that depending on the size of the carton, sometimes there is "air space"...ie the cartons do not cover the pallet evenly. eg Long cartons will stack so there is a hole in the middle like a donut. But small square cartons will stack nicely like a rubic cube. So the formula needs to be able to take that into account.

Pallet area is roughly 120cm * 120cm The height that cartons are allowed to be stacked safely is 160cm

So if i know the dimensions of the cartons and the pallet dimensions, what is the formula i need to work out the TI HI.
TI = cartons per layer on a pallet
HI = number of layers

Apologies if I did not tag this question properly

-

If you stack the cartons with the same dimension vertical, then $HI=\lfloor \frac {160}h \rfloor$, where $h$ is the height of the carton in cm. Similarly, if you stack the cartons in the same orientation, then the number in one dimension is $L=\lfloor \frac {120}l \rfloor$ and in the other $W=\lfloor \frac {120}w \rfloor$ where $l$ and $w$ are the length and width in cm. There may be better arrangements depending on the shape of your cartons. You probably do want the same dimension vertical, but the horizontal arrangement can have improvements. Often they are obvious by cutting out rectangles of paper and playing a bit.
The text passage contains a mathematical question about calculating the number of cartons that can fit on a pallet, given the carton dimensions and pallet area. An answer to this question is provided, including formulas for calculating the number of cartons per layer (TI) and the number of layers (HI).
single_question_with_answer
Given a text passage, determine:
    1. If it contains a mathematical question (including word problems or calculations)
    2. If an answer to that mathematical question is provided in the text

First, describe the content structure you found in 1-2 sentences.

Then provide your analysis in the following format:
TYPE: <one of the following values>
- NO_QUESTION
- SINGLE_QUESTION
- SINGLE_QUESTION_WITH_ANSWER
- MULTIPLE_QUESTIONS
- MULTIPLE_QUESTIONS_WITH_ANSWERS
system
Calculate TI HI given carton dimensions and pallet area

Im trying to figure out how many cartons can fit on a pallet. Normally quite simple if you have the physical cartons but I do not, they are still on a container ship.

The cartons are various sizes but lucky for me there is only 1 carton size/type per pallet.

One thing to note is that depending on the size of the carton, sometimes there is "air space"...ie the cartons do not cover the pallet evenly. eg Long cartons will stack so there is a hole in the middle like a donut. But small square cartons will stack nicely like a rubic cube. So the formula needs to be able to take that into account.

Pallet area is roughly 120cm * 120cm The height that cartons are allowed to be stacked safely is 160cm

So if i know the dimensions of the cartons and the pallet dimensions, what is the formula i need to work out the TI HI.
TI = cartons per layer on a pallet
HI = number of layers

Apologies if I did not tag this question properly

-

If you stack the cartons with the same dimension vertical, then $HI=\lfloor \frac {160}h \rfloor$, where $h$ is the height of the carton in cm. Similarly, if you stack the cartons in the same orientation, then the number in one dimension is $L=\lfloor \frac {120}l \rfloor$ and in the other $W=\lfloor \frac {120}w \rfloor$ where $l$ and $w$ are the length and width in cm. There may be better arrangements depending on the shape of your cartons. You probably do want the same dimension vertical, but the horizontal arrangement can have improvements. Often they are obvious by cutting out rectangles of paper and playing a bit.
user
The text passage contains a mathematical question about calculating the number of cartons that can fit on a pallet, given the carton dimensions and pallet area. An answer to this question is provided, including formulas for calculating the number of cartons per layer (TI) and the number of layers (HI).

TYPE: SINGLE_QUESTION_WITH_ANSWER