How do I reduce the Total Sum of a Continuous Variable by Using binary variables in a Binary Optimization Problem

93 Views Asked by At

Columns are in this orders: Container | Box Cylinder | Cylinder weight (g) | Cylinder volume (mL) | Density (g/mL)

Can someone help me to mathematically formulate this problem into a Linear Programing Optimization Problem?

My formulation of the problem is as follows:

$$\sum_i \sum_j \sum_k C_i B_{ji} Cy_{jk} D[Cy_{jk}] = 3.6493g/ml$$

since $$ density = m / V$$

s.t:

$$\sum_i C_i = 35$$ $$C_i \in \{0, 1\}$$ $$\sum_j B_{ji} >= 1$$ $$B_{ji} \in \max{0, C_{ij}}$$ $$\sum Cy_{jk} = 1$$ $$Cy_{jk} \in \max{0, B_{ji}}$$

1

There are 1 best solutions below

2
On

Let binary decision variable $x_{ijk}$ indicate whether container $i$, box $j$, and cylinder $k$ are selected, and let binary decision variable $y_i$ indicate whether container $i$ is selected. A straightforward linear formulation is \begin{align} \sum_i y_i &= 35 \label1\tag1 \\ \sum_{i,j,k} v_{ijk} x_{ijk} &\ge 5163.69 \label2\tag2\\ \sum_{i,j,k} w_{ijk} x_{ijk} &\ge 18.844 \label3\tag3\\ \sum_k x_{ijk} &\le 1 &&\text{for all $i,j$} \label4\tag4\\ x_{ijk} &\le y_i &&\text{for all $i,j,k$} \label5\tag5 \end{align} A stronger formulation replaces \eqref{4} and \eqref{5} with \begin{align} \sum_k x_{ijk} &\le y_i &&\text{for all $i,j$} \label6\tag6 \end{align}