You are on page 1of 5

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/318389515

Solving Linear Programming Problems with the 'Solver' in MS Excel

Article  in  SSRN Electronic Journal · January 2014


DOI: 10.2139/ssrn.2479777

CITATIONS READS
0 1,028

1 author:

Samithamby Senthilnathan
International Training Institute, Papua New Guinea
61 PUBLICATIONS   107 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Transportation Technique View project

Network Analysis: Part 4 - Normal Duration and Normal Cost View project

All content following this page was uploaded by Samithamby Senthilnathan on 28 August 2017.

The user has requested enhancement of the downloaded file.


SOLVING LINEAR PROGRAMMING PROBLEMS WITH THE “SOLVER” IN MS EXCEL
Dr. Samithamby Senthilnathan
Senior Lecturer, Department of Accounting and Finance, Nilai University, Malaysia, E-mail: sennathans@yahoo.com

Abstract
Linear Programming technique is one of the important decision making tools in
business operations that is used to optimize a solution within the limitations of
resources available. Graphical Method and Simplex Method are generally used to
solve LP problems. Though various computer applications are now available for
solving LP problems, as a pack in handy, MS Excel is useful to solve LP problems
with its “SOLVER” application. This paper illustrates solving a simple LP problem
with the Solver.

Key words: Linear Programming, Optimization, Solver, Excel


JEL Code: C60, C61, M21

INTRODUCTION
In quantitative analysis, Linear Programming (LP) plays vital role in decision making of business
oriented projects. It is a technique used to optimize a solution within the limitations of resources
available. The LP has basically three components in a model: firstly, the objective (maximisation or
minimization) function; secondly, the resource constraints of inequalities; and thirdly, the non-
negativity of the variables (known as the automatic constraint) to be consistent with the real life
applications.

An LP problem can generally be solved in two methods: Graphical Method and Simplex Method. If a
problem consists of only two variables, the graphical method of solving the LP problem is simple
and easy. However, if a problem has three or more solution variables in an LP problem, simplex
method is the most appropriate method of solving it. Nowadays, there are various computer
applications available for solving LP problems. Consistently, as a pack in handy, MS Excel is also
useful to solve LP problems with its “SOLVER” application. Hence, the Solver application should
have been installed and appear in the Excel toolbar.1 This paper explores how a simple LP problem
can be solved in the Excel, using the Solver.

1 To install solver in Excel, click “File” and select “Excel Options”, where click on “Add-Ins”. You can find “Manage: Excel
Add-Ins” at the bottom of the browser, then click on “Go”, where you find a Add-Ins message box and select the option
“Solver Add-In” and finally click “OK”. Now, you can find the icon “Solver” in “Analysis” the subsection of Data toolbar in
the main menu to solve your LP problems.

1
http://ssrn.com/abstract=2479777
THE SAMPLE PROBLEM OF TWO VARIABLES
Consider that the Mad-Max produces two products (P1 and P2) with two raw materials M1 and M2.
The materials required to produce one unit of x1 and x2 are:

Raw Material P1 P2
M1 3 4
M2 5 4

Available raw materials of M1 and M2 are 4000 and 5000 units, respectively. Contribution per unit
of P1 is $ 80 and P2 is $ 90. You are required to determine the number of each product that
optimizes the maximum contribution of the products. In this context, you can assume number of
products P1 and P2 are x1 and x2, respectively)

SOLUTION
The model for the above LP problem is:

Objective Function Max Z = 80 x1 + 90 x2


Subject to constraints
3 x1 + 4 x2 ≤ 4000 (resource limitation of M1)
5 x1 + 4 x2 ≤ 5000 (resource limitation of M2)
Automatic constraint x1, x2 ≥ 0

To provide an easy approach of solving the above LP problem with Excel Solver, you can consider
the following steps in order.

Step 1: Set the information in a table in Excel Worksheet (including contributions and constraints)
as in the model.
C D E F G H I
10 Possible
11 x1 x2 Max
12 Solution 0
13 Contribution 80 90
14
15 Constraints Limit
16 R’Material M1 3 4 0 <= 4000
17 R’Material M2 5 4 0 <= 5000
18

2
http://ssrn.com/abstract=2479777
In the above table,
Cell F12 is set out with the formula: =D12*D13+E12*E13
Cell F16 is set out with the formula: =D12*D16+E12*E16
Cell F17 is set out with the formula: =D12*D17+E12*E17

Note: Other values in the table are the information available in the problem.

Step 2: Click the "Solver" in Analysis and do the following.

In the “Solver Parameter”,

Step 3: Set the Target Cell (in this case, F12 in YELLOW in the table above)
Step 4: Set the Optimization Problem (Max or Min or for an Expected Value)
Step 5: Set the Changing Cells (in this case, D12 and E12 of Solution in GREEN)
Step 6: Click “Add” in the solver and do the following to add constraints

In the "Add Constraints",

Step 7: Set the “Cell Reference” of Possible Max use of M1 (in this case F16 in BLUE)
Set the constraint symbol (in this case <=)
Set the constraint cell of Limit of M1 (in this case H16 in BLUE)
Click "Add" to add the constraint of M2

Step 8: Set the “Cell Reference” of Possible Max use of M2 (in this case F17 in ORANGE)
Set the constraint symbol (in this case <=)
Set the constraint cell of Limit of M2 (in this case H17 in ORANGE)
Click "Add" to add the constraint of M2

Step 9: Close Add Constraint

Step 10: Click "Options" and tick "Assume Linear Model" and "Assume Non-Negative"
Step 11: Click "OK" in the "Solver Options"
Step 12: Click "Solve" in the "Solver Parameter" and
Click "OK" in the "Solver Results" to get the problem solved in the Cells

3
http://ssrn.com/abstract=2479777
The result will appear as in the following table

C D E F G H I
10 Possible
11 x1 x2 Max
12 Solution 500 625 96250
13 Contribution 80 90
14
15 Constraints Limit
16 R’Material M1 3 4 4000 <= 4000
17 R’Material M2 5 4 5000 <= 5000
18

Users of this paper are kindly advised to acknowledge about the quality of
the illustration (Email: sennathans@yahoo.com). This may help me to
produce more papers like this. Your kind cooperation and support are highly
appreciated. Thank you.

4
http://ssrn.com/abstract=2479777
View publication stats

You might also like