# A LP model for production of two kinds of microphone

Here is a LP problem:

A company produces two kinds of microphones: large and small. The expected demand for the first 3 months of the year is shown below:

The first month : 400 small microphones, 200 large microphones The second month : 500 small microphones, 320 large microphones The third month : 550 small microphones, 400 large microphones

At the regular time of working, 1200 large microphones can be produced in a month and at the overtime, 240 large microphones can be produced.

The production of a large microphone, can be replaced by the production of 2 small microphones. So, if the company produces 199 large micrphones, it should 402 small microphones to meet the demand.

The cost of production of each kind of microphones at the regular time and overtime is shown below:

Small microphone : 60 and 70 units of money (per unit of mic) at the regular time and overtime, respectively.
Large microphone : 80 and 95 units of money (per unit of mic) at the regular time and overtime, respectively.

The cost of inventory is 3 and 5 units of money ( per unit of mic ) for small and large microphones, respectively.

The objective is to meet the demand with the lowest cost.

Provide a Linear-Programming Model for this problem.

Note : My problem is the part that is bolded. I can't find suitable decision variables because I haven't seen any LP problem like that before. ( The replacement of demands is new for me! )

I would appreciate your answers or even hints!

## 1 Answer

Hint: Divide the production of large microphones into two cases.

Let $s^r_i$ and $l^r_i$ be the production of small and large microphones during regular time in the $i$-th month ($i \in \{1,2,3\}$) respectively, and $s^o_i$ and $l^o_i$ be the production of small and large microphones during overtime in the $i$-th month ($i \in \{1,2,3\}$) respectively.

Let start with the first month. Then the other constraints handling demand replacement follows in a similar way.

Case 1: total production of large microphones doesn't meet the original demand 200. (i.e. $l^r_1 + l^o_1 < 200$)

Then $2(200-(l^r_1 + l^o_1))$ extra small microphones need to be produced, so $s^r_1+s^o_1 \ge 400 + 2(200 - l^r_1 - l^o_1)$.

Case 2: total production of large microphones meets the original demand 200. (i.e. $l^r_1 + l^o_1 \ge 200$)

In the above constraint for $s^r_1+s^o_1$, $200 - l^r_1 - l^o_1$ is negative and unwanted this case, so we have $s^r_1+s^o_1 \ge 400$.

A single inequality generalising these two different cases would be $s^r_1+s^o_1 \ge 400 + 2\max\{0,200-l^r_1 - l^o_1\}$, which can be split into two linear inequalities

\begin{align} s^r_1+s^o_1 &\ge 400 \\ s^r_1+s^o_1 &\ge 800 - 2l^r_1 - 2l^o_1. \end{align}

We can do something similar for the 2nd and 3rd months.

• do i still need to write $l_1^r+l_1^o \ge 200$? or the constraints you wrote are enough? – Arman Malekzadeh Feb 18 '17 at 17:27
• Also, you didn't mention the decision variables for inventory! – Arman Malekzadeh Feb 18 '17 at 17:31
• @ArmanMalekzade 1. As long as the replacement is allowed, you can't omit the first case $l^r_1 + l^o_1 < 200$. 2. How is the cost of inventory per unit of mic calculated? Per month? Per week? – GNUSupporter 8964民主女神 地下教會 Feb 18 '17 at 21:23
• Since you've said "My problem is the part that is bolded", and the bolded part concerns the replacement of demand, and you "appreciate ... hints", I post something like $s_1 \ge 400 + 2 \max\{0,200-l_1\}$ to capture this tricky part. In fact, if I understand the meaning of "inventory cost" correctly (I think it means storage costs), you may split $l^o_1$ into $l^o_{1,i}, i = 1,2,3$ meaning the number of large microphones produced in the first month during overtime delivered in the $i$-th month. You may do something similar to other variables. – GNUSupporter 8964民主女神 地下教會 Feb 18 '17 at 21:35
• And you'll end up with a system with $4 \times 6 = 24$ decision variables $x^t_{i,j}$, where $x \in \{l,s\}$, $t \in \{r,o\}$, $1 \le i \le j \le 3$. – GNUSupporter 8964民主女神 地下教會 Feb 18 '17 at 21:36