1
$\begingroup$

I have a rectangular box with given dimensions $l, w, h$ with available volume $v = lwh$. If I can only pack up to 80% of $v$, how would I go about determining the new, smaller dimensions such that the new $v = lwh$ is 80% of original $v$ where the new dimensions should be reduced proportionally to retain the original box shape?

I'm trying to write some C# code to do some bin packing testing, but this algorithm doesn't consider a box volume threshold, it only packs according to dimensions. Thanks!

$\endgroup$

2 Answers 2

0
$\begingroup$

You already know that $v = lwh$, so you want to determine new dimensions for which $v' = 0.8v$. So you could reduce any one of the three dimensions, such as $w' = 0.8w$, to do that. If you want to shrink the box but keep the proportions, just distribute the factor:

$$v' = 0.8v = 0.8lwh = \sqrt[3]{0.8}l\sqrt[3]{0.8}w\sqrt[3]{0.8}h$$ $$l' = \sqrt[3]{0.8}l$$ $$w' = \sqrt[3]{0.8}w$$ $$h' = \sqrt[3]{0.8}h$$

In other words, just shrink each dimension by $\sqrt[3]{80\%}$ or multiply each dimension by $\approx 0.9283$.

$\endgroup$
0
$\begingroup$

Suppose the new length $l'=kl$, new width $w'=kw$ and new height $h'=kh$ where $k$ is the ratio of new dimensions to old dimensions. We have $l'w'h'=k^3lwh=0.8lwh$, thus $k=0.8^{1/3}$.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .