Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Module 4 - Sensitivity Excel Solver - OFC Changes

Download as pdf or txt
Download as pdf or txt
You are on page 1of 25

Linear Programming Applications, Solution

and Sensitivity Analysis on OFC changes using


Excel Solver
CA5103-Management Science
Learning Objectives:
At the end of the discussion the students should be able to:
i. perform sensitivity analysis with excel solver and;
ii. interpret excel solver sensitivity report.

http://people.brunel.ac.uk/~mastjjb/jeb/or/lpsens_solver.html
Solving simple Linear Programming using excel and excel solver
by generating the following.

❑Optimum solution
❑Sensitivity Analysis
Spreadsheet Model using
Excel Solver
The figure on the right is the excel
spreadsheet of the information
provided by the LP problem.
These are groups by the
following categories:
• Production plan
• Decision variables
• Available materials and the Used
materials.
LHS = left-hand side Anderson, D. S. (2018). An Introduction to Management Science:
RHS = right-hand side Quantitative Approaches to Decision Making (14th edition).
Singapore: Cengage Learning Asia Pte Ltd. (pp. 149-151)
Excel Solver
Sensitivity Report
Setting up and running the Spreadsheet Model
Activate the Solver Add-in in Excel. [File/options/Add-ins/click Add-ins/Go].
1. On the spreadsheet, enter the problem data in the top part of the
spreadsheet.
2. Specify cell locations for the decision variables.
3. Select a cell and enter a formula for computing he value of the objective
function.
4. Select a cell and enter a formula for computing the LHS of each
constraint.
5. Select a cell and enter a formula for computing the RHS of each
constraint.
Anderson, D. S. (2018). An Introduction to Management Science:Quantitative Approaches to Decision Making (14 th
edition). Singapore: Cengage Learning Asia Pte Ltd. )
Basic Steps in Using Excel Solver
1. Select the DATA tab on the Ribbon
2. Select Solver from the Analysis Group
3. When the Solver Parameters dialog box appears:
Enter the cell reference of the Objective Function into the Set Objective box
Select the To: Max/Min option
Enter the cell reference of the decision variables into By Changing Variable Cells box
4. Select Add
When the Add Constraint dialog box appears:
Enter cell references are for the left hand side coefficients.
Select the corresponding symbol (<=, >=, =).
Enter the cell references of the rhs. Click OK
5. When the solver dialog box reappears: Select the checkbox for Make Unconstrained Variables Nonnegative.
6. In Select a Solving Method dropdown menu select Simplex LP.
7. Click Solve.
8. When the Solver Results dialog box appears: select Keep Solver Solution. Click OK

Anderson, D. S. (2018). An Introduction to Management Science:Quantitative Approaches to Decision Making (14 th edition). Singapore: Cengage Learning Asia Pte Ltd.
Linear Programming Problem Spreadsheet Model

To find the total profit (OF) and the used resources


Objective Function:
E8 = sumproduct(B8:C8, B9:C9)
[= sumproduct(production plan cell,OF coefficient)]

Constraints:
D12 = sumproduct(B8:C8, B12:C12)
[= sumproduct(production plan cell,constraint coefficient)]
Setting up and running the Spreadsheet Model
1. Activate the Solver Add-in in Excel. [File/options/Add-ins/click Add-ins/Go].
2. On the spreadsheet, enter the ‘variables’ row as ‘changing cells’ named as Production Plan (number of x1,
x2,..xn produced).
3. Enter the ‘Objective Function’ cell as ‘Target Cell’ using the =sumproduct formula to maximize or minimize
along the Production Plan row.
4. Enter the OF array along the Unit Profit/Cost per variable.
5. Enter the constraints array on the succeeding rows per variable, the used resources column using the
formula =sumproduct, and the available resources array(constants/RHS).
x1 = prod 1
x2 = prod 2

Prod 1 Prod 2 Total Profit:


Production Plan(number of x1&x2 produced) x1 x2 =sumproduct(x1:x2,c1:c2)
Unit Profit (per product) c1 c2

Prod 1 Prod 2 used resources available resources


Constraint 1 a11 a12 =sumproduct(x1:x2,a11:a12) b1
Constraint 2 a21 a22 =sumproduct(x1:x2,a21:a22) b2
Constraint 3 a31 a32 =sumproduct(x1:x2,a31:a32) b3
x1 = prod 1
x2 = prod 2

