You are on page 1of 9

Chapter-3: Sensitivity Analysis Using the Excel Solver BBC – III

SENSITIVITY ANALYSIS USING THE EXCEL SOLVER

INTRODUCTION
The Excel Solver, also, known as linear programming solver is a sensitivity analysis add-in tool
kit part of the Excel’s What-if Analysis Tools that uses mathematical modelling and simulation
techniques used for solving linear programming (optimization) problems, or optimization-
modeling problems.
WHAT IS LINEAR PROGRAMMING (LP)?
Optimization is the way of life, this is because, we have limited resources (i.e. time, money etc.), yet
we want to efficiently allocate and use them well. Everything uses optimization, i.e. from using your
time productively to solving supply chain problems for your company etc.
Linear programming (LP) is defined as a mathematical optimization (modelling and simulation)
technique used to determine the best possible outcome or solution (maximizing profits or minimizing
costs) to a given problem subject to some set of linear constraints in the form of linear inequalities.
Because of its nature, linear programming is also called linear optimization.
EXPRESSING A LINEAR PROGRAMMING PROBLEM
In linear programming, we formulate our real life problem into a mathematical optimization model
that involves a set of the decision variables, an objective function to be optimized (maximized or
minimized) subject to a set of constraints which must be satisfied by decision variables.
The basic components of linear programming problem are as follows:
1. Decision Variables
To solve any problem, we first need to identify the decision variables. Decision variables
describe the unknown quantities that the decision makers would like to determine or control.
They usually measure the amounts of resources needed for consumption, for example, the
number of nurses to employ during the morning shift in an emergency room may be a decision
variable in an optimization model for labor scheduling.
2. Objective Function
The second step in solving linear programming problems is to set up an objective function which
defines the quantity which the decision maker wants to optimize (either minimize costs or
maximize profits).
The objective function should be, clearly defined and measurable in quantitative terms. Such as,
maximization of sales, minimization of cost of production, etc.
3. Constraints
The constraints are the restrictions or limitations on the decision variables and the objective
function to be optimized. A constraint is an inequality or equality representing how each decision
variable would use limited amounts of resources, such as money, energy, manpower, machine
resources, time, space and many others.
4. Non-negativity Restriction
For all linear programs, the decision variables should always take non-negative values. Which
means the values for decision variables should be greater than or equal to 0.

Page 1 of 9
Prepared By Ddamba AbdulKarim ©2018
Department of Applied Computing & Information Technology
Faculty of Computing and Informatics
Makerere University Business School
Chapter-3: Sensitivity Analysis Using the Excel Solver BBC – III

APPLICATION OF LINEAR PROGRAMMING FOR SOLVING BUSINESS PROGRAMS


Linear programming is a mathematical modelling or optimization technique used in a variety of
practical fields. Mathematically speaking, it applies to all those problems which require the solution
of maximization or minimization problems subject to a system of linear inequalities stated in terms
of certain variables.
It is widely used in business to determine the best ways to increase (maximize) profits and decrease
(minimize) operational costs in the following areas;

a) Production planning and management. Linear programming methods are often helpful at
solving problems related to production. A company that produces multiple types of products can
use linear programming methods to calculate how much of each product to produce to maximize
its profits.
For instance, a custom furniture shop that makes chairs and tables can calculate how many of
each item they must sell to maximize their profits by looking at the numbers of each item
previously sold and their prices.
b) Marketing Mix. A key aspect of marketing strategy is the “marketing mix.” The marketing mix
determines how much of a company's marketing budget will go toward various advertising and
marketing channels.
A linear programming simulation can measure which blend of marketing avenues deliver the
most qualified leads at the lowest cost. For example, the custom furniture store can use a linear
programming method to examine how many leads come from TV commercials, newspaper
display ads and online marketing efforts. The solution will also compare the relative prices of
each medium to find the most economical mix.
c) Product Distribution. Manufacturers and distributors can use linear programming methods to
solve distribution problems. These mathematical exercises can help manufacturers determine the
most cost-effective way to ship products from the factory to the warehouse.
Warehouse managers can also use similar models to calculate the most economical way to
transport the products from the warehouse to the retail outlets. These models can also ensure that
warehouses maintain an optimal amount of each product in stock as demand fluctuates.
d) Inventory Management. A firm is faced with the problem of inventory management of raw
materials and finished products. The objective function in inventory management is to minimize
inventory cost and the constraints are space and demand for the product. LP technique is used to
solve this problem.
e) Personnel Management. Human resources planners can use linear programming methods to
determine when to hire more workers, which skill sets the company needs and how much they
can offer in compensation. These methods can also be used to anticipate times of increased
demand for available workers.
For example, a department store can use linear programming methods to calculate how many
new hires they will make for the busy holiday shopping season, as well as which departments
will see higher traffic and require more staff.

