Linear Integer Programing: fill the package with products $A, B, C, D$

53 Views Asked by At

A linear integer programming problem ask to consider the next restriction: we want to fill as much as possible a package that has a capacity of $1m^3$ and we have to choose between a variety of products $A, B, C, D$ with the following dimensions:

Product Dimensions (cm)
A $8\times 2.5 \times 0.5$
B $7\times 2 \times 0.5$
C $3\times 2 \times 0.5$
D $3\times 3 \times 0.5$

My try: $$8x_1+7x_2+3x_3+3x_4\leq100$$ $$2.5x_1+2x_2+2x_3+3x_4\leq100$$ $$0.5(x_1+x_2+x_3+x_4)\leq100$$ With $x_1,...,x_4\in\mathbb{Z}^+$.

But I think I'm not considering combinations between different dimensions. Any suggestions would be great!

2

There are 2 best solutions below

0
On

The idea you are attempting is correct for one dimension but not for three dimensions. I suggest considering a much smaller problem in two dimensions to gain some insight: two products $A$ (dimensions $2 \times 1$) and $B$ (dimensions $1 \times 1$) in a $2 \times 2$ package.

0
On

I'll assume "package" means "box", so the alignment matters.

Using only boxes of type $B$ and $C$, there's an obvious way to completely fill the $1m^3$ box.

The idea is to adjoin one box of type $B$ and one box of type $C$ to effectively create a box of type, say $E$, with dimensions (in cm) $$\textbf{l}{\,\times\,}\textbf{w}{\,\times\,}\textbf{h}=10{\,\times\,}2{\,\times\,}0.5$$ Then the bottom level (height $0.5$cm) of the $1m^3$ box can be completely filled with $500$ boxes of type $E$, arranged $10$ lengthwise and $50$ widthwise.

Then replicating the bottom level $200$ times completely fills the $1m^3$ box.