You are on page 1of 19

# Linear Programming

Using
Excel Solver

Presented by:
Nikhil Verma
vermanikh@gmail.com
Agenda
Linear Programming
Ø Introduction to LP
Ø Application Areas
Ø Methods to Solve
Ø Limitations
Software tools to solve LP
Excel Solver
Ø Model
Ø Optimization
Ø Solution
Introduction
Technique for optimization

Found during Second World War

Key people
v Leonid Kantorovich
v George B. Dantzig (1947)
v Leonid Khachiyan(1979)
v Narendra Karmarkar(1984)
Application Areas
Transportation Problem

Military Applications

Personnel Assignment Problem

Other Applications
Different Methods of Linear
Programming

The Graphical Method

The Analytical Method

The Simplex Method
Programming
Make the best possible use of available
productive resources (such as time, labor,
machines etc.)

Highlighting of bottle necks

Improving quality of decision making

Avoiding wastage of resources
Limitations of Linear
Programming
Applicable only to problems where the
constraints and objective function are linear
Factors such as uncertainty, weather conditions
etc. are not taken into consideration.
There may not be an integer as the solution
Only one single objective is dealt with while in
real life situations, problems comes with multi-
objectives.
Parameters are assumed to be constants
Software Tools For Linear
Programming

MATLAB - MathworksInc. USA - Vectors and
Matrices

LINGO – LindoSystems Inc - linear, nonlinear
and integer programming

EXCEL SOLVER - Frontline Systems, Inc - No
Scripting
How to Use Excel Solver
To use a solver, you must build a model that
specifies:

The resources to be used, using decision
variables,
The limits on resource usage, called
constraints (Physical, policy, integer, non-negative,
bounds etc)
The measure to optimize, called the objective.

Can’t Model be defined and executed in
Example Problem
 Our factory is building three products: TV sets, stereos and
speakers. Each product is assembled from parts in inventory,
and there are five types of parts: chassis, picture tubes, speaker
cones, power supplies and electronics units. Our goal is to
produce the mix of products that will maximize profits, given the
inventory of parts on hand.

 Algebraic Form:
 Maximize : 75 x1 + 50 x2 + 35 x3 (Profit)
 Subject to:
1 x1 + 1 x2 + 0 x3 <= 400 (Chassis)
1 x1 + 0 x2 + 0 x3 <= 200 (Picture tubes)
2 x1 + 2 x2 + 1 x3 <= 800 (Speaker cones)
1 x1 + 1 x2 + 0 x3 <= 400 (Power supplies)
2 x1 + 1 x2 + 1 x3 <= 600 (Electronics)
 Decision Variables
 cell A1 for x1, cell A2 for x2 and cell A3 for x3

 Objective Function
 cell A4: =75*A1+50*A2+35*A3

 Constraints
 cell B1 =1*A1+1*A2+0*A3(Chasis)
 cell B2 =A1 (Picture tubes)
 cell B3 =2*A1+2*A2+A3 (Speaker cones)
 cell B4 = A1+A2 (Power supplies)
 Cell B5 =2*A1+A2+A3 (Electronics)
Optimization With Solver
 Start Using Premium Solver in the Welcome / Help
dialog
 An empty Solver Parameters dialog should appear,
as shown
Optimization With Solver
1. Define the objective function
Ø click to select Objective in the outline list in the Solver
Parameters dialog (when first opened, it is selected by
appear

Ø we can type a different cell address (or an Excel defined
name), or we can click the cell se le ctor icon at the right
edge of the edit box, which allows us to point and click the
cell we want on the worksheet:
Optimization With Solver
2. select the decision variables
Ø To do this, click to select Variables in the Solver
Parameters dialog, and click the Add button:

Ø We can click the cell selector icon to select the cell
range A1:A3, then click OK:
Optimization With Solver
3. Select the constraints
Ø non-negativity constraint : shortcut way to do
this . an Assume Non-Negative. check box in the Solver
Options dialog
Ø Click to select Constraints in the Solver Parameters
dialog, and click the Add button:
Optimization With Solver
Constraints Contd…
Ø we want to define the five general constraints in our
problem
Ø enter 400 in cell C1, 200 in C2, 800 in C3, 400 in C4, and
600 in C5
Ø Ensure that Constraints in the outline is selected, and
click the Addbutton. Click the cell selector icon next to
the Cell Reference, and select cells B1:B5 (the left hand
sides). The default relation of <= is OK. Click the cell
selector icon next to the Constraint, and select cells
C1:C5 . so the Add Constraint dialog looks like this:
Optimization With Solver
Selecting the Solver Engine
Ø In the Premium Solver products, selecting the Solver engine is
easier: There is a dropdown list of Solver engines available in the
Solver Parameters dialog. The default choice is the standard GRG
Solver (which, while slower, is fully capable of solving linear as
well as nonlinear problems).
Optimization With Solver
 Solving the Problem
Ø click the Solve button
Ø After an instant or two, the solution values appear in the decision
variable cells
Ø Solver Results dialog appears, as shown below

Ø You can select one or more reports to be produced from the
Reports list box (and check the Outline Reports box, if you would
like the reports outlined you can either keep the solution values
in the decision variable cells, or discard the solution values
(restoring the original cell values)
Thank You