Page 2 of 9
Prepared By Ddamba AbdulKarim ©2018
Department of Applied Computing & Information Technology
Faculty of Computing and Informatics
Makerere University Business School
Chapter-3: Sensitivity Analysis Using the Excel Solver BBC – III

FORMULATING THE LINEAR PROGRAMMING PROBLEM


A linear programming problem is one in which we are to find the maximum or minimum value of a
linear expression. This gives rise to two cases, i.e. Maximization case and Minimization case.

1. MAXIMIZATION PROBLEM
A standard maximization problem in n unknowns is a linear programming problem in which we are
required to maximize (not minimize) the objective function, subject to constraints of the form.

Example Illustrating the Maximization Problem


Consider a chocolate manufacturing company which produces only two types of chocolate, Red-
chocolate and Brown chocolate. Both the chocolates require Milk and Choco only.

To manufacture each unit of Red-chocolate and Brown chocolate, following quantities are required,
each unit of Red-chocolate requires 2 unit of Milk and 3 units of Choco while each unit of Brown
chocolate requires 1 unit of Milk and 2 units of Choco.

The company kitchen has a total of 5 units of Milk and 12 units of Choco. On each sale, the company
makes a profit of, 6,000 shillings per unit of Red-chocolate sold and 5,000 shillings per unit of
Brown-chocolate sold.

Required;
Now, the company wishes to maximize its profit. How many units of Red-chocolate and Brown-
chocolate should it produce respectively?

Solution
Represent the problem in a tabular form for better understanding.
Units of Input required
Products Milk Choco Profit per unit
Red-chocolate 2 3 6,000/=
Brown-chocolate 1 2 5,000/=
Total 5 12

STEPS IN FORMULATING THE LINEAR PROBLEM


Step – One: Identify the Decision Variables
These are the unknown number of units (quantity of output) of Red-chocolate and Brown-
chocolate to be produced or determined.

Expressing the decision variables


 Let the total number of units produced of Red-chocolate be = X
 Let the total number of units produced of Brown-chocolate be = Y

Step – Two: Formulate the Objective Function


The objective function is to maximize profits, which is given by the total number of units of Red-
chocolate and Brown-chocolate produced multiplied by its per unit profit 6,000/= and 5,000=
respectively.

Page 3 of 9
Prepared By Ddamba AbdulKarim ©2018
Department of Applied Computing & Information Technology
Faculty of Computing and Informatics
Makerere University Business School
Chapter-3: Sensitivity Analysis Using the Excel Solver BBC – III

Expressing the Objective Function


 Let Z represent the total profit maximized.
 Therefore, Z = 6,000X+5,000Y, which means we have to maximize Z.
 The company will try to produce as many units of Red-chocolate and Brown-chocolate to
maximize the profit.

Step – Three: Determine the Constraints


The company will try to produce as many units of Red-chocolate and Brown-chocolate to maximize
the profit, HOWEVER, the resources Milk and Choco are available in limited amount. The
mathematical relationship that explains this limitation is called inequality.

Expressing the Constraints


For the company to make maximum profit, the following inequalities have to be satisfied which are
expressed in terms of inequality equations as follows:
 As per the above table, each unit of Red-chocolate and Brown-chocolate requires 2 units and 1
unit of Milk respectively, which cannot exceed the total availability of 5 units of Milk. Thus, this
constraint can mathematically be expressed as: 2X+1Y ≤ 5,
 Also, each unit of Red-chocolate and Brown-chocolate requires 3 units & 2 units of Choco
respectively. The total amount of Choco available is 12 units. To represent this mathematically,
3X+2Y ≤ 12

Step – Three: Explicitly state the non-negativity restriction


The non-negativity condition is used since the units of Milk and Choco to be produced cannot be
negative values.

Expressing the Non-negativity Restriction


 So we have two more constraints, X ≥ 0 & Y ≥ 0

Thus, the linear programming problem will be:


