Professional Documents
Culture Documents
Excel Solver Function Excel Solver Function
Excel Solver Function Excel Solver Function
What makes a model hard to solve? The "best" or optimal solution may mean maximizing
profits, minimizing costs, or achieving the best possible
Can you show me step by step?
quality.
To use a solver, you must build a model that specifies: Spreadsheets such as Excel provide a convenient way to
build a model
The resources to be used, using decision variables Anyone who has used a spreadsheet is already familiar
The limits on resource usage, called constraints, and with the process:
The measure to optimize, called the objective. Cells on a worksheet can hold numbers, labels, or formulas that
calculate new values -- such as the objective of an optimization
The solver will find values for the decision variables that Constraints are simply limits (specified with <=, = or >= relations)
satisfy the constraints while optimizing (maximizing or on formula cells
minimizing) the objective. And the decision variables are simply input cells containing
numbers
A solver deals with numbers, so you'll need to quantify the For example, if you are shipping goods from 3 different
various elements of your model: decision variables, plants to 5 different warehouses, there are 3 x 5 = 15
constraints, and the objective -- and their relationships different routes along which products could be shipped
Decision variables usually measure the amounts of So, you might have 15 variables, each one measuring the
resources, such as time and money, to be allocated to some number of products shipped along that route
purpose, or the level of some activity
In addition, you might also have 4 different product types, Once you've defined the decision variables, the next step
and you might want to plan shipments in each of the next is to define the objective, which is a function that depends
6 months on the variables
So this might lead to 15 x 4 x 6 = 360 variables
For example, suppose you were planning how many units
This illustrates how a model can become large rather to manufacture of three products:
quickly!
TV sets, stereos, and speaker
Part of the art of modeling is deciding how much detail is
really required
Your objective might be to maximize profit On a spreadsheet where the number of TV sets, stereos
and speakers are in cells D9, E9 and F9 respectively, the
Assume that: each TV set yields a profit of $75, formula would be:
each stereo $50, and
each speaker $35 = 75*D9 + 50*E9 + 35*F9
Then you place a limit (<=, = or >=) on this computed Then define a constraint of B1 = 1 so that the
value percentages allocated must sum up to 100%.
CIVL 1112 Excel - Solver 3/7
Upper and lower bounds on the variables are efficiently For example, if your decision variables measure the
handled by most optimizers and are very useful in many physical dimensions of an object, negative values for these
problems. variables would make no sense.
An optimal solution is a feasible solution where the The Solver is designed to find optimal solutions -- ideally
objective function reaches a maximum (or minimum) value the global optimum -- but this is not always possible
CIVL 1112 Excel - Solver 4/7
The use of integer variables - memory and solution time may rise Your goal is to produce the mix of products which will
exponentially as you add more integer variables
maximize profits, given the inventory of products on hand
E4:G4 >= 0
E4:G4 >= 0
CIVL 1112 Excel - Solver 7/7