Real World Analytics

Verified

Added on  2023/03/30

|14
|2945
|389
AI Summary
This document discusses real world analytics and explores linear programming models and constraints. It covers topics such as minimizing cost, maximizing profit, and optimizing production. The content provides insights into the application of analytics in solving real-world problems.

Contribute Materials

Your contribution can guide someone’s learning journey. Share your documents today.
Document Page
Analytics 1
REAL WORLD ANALYTICS
by [Name]
course
Professor’s Name
Institution
Location of Institution
Date

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
Analytics 2
Real world Analytics
Question 1
(a) The problem satisfies the assumptions of applying linear programming model. The
assumptions include: (i) Proportionality assumption - the contribution of each product
to the value of the objective function (cost) is proportional to the level of the activity.
(ii) Additive assumption: all the functions can be formulated in a way the each of
them is the sum of the individual contributions of the respective activities (Ostrowski,
Anjos and Vannelli 2011). (iii) Divisibility assumption: the decision variables can be
allowed to have any (real) values, including non-integer values that satisfy the
functional and non-negativity constraints. Since each decision variable represents the
level of some activity, it is being assumed that the activities can be run at fractional
levels (Baky 2010). (iv) Certainty assumption: the value assigned to each parameter
of a linear programming model are possible to be assumed to be a known constant.
(b) Let X represent the number of litres of product A, and Y represent the number of
litres of product B. Then the given values are presented in table 1.
Table 1: The given information
Quantity Product A Product B
Lime per 100 litres 3 8
Mango per 100 litres 6 4
Orange per 100 litres 4 6
Cost per litre 8 7
Number of litres available X Y
Source: Author (2019)
The objective function is to minimize cost (C) given by the equation (1)
C=8 X +7 Y (1)
The customer requires that there must be a minimum of 4.5 litres of orange and a
minimum of 5 litres of mango concentration per 100 litres of beverage. However, a
maximum of 6 litres of lime concertation per 100 litres of beverage. Further, the
Document Page
Analytics 3
customer needs a minimum of 70 litres of the beverage every week. These constraints
are represented in the following inequalities.
6 X +4 Y
100 4.5 Y 4506 X
4 (2)
4 X+ 6 Y
100 5 Y 5004 X
6 (3)
3 X +8 Y
100 6 Y 6003 X
8 (4)
X +Y 70 Y 70X (5)
Further, values of X and Y are not allowed to take negative numbers since less than zero
volume is non-existent. The condition give inequality 6 and 7.
X 0 (6)
Y 0 (7)
Therefore, the linear programming model is to minimise equation (1) constraint to equation
(2) to (7).
(c) Th screenshot below show the graphical solutions of the linear program model
defined in (b). The solution was done in desmons.com online calculator.
The graph shows fours feasible corners points of the solution of the linear program.
The corner points are:
Document Page
Analytics 4
First, (33.333, 62.5) implying X = 33.333, and Y = 62.5 substitute the values in
equation (1) as follows:
C=8 ( 33.333 ) +7 ( 62.5 ) =266.664+ 437.5=704.164
Second, (35, 60) implying X = 35, and Y = 60 substitute the values in equation (1) as
follows:
C=8 ( 35 ) +7 ( 60 ) =280+420=700
Third, (125, 0) implying X = 125, and Y = 0 substitute the values in equation (1) as
follows:
C=8 ( 125 ) +7 ( 0 ) =1,000
Finally, (200, 0) implying X = 200, and Y = 0 substitute the values in equation (1) as
follows:
C=8 ( 200 ) +7 ( 0 )=1,600
The objective was to minimize cost thus the lowest cost is at point value of X = 35,
and Y = 60. Further, check if the constraints are satisfied. All the constraints are
satisfied in the graph. The factory should use 35 litres of product A and 60 litres of
product B.
(d) In order to find the range of cost of product A that would make the least cost require
examining the two solutions that are closely related to each other (Coffrin and Van
Hentenryck 2014). The second step involves finding the cost of A that would make
the second minimum cost the least cost solution. The second lowest cost was obtained
when the value of X = 33.333 = 100
3 , and Y = 62.5. Therefore, the second least cost is
100
3 ( 8 ) +62.5 ( 7 ) = 4225
6 . Let Z be the cost of product A. Thus, to get the range of
values of Z solve the inequality
35 Z +60 ( 7 )> 100
3 Z +62.5(7) (8)

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
Analytics 5
Simplify equation (8) to get
35 Z + 420>100
3 Z + 437.5 multiply this inequality by 3 to remove the fractional part.
105 Z +1260>100 Z+1312.5 subtract 100Z from both side of the inequality and
subtract 1260 from both sides of the inequality to get:
105 Z 100 Z >1312.51260 which simplifies to Z>10.5. Therefore, when the cost of
product A is greater than 10.5 then the optimal solutions obtained in (c) cannot
change but a minimum cost will be obtained. To show this the screenshot below
shows the excel computation with various level of price for product A while product
B remains constant at 7.
From the excel screenshot it can be seen that the minimum cost is at point (35, 60)
when the cost per liter for product A is less than 10.5. However, when the cost per
liter for product A is equal 10.5, then the minimum cost is shared between (35,60) and
(33 and 1/3, 62.5). Moreover, when the cost per liter for product A is greater than
10.5, then the minimum cost is at (33 and 1/3, 62.5).
Document Page
Analytics 6
Question 2
(a) Profit is calculated as the sum of profit from product Spring, Autumn and Winter.
Profit (π ¿, is the total revenue (TR) minus total cost (TC) (Mula et al. 2010).
π=TRTC where; TR = QP, Q is demand, P is sales price. Also, TC = FC + VC
where; FC is the production cost and VC is the purchase price of the materials.
Let π j be the profit from the products, Q j be the demand of the products, P j be the
sales price of the products, Q j be the demand of the products, TR j be the total revenue
of the products, FC j be the production cost of the products. Further, let VCi be the
purchase price of the materials, TC j be the total cost of the products, and xij 0 be
the number of tons of products, where; j {1=Spring , 2= Autumn, 3=Winter } and
i { C=Cotton, W =Wool , S=Silk }.
Now, the constraints are:
Demand of the products
xC 1+ xW 1 + xS 1 4500 (1)
xC 2+ xW 2 4000 (2)
xC 3+ xW 3 +xS 3 4000 (3)
Proportion of cotton, wool, and silk
Spring:
Proportion of cotton;
xC 1
xC 1 + xW 1 + xS 1
0.5 which simplifies to
xC 1xW 1xS 1 0 (4)
Proportion of wool
xW 1
xC 1 + xW 1 + xS 1
0.3 which simplifies to
3 xC1 7 xW 1+3 xS 1 0 (5)
Document Page
Analytics 7
Proportion of silk
xS 1
xC 1 +xW 1 + xS 1
0.2 which simplifies to
xC 1+xW 14 xS 1 0 (6)
Winter:
Proportion of cotton;
xC 2
xC 2 +xW 2 + xS 2
0.6 which simplifies to
2 xC 23 xW 23 xS 2 0 (7)
Proportion of wool
xw 2
xC 2 +xW 2 + xS 2
0. 4 which simplifies to
2 xC 23 xW 2 +2 xS 2 0 (8)
Autumn:
Proportion of cotton;
xC 3
xC 3 +xW 3 + xS 3
0.4 which simplifies to
3 xC3 2 xW 3 2 xS 3 0 (9)
Proportion of wool
xW 3
xC 3 +xW 3 + xS 3
0. 5 which simplifies to
xC 3xW 3 +xS 3 0 (10)
Proportion of silk
xS 3
xC 3 + xW 3 + xS 3
0. 1 which simplifies to
xC 3+ xW 3 9 xS 3 0 (11)

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Analytics 8
The total revenues and costs for Spring and profit from product Spring:
TR1=60 ( xC 1 + xW 1+x S 1 ) simplifying to
TR1=60 xC 1+60 xW 1 +60 xS 1 . Further, FC1=$ 5 and
TC1 =5 ( xC 1 + xW 1 + xS 1 )+30 xC 1 + 45 xW 1 +50 xS 1
equivalent to
TC1 =35 xC 1 +50 xW 1+55 xS 1 .
Profit from Spring is given as
π1= ( 60 xC 1+60 xW 1 +60 xS 1 ) (35 xC 1 +50 xW 1+55 xS 1 ) simplifies to
π1=25 xC 1+10 xW 1 +5 xS 1 (12)
Similarly, the total revenues and costs for Spring and profit from product Autumn:
TR2=55 ( xC 2 + xW 2 ) simplifying to
TR2=55 xC 2+ 55 xW 2 . Further, FC2=$ 4 and
Then,
TC2=4 ( xC 2 + xW 2 ) +30 xC 2 + 45 xW 2 simplifying to
TC2=34 xC 2+ 49 xW 2
Profit from Autumn is given as
π2= ( 55 xC 2+55 xW 2 ) ( 34 xC 2+ 49 xW 2 ) simplifies to
π2=21 xC2 + 4 xW 2 (13)
Finally, the total revenues and costs for Spring and profit from product Winter:
TR3=60 ( xC 3 +xW 3 + xS 3 ) simplifying to
TR3=60 xC 3 +6 0 xW 3+ 6 0 xS 3 . Further, FC3=$ 5. Then,
TC3 =5 ( xC 3 + xW 3 + xS 3 )+35 xC 3+ 45 xW 3 +50 x S 3 simplifying to
TC3 =40 xC 3+ 50 xW 3 +55 xS 3
Profit from Autumn is given as
Document Page
Analytics 9
π3= ( 60 xC 3 +60 xW 3+ 60 xS 3 ) ( 40 xC 3 +50 xW 3+55 xS 3 ) which simplify to
π3=20 xC 3+10 xW 3 +5 xS 3 (14)
The total profit is then given as
π=π1 +π2+ π 3 substitute the values from equation (4), (5) and (6)
π=25 xC 1+10 xW 1 +5 xS 1 +21 xC 2 +4 xW 2 5+20 xC3 +10 xW 3 +5 xS 3 (15)
The linear program model is to maximize equation (15) subject to the constraints in
equation (1) to (11) and xij 0. That is
Maximize:
π=25 xC 1+10 xW 1 +5 xS 1 +21 xC 2 +4 xW 2 +20 xC 3+ 10 xW 3 +5 xS 3
Subject to:
(1) xC 1+ xW 1 + xS 1 4500
(2) xC 2+xW 2 4000
(3) xC 3+ xW 3 + xS 3 4000
(4) xC 1xW 1xS 1 0
(5) 3 xC1 7 xW 1+3 xS 1 0
(6) xC 1+xW 14 xS 1 0
(7) 2 xC 23 xW 23 xS 2 0
(8) 2 xC 23 xW 2 +2 xS 2 0
(9) 3 xC3 2 xW 3 2 xS 3 0
(10) xC 3xW 3 +xS 3 0
(11) xC 3+ xW 3 9 xS 3 0
(12) xij 0
(b) From R - studio the optimal solutions are presented in table 2. The optimal values are
in tons. The codes are attached.
Table 2: The optimal solutions from R-studio
Document Page
Analytics 10
Product Cotton Wool Silk
Spring 2,250 1,350 900
Winter 2,400 1,600 0
Autumn 2,000 2,000 0
Maximum Profit $191,050
Source: author (2019)
Question 3
(a) The game has the zero-sum property (if Helen gains, David loses and the reverse)
implying that any result of a zero-sum situation is Pareto optimal (Zhang et al. 2011;
Vamvoudakis and Lewis 2012). The outcome of the game is found by adding the
points collected in each instance. Also, a payoff matrix can be formulated from this
game (Pham and Zhang 2014; Sallan Lordan and Fernandez 2015). The game
involves only two people hence qualifies to be a two-players-zero-sum game.
(b) The payoff matrix is as follows:
DAVID
(0, 5) (1, 4) (2, 3) (3, 2) (4, 1) (5, 0)
HELEN
(0, 6) 1, -1 0, 0 0, 0 0, 0 0, 0 1, -1
(1, 5) 1, -1 1, -1 0, 0 0, 0 1, -1 1, -1
(2, 4) 0, 0 1, -1 1, -1 1, -1 1, -1 0, 0
(3, 3) 0, 0 0, 0 0, 0 2, -2 0, 0 0, 0
(4, 2) 0, 0 -1, 1 1, -1 -1, 1 1, -1 0, 0
(5, 1) 1, -1 1, -1 0, 0 0, 0 1, -1 1, -1
(6,0) 1, -1 0, 0 0, 0 0, 0 0, 0 0, 0
The bold values in parenthesis represent number of chips in P1 and P2 respectively
(P1, P2). The green values represent total scores by the players such that 1, -1,
implies Helen scored a total of 1 and David scored -1 hence Helen won while David
lost.
(c) A saddle point is a payoff that is simultaneously a row minimum and a column
maximum. In the matrix above there are no saddle points.
(d) Let V be the value of the game where V = v1 v2 + v3 v4 .

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
Analytics 11
Maximize v1 v2 + v3 v4.
Subject to Helens strategies:
x0 +x1+x5 + x6 0 (1)
x1+ x2x 4+ x5 0 (2)
x2+ x4 0 (3)
x2+ 2 x3x4 0 (4)
x1+ x2 +x4 + x5 0 (5)
x0 +x1+x5 0 (6)
x0 +x1+x2 + x3+ x 4+ x5 =1 (7)
Non-negativity
Subject to David strategies:
y0 y1 y5 y6 0 (8)
y1 y2 + y4 y5 0 (9)
y2 y 4 0 (10)
y22 y3 + y4 0 (11)
- y1 y2 y4 y5 0 (12)
y0 y1 y5 0 (13)
y0 + y1 + y2 + y3+ y4 + y5=1 (14) Non-
negativity
(e) The R-codes for the problems is
require(lpSolve) # Load lpSolve
C <- c(1, -1) ## Set the coefficients of the decision variables -> C
# Create constraint matrix B
A <- matrix(c(1, 1, 0,0,1,1,0,
0, 1, 1,0,-1,1,0,
Document Page
Analytics 12
0, 0, 1,0, 1,0,1,
0, 0, 1,2,-1,0,0,
0, 1, 1, 0,1,1,0,
1, 1, 0, 0,0,1,0,
1,1,1,1,1,1,1), ncol = 7, byrow=TRUE)
# Right hand side for the constraints
B <- c(rep(0,7))
# Direction of the constraints
constranints_direction <- c(rep(“>=”,6), “=”)
# Find the optimal solution
optimum <- lp(direction=”max”,
objective.in = C,
const.mat = A,
const.dir = constranints_direction,
const.rhs = B,
all.int = T)
# Print status: 0 = success, 2 = no feasible solution
print(optimum$status)
# Display the optimum values for
best_sol <- optimum$solution
names(best_sol) <- c(“x_0”, “x_1”, “x_2”,”x_3”)
print(best_sol)
# Check the value of objective function at optimal point
print(paste(“Winning: “, optimum$objval, sep=””))
Document Page
Analytics 13
(f) The solution for David is as follows David should play 1 chip in P1 and 4 in P2 or 3
in P1 and 2 in P2.
References
Baky, I.A., 2010. Solving multi-level multi-objective linear programming problems through
fuzzy goal programming approach. Applied Mathematical Modelling, 34(9), pp.2377-
2387.
Coffrin, C. and Van Hentenryck, P., 2014. A linear-programming approximation of AC
power flows. INFORMS Journal on Computing, 26(4), pp.718-734.
Mula, J., Peidro, D., Díaz-Madroñero, M. and Vicens, E., 2010. Mathematical programming
models for supply chain production and transport planning. European Journal of
Operational Research, 204(3), pp.377-390.
Ostrowski, J., Anjos, M.F. and Vannelli, A., 2011. Tight mixed integer linear programming
formulations for the unit commitment problem. IEEE Transactions on Power
Systems, 27(1), pp.39-46.
Pham, T. and Zhang, J., 2014. Two person zero-sum game in weak formulation and path
dependent Bellman--Isaacs equation. SIAM Journal on Control and
Optimization, 52(4), pp.2090-2121.
Sallan, J.M., Lordan, O. and Fernandez, V., 2015. Modeling and solving linear programming
with R. OmniaScience.

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Analytics 14
Vamvoudakis, K.G. and Lewis, F.L., 2012. Online solution of nonlinear two‐player zero‐sum
games using synchronous policy iteration. International Journal of Robust and
Nonlinear Control, 22(13), pp.1460-1483.
Zhang, H., Vittal, V., Heydt, G.T. and Quintero, J., 2011. A mixed-integer linear
programming approach for multi-stage security-constrained transmission expansion
planning. IEEE Transactions on Power Systems, 27(2), pp.1125-1133.
1 out of 14
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]

Your All-in-One AI-Powered Toolkit for Academic Success.

Available 24*7 on WhatsApp / Email

[object Object]