i). Maximize Z = 35x1+ 40x2 (profit)
Subject to:
i). 2X+1Y ≤ 5 (Milk constraint),
ii). 3X+2Y ≤ 12 (Choco constraint),
iii).X ≥ 0 & Y ≥ 0

Note: It is to be noted that “≤” (less than equal to) sign is used as the profit maximizing output may
not fully utilize all the resources, and some may be left unused.

Page 4 of 9
Prepared By Ddamba AbdulKarim ©2018
Department of Applied Computing & Information Technology
Faculty of Computing and Informatics
Makerere University Business School
Chapter-3: Sensitivity Analysis Using the Excel Solver BBC – III

SOLVING FOR LINEAR PROGRAMMING PROBLEMS USING THE EXCEL-SOLVER


In reality, a linear program can contain 30 to 1000 variables and solving it either graphically or
algebraically is next to arduous process. Microsoft offers Solver, a numerical optimization add-in to
tackle these real-world problems. While it can’t solve every problem, it can be a very useful “what-
if” tool.

The steps to solving linear programming problems using the Excel Solver
Linear Programming problems consists of formulation of real life problems into the mathematical
forms and models. A solver deals with numbers, so you'll need to quantify the various elements of
your model, i.e. the decision variables, the objective, and any constraints and their relationships.
The problem formulation consists of five main steps and these include;
1. Creating a spreadsheet which models the problem.
2. Identify the decision variables.
3. Define the objective function.
4. Defining and specifying the constraints.
5. Solving the model, i.e. enter the linear program into the solver and begin optimizing.
i). Supply the objective function in the objective cell, choose minimize or maximize depending
on the nature of the objective function.
ii). Enter the decision variables in the variables cells
iii).Add all the constraints, one by one
iv). Enter one more important constraint, the non-negativity restriction, i.e. to denote that all the
decision variables must be greater than zero.
v). Click on the save model to finish the modelling process
6. Analyze the solution

Product Mix Example


Century Bottling Company Limited must decide how many crates of the two types of soda (Coca-
Cola and Fanta) to produce for its next shipment. It has a limited supply of ingredients that are used
in both products.

Each Crate of Coca-Cola requires 20 grams of caffeine citrate, 2 milliliters of lime juice, 10
kilograms of sugar, and yields of £20 of profit.

Each crate of Fanta requires 2 milliliters of lime juice, 30 kilograms of sugar, and yields £30 of
profit.

The company has 500 grams of caffeine citrate, 60 milliliters of lime juice, and kilograms of sugar
on hand. Management wishes to determine the amount of Coca-Cola and Fanta produce to maximize
profits.

Required:
Create a spreadsheet which will calculate the profit and the amount ingredients used for any amount
of Coca-Cola and Fanta sodas produced.

Page 5 of 9
Prepared By Ddamba AbdulKarim ©2018
Department of Applied Computing & Information Technology
Faculty of Computing and Informatics
Makerere University Business School
Chapter-3: Sensitivity Analysis Using the Excel Solver BBC – III

EXERCISES ABOUT SOLVING LINEAR PROBLEMS USING THE EXCEL SOLVER

Question – 1
Let’s say; the agricultural research institute recommended a farmer to spread out at least 5000 kg of
phosphate fertilizer and not less than 7000 kg of nitrogen fertilizer to raise the productivity of his
crops on the farm. There are two mixtures A and B, weighs 100 kg each, from which these fertilizers
can be obtained.

The cost of each Mixture A and B is 40 shillings and 25 shillings respectively. Mixture A contains
40 kg of phosphate and 60 kg of nitrogen while the Mixture B contains 60 kg of phosphate and 40
kg of nitrogen. Find out how many bags of each type a farmer should buy to get the desired amount
of fertilizers at the minimum cost.

Question – 2
The Product-Mix Problem
A company manufactures two models of a product, which we call the regular model and the
enhanced model. Two resources, A and B, are needed for the manufacturing of units of this product.
3 units of Resource A and 2 units of Resource B are consumed in the manufacturing of each unit of
the regular model. NB. These resources could represent hours of labor, amounts of raw material,
available electrical power, and so on.

Suppose further that the company has 650 units of Resource A and 500 units of Resource B available
per week, and that the net profits for selling units of the regular model and the enhanced model are
given respectively as 5 shillings and 7 shillings per unit. What are the optimal weekly production
levels for these two models?

