Optimization problem using MIP

90 Views Asked by At

I am trying to solve the following mixed integer programming problem. However, I have any problems with the approach of the model.

Problem: A company that sells athletic shoes aims to make the following sales:
February: $31$ || March: $46$ || April: $21$ || May: $51$. Also it is known that in the month of January $20$ sports shoes remained unsold. Formulate a mixed integer programming problem (MIP) that minimize total cost. Subject to the following constraints: $(1)$ At the end of all sales, nothing should be left in inventory, $(2)$ the quantity sold in each month must be the one that was ordered to be sold, $(3)$ for each unit of shoe that is not sold in a month, $\$5.00$ must be subtracted from the profit and doubled if it is two months and $(4)$ each shoe has a purchase cost of $\$ 70$, but if you buy more than $34$ shoes, you receive a $19\%$ discount for the other shoes purchased i.e., if you buy $39$ shoes, you will receive a $19\%$ discount for all $5$ shoes of the $39$ shoes purchased.

My approach:

Data:

$\mathbf{i}:$ the set $S_{i}=\{{\rm February}, {\rm March}, {\rm April}, {\rm May}\},$
$\mathbf{n}$: cardinal of $S_{i}$.
$\mathbf{m}$: cardinal of shoes purchased in month $\mathbf{i}$.
$\mathbf{u}_{i}$: quantity to sell for each $\mathbf{i}$.

Variables:

$\mathbf{x_i}$: quantity of shoes purchased in $\mathbf{i}$ without discount.
$\mathbf{y_i}$: quantity of shoes purchased in $\mathbf{i}$ with discount.
$\mathbf{z_{i,i+1}}$: shoes that are left over in month $\mathbf{i}$ and will be sold in month $\mathbf{i + 1}$.
$\displaystyle \mathbf{w_i}=\begin{cases}1, \quad m>34\\ 0, \quad m\leqslant 34 \end{cases}$ binary variable.

Constraints:

  • At the end of all sales, nothing should be left in inventory:

$$z_{{\rm may},{\rm june}}=0$$

  • the quantity sold in each month must be the one that was ordered to be sold: $$\sum_{i}^{n}x_{i}+y_{i}\leqslant u_{i}$$

But I don't know how to formulate the constraints $(3)$ and $(4)$.

Objective function:

The objective function is the cost, but how can I write it using the information above?

Thank you so much!

1

There are 1 best solutions below

2
On

Those look like reasonable variables, but your inventory balance constraints should instead be $$z_{i-1,i} + x_i + y_i = u_i + z_{i,i+1} \quad \text{for all $i$}.$$

You can enforce $y_i>0 \implies w_i =1$ with linear big-M constraint $y_i \le M_i w_i$.

You can enforce $w_i=1 \implies x_i \ge 34$ with linear constraint $x_i \ge 34 w_i$.

The objective function is $$\sum_i \left(70x_i + 70(1-0.19)y_i + 5z_{i,i+1}\right).$$