A food factory is making a beverage for a customer from mixing two different existing products A and B. The compositions of A and B and prices ($/L) are given as follows,
Juice Blend
Lime (L/100L)
Orange (L/100L)
Mango (L/100L)
Cost ($/L)
A
2
6
4
5
B
7
4
8
15
The customer requires that there must be at least 5 Litres (L) Orange and at least 5 Litres of Mango concentrate per 100 Litres of the beverage respectively, but no more than 6 Litres of Lime concentrate per 100 Litres of beverage. The customer needs at least 150 Litres of the beverage per week.
(a)
This problem requires a best outcome (minimising cost) where the requirements of the problem (objective and constraint functions) are represented by linear relationships of the decision variables.
(b)
Decision variables:
Let \(x_1\) be the number of litres of product A used per week and \(x_2\) be the number of litres of product B used each week.
Objective function:
Minimise the cost of production. Product A costs $5/L and product B $15/L.
\[
\text{Minimise Cost } = 5x_1 +15x_2
\]
Constraints:
The amount of lime must be \(\leq 0.06\)L/L. Product A provides 0.02 L of lime per L, and product B provides 0.07 L of lime per L.
\[
0.02x_1+0.07x_2 \leq 0.06(x_1+x_2)
\]
This can be rearranged to
\[
-0.04x_1+0.01x_2 \leq 0
\]
This can be simplified to
\[
-4x_1+x_2 \leq 0
\]
The amount of orange must be \(\geq 0.05\)L/L. Product A provides 0.06 L of orange per L, and product B provides 0.04 L of orange per L.
\[
0.06x_1+0.04x_2 \geq 0.05(x_1+x_2)
\]
This can be rearranged to
\[
0.01x_1-0.01x_2 \geq 0
\]
This can be simplified to
\[
x_1-x_2 \geq 0
\]
The amount of mango must be \(\geq 0.05\)L/L. Product A provides 0.04 L of mango per L, and product B provides 0.08 L of mango per L.
\[
0.04x_1+0.08x_2 \geq 0.05(x_1+x_2)
\]
This can be rearranged to
\[
-0.01x_1+0.03x_2 \geq 0
\]
This can be simplified to
\[
-\frac{1}{3}x_1+x_2 \geq 0
\]
The total volume of weekly beverage required is \(\geq 150\) L.
The optimum values of the decision variables to minimise the cost of production found using the graphical method are 112.5L of product A and 37.5L of product B.
Figure 1: Graphical solution for the linear programming problem, showing the feasible region and the optimum point A (112.5, 37.5).
We need to find the range of values for \(c_1\) where the current optimum (point A) would still be optimal. The slope of the volume and mango constraints bound the solution at point A. The volume constraint slope is \(=-1\), and the mango constraint slope is \(=\frac{1}{3}\)
Considering the volume constraint slope, for the optimum to move from point A to point B, the slope of the iso-cost line needs to be greater than the slope of the volume constraint. Therefore,
Considering the mango constraint slope, for the optimum point to move from point A, the slope of the iso-cost line needs to be less than the slope of the mango constraint.
However, we cannot have a negative cost, so \(c_1\) would be limited to 0.
Solution sensitivity to cost ($) of A
Therefore the cost ($) of A can be within the following range without changing the optimum solution.
$0 < 15 $
Q2
A factory makes three products called Spring, Autumn and Winter from three materials containing Cotton, Wool and Silk.
Sales price and production cost per ton of product. Purchase cost per ton of material.
Sales price
Production cost
Purchase price
Sprint
$60
$5
Cotton
$30
Autum
$55
$3
Wool
$45
Winter
$60
$5
Silk
$50
Maximal demand in tons for each product and the minimum cotton and wool proportions in each product.
Demand
min Cotton proporation
min Wool proportion
Sprint
3500
55%
30%
Autum
3300
45%
40%
Winter
4200
30%
50%
(a)
Decision variables:
Let \(x_{ij}\) be the number of tons of products \(j \text{ for } j \in \{1= \text{Spring}, 2 = \text{Autum}, 3= \text{Winter}\}\) to be produced from materials \(i \text{ for } i \in \{1= \text{Cotton}, 2 = \text{Wool}, 3= \text{Silk}\}\)
Number of tons of each type of material used:
Cotton: \(x_{11}+x_{12}+x_{13}\)
Wool: \(x_{21}+x_{22}+x_{23}\)
Silk: \(x_{31}+x_{32}+x_{33}\)
Number of tons of each type of product produced:
Spring: \(x_{11}+x_{21}+x_{31}\)
Autumn: \(x_{12}+x_{22}+x_{32}\)
Winter: \(x_{13}+x_{23}+x_{33}\)
Revenue ($) from sales per ton: \[
60(x_{11}+x_{21}+x_{31})+55(x_{12}+x_{22}+x_{32})+60(x_{13}+x_{23}+x_{33})
\]
Production costs ($) per ton: \[
5(x_{11}+x_{21}+x_{31})+3(x_{12}+x_{22}+x_{32})+5(x_{13}+x_{23}+x_{33})
\]
Costs ($) of purchasing materials per ton: \[
30(x_{11}+x_{12}+x_{13})+45(x_{21}+x_{22}+x_{23})+50(x_{31}+x_{32}+x_{33})
\]
Objective function:
\[
\begin{split}
\text{Profit per ton }&=\text{revenue per ton - production costs per ton- purchasing cost per ton} \\
\text{max } z &= 60x_{11}+60x_{21}+60x_{31}+55x_{12}+55x_{22}+55x_{32}+60x_{13}+60x_{23}+60x_{33}\\
&-5x_{11}-5x_{21}-5x_{31}-3x_{12}-3x_{22}-3x_{32}-5x_{13}-5x_{23}-5x_{33} \\
&-30x_{11}-30x_{12}-30x_{13}-45x_{21}-45x_{22}-45x_{23}-50x_{31}-50x_{32}-50x_{33} \\
&= 25x_{11}+22x_{12}+25x_{13}\\
& +10x_{21}+7x_{22}+10x_{23}\\
& +5x_{31}+2x_{32}+5x_{33} \\
\end{split}
\]
Constraints:
Demand
Spring: \(x_{11}+x_{21}+x_{31}\leq3500\)
Autumn: \(x_{12}+x_{22}+x_{32}\leq3300\)
Winter: \(x_{13}+x_{23}+x_{33}\leq4200\)
Cotton proportion
With respect to cotton, the constraints indicate what cotton level should be in each product. For each product, the percentage of cotton can be calculated as the proportion of cotton in each product divided by the total amount of the product. For the spring product, since the cotton level must be at least 55%, we have the following constraint:
With respect to wool, the constraints indicate what wool level should be in each product. For each product, the percentage of wool can be calculated as the proportion of wool in each product divided by the total amount of the product. For the spring product, since the wool level must be at least 30%, we have the following constraint:
The linear programming model described in part (a) was formulated in R and solved using R Studio. The optimal profit is $198,050, and the optimal values of the decision variables are
Optimal values of each material used in each product (tons) to maximise the profit.
Material
Spring
Autumn
Winter
Cotton
2450
1980
2100
Wool
1050
1320
2100
Silk
0
0
0
## Assessment 3 Question 2## Blending fibres# The variable mapping index table is in the Excel(Blending Fibres) library(lpSolveAPI)# Create LP modellprec<-make.lp(9, 9)# 9 variables and 9 constraintslp.control(lprec, sense="maximize")# maximize profit
Consider the following parlor game to be played between two players. Each player begins with three chips: one red, one white, and one blue. Each chip can be used only once. To begin, each player selects one of her chips and places it on the table, concealed. Both players then uncover the chips and determine the payoff to the winning player. In particular, if both players play the same kind of chip, it is a draw; otherwise, the following table indicates the winner and how much she receives from the other player. Next, each player selects one of her two remaining chips and repeats the procedure, resulting in another payoff according to the following table. Finally, each player plays her one remaining chip, resulting in the third and final payoff.
Winning Chip Payoff
($)
Red beats white
200
White beats blue
150
Blue beats red
50
Matching colors
0
(a)
The strategy set for the game has six values {BRW, BWR, RBW, RWB, WBR, WRB}, where B - blue, R -red and W- white. Both players have the same set of strategies.
Development of payoff matrix, showing the payoff values for each game round.
Player 1
BRW
BWR
RBW
RWB
WBR
WRB
BRW
0
0
0
400
-400
0
BWR
0
0
400
0
0
-400
RBW
0
-400
0
0
0
400
RWB
-400
0
0
0
400
0
WBR
400
0
0
-400
0
0
WRB
0
400
-400
0
0
0
Final payoff matrix for player 1 and security level for both players.
Player 1
BRW
BWR
RBW
RWB
WBR
WRB
\(s_i\)
BRW
0
0
0
400
-400
0
-400
BWR
0
0
400
0
0
-400
-400
RBW
0
-400
0
0
0
400
-400
RWB
-400
0
0
0
400
0
-400
WBR
400
0
0
-400
0
0
-400
WRB
0
400
-400
0
0
0
-400
\(t_j\)
400
400
400
400
400
400
The lower value for the game (\(L\)) is -400, and the upper value for the game (\(U\)) is 400. Since \(L <U\), there is no saddle point and players must resort to mixed strategies.
(b)
LP model for player 1
Let \(x_i\) be the probability of choosing strategy \(i\). Let \(v\) be the value of the game.
Maximise \(z=v\)
Subject to:
\[
\begin{align*}
v + 400x_4 - 400x_5 &\leq 0 \text{ (payoff, player 2's strategy 1)}\\
v + 400x_3 - 400x_6 &\leq 0 \text{ (payoff, player 2's strategy 2)}\\
v - 400x_2 + 400x_6 &\leq 0 \text{ (payoff, player 2's strategy 3)}\\
v - 400x_1 + 400x_5 &\leq 0 \text{ (payoff, player 2's strategy 4)}\\
v + 400x_1 - 400x_4 &\leq 0 \text{ (payoff, player 2's strategy 5)}\\
v + 400x_2 - 400x_3 &\leq 0 \text{ (payoff, player 2's strategy 6)}\\
x_1+x_2+x_3+x_4+x_5+x_6&=1 \text{ (sum of probabilities)}\\
x_i&\geq 0 \text{ for } i\in\{1,2,3,4,5,6\} \text{ (Non-negative)} \\
v &\text{ u.r.s}
\end{align*}
\]
LP model for player 2
Let \(y_j\) be the probability of choosing strategy \(j\). Let \(v\) be the value of the game.
Minimise \(z=v\)
Subject to:
\[
\begin{align*}
v - 400y_4 + 400y_5 &\geq 0 \text{ (payoff, player 1's strategy 1)}\\
v - 400y_3 + 400y_6 &\geq 0 \text{ (payoff, player 1's strategy 2)}\\
v + 400y_2 - 400y_6 &\geq 0 \text{ (payoff, player 1's strategy 3)}\\
v + 400y_1 - 400y_5 &\geq 0 \text{ (payoff, player 1's strategy 4)}\\
v - 400y_1 + 400y_4 &\geq 0 \text{ (payoff, player 1's strategy 5)}\\
v - 400y_2 + 400y_3 &\geq 0 \text{ (payoff, player 1's strategy 6)}\\
y_1+y_2+y_3+y_4+y_5+y_6&=1 \text{ (sum of probabilities)}\\
y_j&\geq 0 \text{ for } j\in\{1,2,3,4,5,6\} \text{ (Non-negative)} \\
v &\text{ u.r.s}
\end{align*}
\]
(c)
## Player I's gamelibrary(lpSolveAPI)# Create LP modellpp1<-make.lp(7, 7)lp.control(lpp1, sense="maximize")
That is, Player 1 should play the strategies BRW, RWB and WBR each \(\frac{1}{3}\) of the time. Player 2 should play the strategies BRW, RWB and WBR each \(\frac{1}{3}\) of the time, and the value of the game is $0.