Question – 3
A farmer has recently acquired an 110 hectares piece of land. He has decided to grow Wheat and
barley on that land. Due to the quality of the sun and the region’s excellent climate, the entire
production of Wheat and Barley can be sold. He wants to know how to plant each variety in the 110
hectares, given the costs, net profits and labor requirements according to the data shown below:
Cost (Price/Hec) Net Profit (Price/Hec) Man-days/Hec
Wheat 100 50 10
Barley 200 120 30

The farmer has a budget of 10,000 shillings and an availability of 1,200 man-days during the
planning horizon. Find the optimal solution and the optimal value.

Question – 4
Bridgeway Company manufactures a printer and keyboard. The contribution margins of the printer
and keyboard are 30 shillings and 20 shillings, respectively. Two types of skilled labor are required
to manufacture these products: soldering and assembling. A printer requires 2 hours of soldering and
I hour of assembling. A keyboard requires 1 hour of soldering and 1 hour of assembling. Bridgeway
has 1,000 soldering hours and 800 assembling hours available per week. There are no constraints on
the supply of raw materials. Demand for keyboards is unlimited, but at most 350 printers are sold
each week. Bridgeway wishes to maximize its weekly total contribution margin.

Page 6 of 9
Prepared By Ddamba AbdulKarim ©2018
Department of Applied Computing & Information Technology
Faculty of Computing and Informatics
Makerere University Business School
Chapter-3: Sensitivity Analysis Using the Excel Solver BBC – III

Question – 5
The firm of Miller, Lombardi, and York was recently formed by the merger of two companies
providing accounting services. York's business was providing personal financial planning, while
Miller and Lombardi conducted audits of small governmental units and provided tax planning and
preparation for several commercial firms. The combined firm has leased new offices and acquired
several microcomputers that are used by the professional staff in each area of service. In the short
run, however, the firm does not have the financial resources to acquire computers for all of the
professional staff.

The expertise of the professional staff can be divided into three distinct areas that match the services
provided by the firm, i.e., tax preparation and planning, insurance and investments, and auditing.
Since the merger, however, the new firm has had to turn away business in all three areas of service.
One of the problems is that although the total number of staff seems adequate, the staff members are
not completely interchangeable. Limited financial resources do not permit hiring any new staff in
the near future, and, therefore, the supply of staff is restricted in each area.

Rich Oliva has been assigned the responsibility of allocating staff and computers to the various
engagements. The management has given Oliva the objective of maximizing revenues in a manner
consistent with maintaining a high level of professional service in each of the areas of service.
Management's time is billed at 100 shillings per hour, and the staff's time is billed at 70 shillings per
hour for those with experience, and 50 shillings per hour for the inexperienced staff. Pam Wren, a
member of the staff, recently completed a course in quantitative methods at the local university. She
suggested to Oliva that he use linear programming to assign the appropriate staff and computers to
the various engagements.

Required:
i). Identify and discuss the assumptions underlying the linear programming model.
ii). Explain the reasons why linear programming would be appropriate for Miller, Lombardi, and
York in making staff assignments.
iii).Identify and discuss the data that would be needed to develop a linear programming model for
Miller, Lombardi, and York.
iv). Discuss objectives, other than revenue maximization, that Rich Oliva should consider before
making staff allocations.

Question – 6
A calculator company produces a scientific calculator and a graphing calculator. Long-term
projections indicate an expected demand of at least 100 scientific and 80 graphing calculators each
day. Because of limitations on production capacity, no more than 200 scientific and 170graphing
calculators can be made daily. To satisfy a shipping contract, a total of at least 200 calculators much
be shipped each day. If each scientific calculator sold results in a $2 loss, but each graphing
calculator produces a $5 profit, how many of each type should be made daily to maximize net
profits?

Page 7 of 9
Prepared By Ddamba AbdulKarim ©2018
Department of Applied Computing & Information Technology
Faculty of Computing and Informatics
Makerere University Business School
Chapter-3: Sensitivity Analysis Using the Excel Solver BBC – III

Question – 7
A building supply has two locations in town. The office receives orders from two customers, each
requiring 3/4-inch plywood. Customer A needs fifty sheets and Customer B needs seventy sheets.
The warehouse on the east side of town has eighty sheets in stock; the west-side warehouse has
forty-five sheets in stock. Delivery costs per sheet are as follows: $0.50 from the eastern warehouse
to Customer A, $0.60 from the eastern warehouse to Customer B, $0.40 from the western warehouse
to Customer A, and $0.55 from the western warehouse to Customer B.
Find the shipping arrangement which minimizes costs.