Prod 1 Prod 2 Total Profit:


Production Plan(number of x1&x2 produced) x1 x2 =sumproduct(x1:x2,c1:c2)
Unit Profit (per product) c1 c2

Prod 1 Prod 2 used resources available resources


Constraint 1 a11 a12 =sumproduct(x1:x2,a11:a12) b1
Constraint 2 a21 a22 =sumproduct(x1:x2,a21:a22) b2
Constraint 3 a31 a32 =sumproduct(x1:x2,a31:a32) b3

Output after encoding the =sumproduct formula

x1 = prod 1
x2 = prod 2

Prod 1 Prod 2 Total Profit:


Production Plan(number of x1&x2 produced) x1 x2 0
Unit Profit (per product) c1 c2

Prod 1 Prod 2 used resources available resources


Constraint 1 a11 a12 0 b1
Constraint 2 a21 a22 0 b2
Constraint 3 a31 a32 0 b3
Basic Steps in Using Excel Solver
1. After entering the =sumproduct formula on the spreadsheet, click on Solver on the DATA Tab.
2. Enter the target cell on the Set Objective to find the total profit/cost.
3. Select Max/Min.
4. Enter the cell reference of the variables (production plan) on By Changing Variable Cells to find
the number of x1, x2, …xn that give the optimum solution.
5. Enter the cell reference of the used resources for each constraint, select the corresponding
symbol (≥, ≤, =), and the cell reference of the corresponding available reference by clicking the
add button.
6. Select ‘Simplex LP’ for a Linear Programming model.
7. Click Solve.
8. Click keep solver solution.
9. Click Sensitivity if sensitivity analysis is required.
10. Click OK.
11. Optimum solution, the Total Profit/Cost and the used resources will be reflected on the
spreadsheet model.
Basic steps in Finding the Optimum Solution and Graph of LP Problems using Excel
1. On the spreadsheet, find the intercepts of each constraint to show graph of the LP model.
2. Identify the feasible region using the ‘test value point’. Label or Shade the region if desired.
3. Solve for the boundaries (intersection of each pair of lines) of the feasible region using the formula:
=mmult(minverse(constraint array),constant array)
example:
i. Highlight the cell next to the variables corresponding to each ordered pair (x1, x2);
ii. Enter the formula =mmult(minverse(B71: C72),E71:E72);
iii. hold ctrl + shift and then enter.
4. Identify the corner points of the feasible region, enter them (x1, x2, … xn) in separate column cells. Compute the OF value that corresponds to
each corner point in column next to each pair of the corner points using the formula:
=mmult(corner points array,transpose(OF coefficients array))
example:
i. Highlight the column next to the corner points;
ii. Enter the formula =mmult(E71: F73,transpose(B50:C50)
iii. hold ctrl + shift and then enter.
5. Identify the point/s that give/s the optimum solution.
6. Make the decision.
Illustration 1. Range of Optimality for c1 and c2 using excel Solver:
Therefore, the range of optimality for the given LP model is: Max 5x1 + 7x2
s.t. x1 < 6
x2 2x1 + 3x2 < 19
x1 + x2 < 8
8 Coincides with x1, x2 > 0
x1 + x2 < 8
constraint line
7
This indicates that, from the original OF coefficients, c1 = 5 and c2 =7: 6 Objective function
line for 5x1 + 7x2
The value of c1 = 5 can be decreased to as low as 4.7 and could be 5

increased to as high as 7, keeping the OF line within the graphs of the


5 Optimal Solution:
x1 = 5, x2 = 3
two binding constraints. 4
OF value = 46

The value of c2 = 7 can be decreased to as low as 5 and could be


Coincides with
Feasible
increased to as high as 7.5, keeping the OF line within the graphs of the 3 Region 2x1 + 3x2 < 19
two binding constraints. 4 constraint line
2
3
The two broken lines correspond to the graphs of the two binding 1
constraints. 1 2
x1
1 2 3 4 5 6 7 8 9 10
The figure on the left presents
the spreadsheet output of the
LP model with an optimum
solution of (5, 3) and OF value =
46 whose result is consistent
with the graphical solution
shown in slide 13.
The figure on the left presents
the excel solver dialogue box for
the given LP model in slide 13.
The figure on the left presents the sensitivity report generated by the
excel solver for the problem in slide 13.
The column D “Final value” provides the optimum solution to the

problem (5, 3)
The column E shows the reduced cost (see p. 107 from Anderson et.al.

for the explanation)


• The column F provides the original OFC.
The columns G and H - row 9 provide the allowable increase and

allowable decrease, respectively for the c1.


• 2 allowable increase indicates that the value of c1 = 5 could be
increased up to 7, thus the upper limit for this profit
contribution is 7.
• 0.3 allowable decrease indicates that the value of c1 = 5 could
be decreased to as low as 4.7, thus the lower limit for this
profit contribution is 4.7.
The columns G and H - row 10 provide the allowable increase and

allowable decrease, respectively for the c2.


• 0.5 allowable increase indicates that the value of c2 = 7 could
be increased up to 7.5, thus the upper limit for this profit
contribution is 7.5.
• 2 allowable decrease indicates that the value of c2 = 7 could be
decreased to as low as 5, thus the lower limit for this profit
contribution is 5.
Illustration 2: PAR Inc., problem using excel solver: (see pp. 149 to 151 of Anderson, D.R., et al.)

Let S = Standard bag 7/10 S + D ≤ 630


S + 2/3D ≤ 708 Finishing
Cutting & Dyeing
D = Deluxe bag
LP Model for PAR Inc. Problem
Max 10S + 9D
s.t.
7/10 S + D ≤ 630 Cutting & Dyeing
½ S + 5/6 D ≤ 600 Sewing
Inspection and
S + 2/3D ≤ 708 Finishing Packaging
1/10S + ¼D ≤ 135 Inspection and packaging (non-binding)

NNC: S, D ≥ 0

Interpretation:
The range of optimality indicates that the profit contribution per standard bag c1 = 10, could be
decreased to as low as 6.3 and could be increased to as high as 13.5, while the profit contribution per
deluxe bag c2 = 9, could be decreased to as low as 6.67 and could be increased to as high as 14.29.
Introduction to Management Science : Quantitative Approaches to Decision Making By Anderson, D.R., et al.,
Illustration 3: Sensitivity Analysis for the Upholstery Problem Using excel Solver
Range of Optimality for the sofa and couch:
This problem is left for the student exercise on finding range of optimality using excel
solver and see if the result will be consistent with the graphical solution method.
Objective Function: Max Z = 1200x +1600y
Subject to:
3x +2y ≤ 18 microfiber constraint
2x +4y ≤ 20 leather constraint
x ≤5 vinyl constraint
NNC: x , y ≥ 0

The profit contribution for the sofa could be decreased to as low as


800 and could be increased up to 2400, while the couch could be
decreased to as low as 800 and could be increased up to 2400.
Exercise:
Use the excel solver to find the range of optimality for
the Bank Portfolio Problem
Mendoza bank has assets in the form of the loans and negotiable
securities which brings return of 15% and 20%, respectively. The bank has
a total of P50 million provided by demand deposits accounts and time
deposit accounts to allocate between loans and securities. It is the policy
of the bank to maintain a securities balance equal to or greater than 20%
of the total assets to meet anticipated demand, and at least P16 million
must be available for loans. Under the given conditions, how should the
bank allocate funds between loans and securities to maximize total
investment income? Formulate LP model and solve the maximum return
of the investments.
Let x = amount (in million pesos) to be allocated for loans
y = amount (in million pesos) to be allocated for negotiable securities to
maximize return on investment
Table:
Available
x y Resources/Policy
Total Budget for
1 1 50
x and y
Policy on Securities 1 20%(x + y)

Budget for Loans 1 16


Return of
15% 20%
Investment
Available
x y
Resources/Policy
Total Budget for x and
1 1 50
y
Policy on Securities 1 20%(x + y)
Budget for
1 16
Loans

Return of Investment 15% 20%


(1) x + y = 50
(3) x = 16
Use the excel solver to find:
1.The optimum solution.
2.The range of optimality.

(2) -0.20x + 0.80y = 0


Group Assignment: Use the excel solver to answer the problem indicated
below:
References:

Anderson, D. R., Sweeney, DJ., Williams, T.A., Camm, J.D., Cochran, J.J., &
Ohlmann, J.W. (2019). An Introduction to Management Science: Quantitative
Approaches to Decision Making. Singapore: Cengage Learning Asia Pte Ltd.

http://people.brunel.ac.uk/~mastjjb/jeb/or/lpsens_solver.html

You might also like