Question – 8
The K9 Kondo Company manufactures climate-controlled doghouses. The company believes that
its high-volume customers are high-income male and female dog owners who want to pamper their
pets. To reach these groups, the marketing manager at K9 Kondo is considering placing one-minute
commercials on the following national TV shows: “New York Dog Show” and “Man's Best Friend.”
A one-minute commercial on “New York Dog Show” costs 200,000 shillings, and a one-minute
commercial on “Man's Best Friend” costs 50,000 shillings. The marketing manager would like the
commercials to be seen by at least 60 million high-income women and at least 36 million high-
income men.

Marketing studies show the following: Each one-minute commercial on “New York Dog Show” is
seen by six million high-income women and two million high-income men. Each one-minute
commercial on “Man's Best Friend” is seen by three million high-income women and three million
high-income men.

Constructing the LP problem for minimization of the objective function and use the Excel solver to
solve for the above problem.

Question – 9
You need to buy some filing cabinets. You know that Cabinet X costs $10 per unit, requires six
square feet of floor space, and holds eight cubic feet of files. Cabinet Y costs $20 per unit, requires
eight square feet of floor space, and holds twelve cubic feet of files. You have been given $140 for
this purchase, though you don't have to spend that much. The office has room for no more than 72
square feet of cabinets. How many of which model should you buy, in order to maximize storage
volume?

Question – 10
In order to ensure optimal health (and thus accurate test results), a lab technician needs to feed the
rabbits a daily diet containing a minimum of 24 grams (g) of fat, 36 g of carbohydrates, and 4 g of
protein. But the rabbits should be fed no more than five ounces of food a day.
Rather than order rabbit food that is custom-blended, it is cheaper to order Food X and Food Y, and
blend them for an optimal mix. Food X contains 8 g of fat, 12 g of carbohydrates, and 2 g of protein
per ounce, and costs $0.20 per ounce. Food Y contains 12 g of fat, 12 g of carbohydrates, and 1 g of
protein per ounce, at a cost of $0.30 per ounce. What is the optimal blend?

Page 8 of 9
Prepared By Ddamba AbdulKarim ©2018
Department of Applied Computing & Information Technology
Faculty of Computing and Informatics
Makerere University Business School
Chapter-3: Sensitivity Analysis Using the Excel Solver BBC – III

Question – 11
You have 12,000 shillings to invest, and three different funds from which to choose. The municipal
bond fund has a 7% return, the local bank's CDs have an 8% return, and the high-risk account has
an expected (hoped-for) 12% return. To minimize risk, you decide not to invest any more than $2,000
in the high-risk account. For tax reasons, you need to invest at least three times as much in the
municipal bonds as in the bank CDs. Assuming the year-end yields are as expected, what are the
optimal investment amounts?

Question – 12
A typical example would be taking the limitations of materials and labor, and then determining the
“best” production levels for maximal profits under those conditions.

A company makes two products (X and Y) using two machines (A and B). Each unit of X that is
produced requires 50 minutes processing time on machine A and 30 minutes processing time on
machine B. Each unit of Y that is produced requires 24 minutes processing time on machine A and
33 minutes processing time on machine B.

At the start of the current week there are 30 units of X and 90 units of Y in stock. Available
processing time on machine A is forecast to be 40 hours and on machine B is forecast to be 35 hours.
The demand for X in the current week is forecast to be 75 units and for Y is forecast to be 95 units.
Company policy is to maximize the combined sum of the units of X and the units of Y in stock at
the end of the week.

Required:
i). How much of each product to make in the current week as a linear program.

Question – 13
Below, is a diet chart which gives me calories, protein, carbohydrate and fat content for 4 food items.
Sara wants a diet with minimum cost. The diet chart is as follows:
Food Item 1 Food Item 2 Food Item 3 Food Item 4
Calories 400 200 150 500
Protein (in grams) 3 2 0 0
Carbohydrates ( in grams) 2 2 4 4
Fat (in grams) 2 4 1 5

The chart gives the nutrient content as well as the per-unit cost of each food item. The diet has to be
planned in such a way that it should contain at least 500 calories, 6 grams of protein, 10 grams of
carbohydrates and 8 grams of fat.

Page 9 of 9
Prepared By Ddamba AbdulKarim ©2018
Department of Applied Computing & Information Technology
Faculty of Computing and Informatics
Makerere University Business School

You might also like