Design-and-Use-of-the-Microsoft-Excel-Solver
Design-and-Use-of-the-Microsoft-Excel-Solver
net/publication/255673015
CITATIONS READS
601 2,227
4 authors, including:
Daniel Fylstra
Frontline Systems, Inc.
5 PUBLICATIONS 658 CITATIONS
SEE PROFILE
All content following this page was uploaded by Daniel Fylstra on 02 April 2024.
philosophy of the Excel Solver. We seek to quired by the optimizers in much the
explain why the Excel Solver works the same way that GAMS and AMPL do.
way it does, to clear up some common The optimizers employ the simplex,
misunderstandings and pitfalls, and to generalized-reduced-gradient, and branch-
suggest ideas for good modeling practice and-bound methods to find an optimal so-
when using spreadsheet optimization. We lution and sensitivity information. The
also briefly survey applications of the Solver uses the solution values to update
Excel Solver in industry and education the model spreadsheet and provides sensi-
and describe how practitioners who are tivity and other summary information on
not affiliated with the OR/MS community additional report spreadsheets.
use it. The example models in this paper Background and Design Philosophy
are available on Practice Online at of the Excel Solver
(http://silmaril.smeal.psu.edu/pol.html) The Microsoft Excel Solver and its coun-
and at http://www.frontsys.com/ terparts in Lotus 1-2-3 97 and Corel Quat-
interfaces.htm. Much more information— tro Pro were not the first spreadsheet op-
over 200 web pages at this writing—is timizers; that distinction belongs to What’s
available on Frontline Systems’ World Best!, conceived by Sam Savage, Linus
Wide Web site (http://www.frontsys.com). Schrage, and Kevin Cunningham in 1985
The Microsoft Excel Solver combines the and marketed by General Optimization
functions of a graphical user interface Inc. for the Lotus 1-2-3 Release 2 spread-
(GUI), an algebraic modeling language sheet [Savage 1985]. What’sBest! is still
like GAMS [Brooke, Kendrick, and available in versions for each of the major
Meeraus 1992] or AMPL [Fourer, Gay, and spreadsheets and is now sold and sup-
Kernighan 1993], and optimizers for linear, ported by Lindo Systems Inc. Other early
nonlinear, and integer programs. Each of spreadsheet optimizers included Frontline
these functions is integrated into the host Systems’ What-If Solver [Frontline Sys-
spreadsheet program as closely as possi- tems 1990], Enfin Software’s Optimal Solu-
ble. Many of the decisions we and Micro- tions [Enfin Software 1988], and Lotus
soft made in designing the Solver were Development’s Solver in earlier versions
motivated by this goal of seamless of 1-2-3 [Lotus Development 1990].
integration. The design approach of What-If Solver,
Optimization in Microsoft Excel begins implemented in the graphical user inter-
with an ordinary spreadsheet model. The face of Excel, was chosen by Microsoft
spreadsheet’s formula language functions over several alternatives including
as the algebraic language used to define What’sBest!; by Borland (the original de-
the model. Through the Solver’s GUI, the velopers of Quattro Pro) over an earlier
user specifies an objective and constraints solver developed internally by that com-
by pointing and clicking with a mouse pany; and later by Lotus over their own
and filling in dialog boxes. The Solver internally developed solver. A major rea-
then analyzes the complete optimization son for this outcome, we believe, is that
model and produces the matrix form re- the Excel Solver had as its design goal
INTERFACES 28:5 30
MICROSOFT EXCEL SOLVER
September–October 1998 31
FYLSTRA ET AL.
Figure 2: The Solver Parameters dialog is used to define the optimization model. The terms
“Set Target Cell” (for the objective) and “Changing Cells” (for the variables) and the “Value
of” option were derived from the earlier Goal Seek feature.
INTERFACES 28:5 32
MICROSOFT EXCEL SOLVER
Premium
Excel Built-In Premium Solver Premium Solver
Solver Solver Plus Platform
September–October 1998 33
FYLSTRA ET AL.
variables from other variables or objectives usually guesses wrong” and advising stu-
or constraints from other formulas. Hence, dents not to use it, but many spreadsheet
the Excel Solver provides both interactive users find it useful. When one presses the
and user-programmable ways to specify Guess button, the Solver places a selection
which spreadsheet cells are to serve each in the By Changing Cells edit box that in-
of these roles. cludes all input (nonformula) cells on
In interactive use, the user selects Tools which the objective formula depends. This
Solver . . . from the Excel menu bar, dis- selection will usually include the actual
playing the Solver Parameters dialog box decision variables as a subset and may be
(Figure 2). As noted earlier, this dialog box edited to remove ranges of cells that are
is patterned after the Goal Seek feature not decision variables (for example, those
(Figure 1). The “Value of” option offers a that are fixed parameters in the model).
way to directly solve goal-seeking prob- Constraints
lems using the Solver; when the user se- The key issue in a spreadsheet solver’s
lects this option and enters a target value, user interface is the method of specifying
an equality constraint is added to the opti- constraints. What’sBest! originally used a
mization model, and there is no objective “Rule of Constraints” that required every
to be maximized or minimized. (Alterna- formula cell dependent on the variables to
tively, one may simply leave the Set Target be nonnegative—but this form was not in-
Cell edit box blank and enter an equality tuitive for typical spreadsheet users and
constraint in the Constraint list box.) In was not acceptable to the spreadsheet ven-
either case, the problem is solved with a dors. (More recent versions of What’sBest!
(constant) dummy objective, and the use a new constraint representation.) In
Solver stops when the first feasible solu- the earlier Lotus-developed solver for
tion is found. In this way, the Excel Solver 1-2-3, Lotus used logical expressions in the
fulfills spreadsheet users’ expectations of a spreadsheet’s formula language, including
more powerful Goal Seek capability that the relational operators ,4, 4, and .4,
can be used to find solutions for systems to represent constraints. The solver dialog
of equations and inequalities. box simply offered an edit box in which a
Decision Variables and the Guess Button range of cells containing such logical for-
Model decision variables are entered in mulas could be entered—thereby taking
the By Changing Cells edit box. Excel al- full advantage of an existing spreadsheet
lows one to enter a so-called multiple se- feature.
lection, which consists of up to 16 ranges In the Excel Solver, in consultation with
(rectangles, rows or columns, or single Microsoft, we chose a different way of
cells) separated by commas. Alternatively, specifying constraints, for several reasons.
one may press the Guess button to obtain First, spreadsheet logical formulas (expres-
an initial entry in the By Changing Cells sions that evaluate to TRUE or FALSE in
edit box. This feature often puzzles Excel, or 1 or 0 in Lotus 1-2-3) are more
OR/MS professionals; Ragsdale [1997] in- general than constraints. They allow such
cludes a sidebar saying that the “Solver relations as ,, ., and ,. (not equal),
INTERFACES 28:5 34
MICROSOFT EXCEL SOLVER
which are not easily handled by current constraints by clicking the corresponding
optimization methods, as well as such log- buttons.
ical operators as AND, OR, and NOT. Sec- In accord with the GUI conventions
ond, relations such as A1 . 4 0, are eval- used throughout Excel, one can select
uated by the spreadsheet as strictly blocks of cells for decision variables and
satisfied or unsatisfied, whereas an optimi- for left-hand sides and right-hand sides of
zation algorithm evaluates constraints constraints by typing coordinates or by
within a tolerance. For example, if A1 4 clicking and dragging with the mouse.
10.0000005, the Excel Solver would treat The latter method is far more often used.
A1 .4 0 as satisfied (using the default Excel also allows the user to define sym-
Precision setting of 1016 or 0.000001), but bolic names for individual cells or ranges
the logical formula 4 A1 .4 0 in a cell of cells (through the Insert Name menu
would display as FALSE. Third, con- option). The Excel Solver will recognize
straints almost always come in blocks or any names the user has defined for the ob-
indexed sets, such as A1:A10 .4 0, and it jective, variables, and blocks of constraints
is very advantageous for users to be able and will display them in the Solver Pa-
to enter such constraints and later view rameters dialog box (Figure 3).
and edit them in block form. Hence, the For those who prefer to use spreadsheet
Excel Solver provides a Constraint list box logical formulas for constraints, the Excel
in the Solver Parameters dialog box where Solver will read and write constraints in
users can add, change, or delete blocks of this form, when the Load Model and Save
Figure 3: Excel users can define symbolic names for single cells or ranges of cells, which the
Solver will use. This dialog depicts the same model as in Figure 2 with the aid of defined
names, resulting in a much more readable model.
September–October 1998 35
FYLSTRA ET AL.
Model buttons in the Solver Options dia- rithm will be used to solve the problem.
log box are used. The Use Automatic Scaling check box
Solver Options causes the model to be rescaled internally
The user can control several options and before solution. The Assume Non-
tolerances used by the optimizers through Negative check box places lower bounds
the Solver Options dialog box (Figure 4). of zero on any decision variables that do
In the standard Excel Solver, all such op- not have explicit bounds in the Con-
tions appear in one dialog box; in the Pre- straints list box.
mium Solver products, where many more The Precision edit box is used by all of
options and tolerances are available, each the optimizers and indicates the tolerance
optimizer has a separate dialog box. within which constraints are considered
The Max Time and the Iterations edit binding and variables are considered inte-
boxes control the Solver’s running time. gral in mixed-integer-programming (MIP)
The Show Iteration Results check box in- problems. The Tolerance edit box (a some-
structs the Solver to pause after each ma- what unfortunate name, but Microsoft’s
jor iteration and display the current “trial choice) is the integer optimality or MIP-
solution” on the spreadsheet. In lieu of gap tolerance used in the branch-and-
these options, however, the user can sim- bound method. The GRG2 algorithm uses
ply press the ESC key at any time to the Convergence edit box and Estimates,
interrupt the Solver, inspect the current it- Derivatives, and Search option button
erate, and decide whether to continue or groups.
to stop. Modeling Practice
The Assume Linear Model check box Excel, including the Solver, offers many
determines whether the simplex method convenient ways to select and manipulate
or the GRG2 nonlinear programming algo- blocks of cells for variables and con-
straints. Modelers should take advantage
of this feature by laying out optimization
models with indexed sets (for example,
products, regions, or time periods) along
the columns and rows of tables or blocks
of cells. We also highly recommend the
practice of defining names for indexed sets
of variables and constraints and even for
single cells. For example, the structure of
the model with names defined as shown
in Figure 3 is far more easily grasped than
the same model with cell coordinate
ranges as shown in Figure 2. Blocks of
Figure 4: The Solver Options dialog box is
constraint values can often be computed
used to select algorithmic options and to set
tolerances for the Excel Solver’s solution more easily with Excel’s array of formulas,
methods. which provide some of the high-level fea-
INTERFACES 28:5 36
MICROSOFT EXCEL SOLVER
September–October 1998 37
FYLSTRA ET AL.
The Solver is concerned only with those compute parameters of the model that do
formulas that relate the objective and con- not depend on the decision variables, even
straints to the decision variables; it treats if the optimization model is an LP. Indeed,
all other formulas on the spreadsheet as it is often convenient to use IF, CHOOSE,
constant in the optimization problem. Ex- and table LOOKUP functions in calculat-
cel, 1-2-3, and Quattro Pro all implement a ing parameters, and we frequently see
form of minimal recalculation in which these functions in models created by com-
only those formulas that are dependent on mercial users of Frontline Systems’ Pre-
the cell values that have changed need to mium Solver products.
be recalculated. Computing finite differences does, how-
In calculating finite differences, the ever, take time to recalculate the spread-
[i,j]th element of the Jacobian matrix is ap- sheet. Bearing in mind that Excel will re-
proximated by the formula calculate every formula on the current
worksheet that depends on the decision
fi (x ` d ej) 1 fi (x)
where d 4 eps |1 4 xj|. variables—even those not involved in the
d
optimization model—modelers can mini-
In this formula, ej is the jth unit vector and mize this time by keeping auxiliary calcu-
eps is a perturbation factor, typically 1018 lations on a separate worksheet. Because
approximately equal to the square root of of the significant overhead in recalculating
the machine precision [Gill, Murray, and multiple worksheets, the Excel Solver cur-
Wright 1981]. After an initial recalculation rently requires that cells for the decision
to evaluate f(x), the Solver perturbs each variables, the objective, and the left-hand
variable in turn, recalculates the spread- sides of constraints appear on the active
sheet, and obtains values for the jth col- sheet, although model formulas and right-
umn of the Jacobian matrix. Hence the hand sides of constraints can refer to other
process requires n ` 1 recalculations for sheets.
an n variable problem; each recalculation For users with models that take a long
after the first perturbs just one variable time to recalculate, we strongly recom-
and resets another, thereby taking advan- mend an upgrade to Excel 97, the latest
tage of the spreadsheet’s minimal recalcu- version of Excel at this writing. Recalcula-
lation feature. tion performance is greatly improved in
Modeling Practice this version, and the Solver is correspond-
The use of finite differences in the Excel ingly faster on the majority of models.
Solver has a number of implications for Frontline Systems’ Premium Solver prod-
spreadsheet modelers. The Solver’s model ucts offer additional ways to speed up
processing allows users to employ any of evaluation of the Jacobian matrix (Table 1),
Excel’s several hundred built-in functions, and we plan further improvements in this
as well as user-written functions, in con- area.
structing the spreadsheet. While many of Solving Linear Problems
these functions have nonlinear or non- When a user checks the Assume Linear
smooth values, they can be used freely to Model box (Figure 4) the Excel Solver uses
INTERFACES 28:5 38
MICROSOFT EXCEL SOLVER
a straightforward implementation of the ear solver in Excel 4.0, we added the Use
simplex method with bounded variables Automatic Scaling check box to the Solver
to find the optimal solution. This code op- Options dialog box. But this dug a deeper
erates directly on the LP coefficient matrix pitfall for users with linear problems, since
(that is, the Jacobian), which is determined this automatic scaling option had no effect
using finite differences. The standard Excel on the linear solver—and users often over-
Solver stores the full matrix, including looked the documentation of this fact in
zero entries; however, no matrix rows are Excel’s online Help.
required for simple variable bounds. In Excel 97, the Use Automatic Scaling
Frontline Systems’ Large-Scale LP Solver box applies to both linear and nonlinear
(Table 1) relies on a sparse representation problems. If the user checks this box and
of the matrix and of the LU factorization the Assume Linear Model box, the Solver
of the basis with dynamic Markowitz re- rescales columns, rows, and right-hand
factorization, yielding better memory us- sides to a common magnitude before be-
age and improved numerical stability on ginning the simplex method. It unscales
large-scale problems. the solution values before storing them
Automatic Scaling and Related Pitfalls into cells on the spreadsheet. With this en-
Earlier versions of the standard Excel hancement, the simplex solver is able to
Solver had no provision for automatic handle most poorly scaled models without
scaling of the coefficient matrix; they used any extra effort by the user.
values directly from the user’s spread- Linearity Test and Related Pitfalls
sheet. Since it is easy to rescale the objec- For the reasons outlined earlier, the Ex-
tive and constraint values on the spread- cel Solver asks the user to specify whether
sheet itself, we did not think that the model is linear, but it does perform a
automatic scaling would be needed, espe- simple numerical test to check the linearity
cially for linear problems. We were wrong. assumption for reasonableness. This li-
Over the years, we have received many nearity test gave rise to another pitfall,
spreadsheet models from users—including again for poorly scaled models. Prior to
business school instructors—that did not Excel 97, the Solver performed this test af-
seem to solve correctly. In virtually all of ter it had obtained a solution using the
these cases, the model was very poorly simplex method. It used these solution
scaled—for example, with dollar amounts values x* and the initial values x0 for the
in millions for some constraints and return variables to check that the objective and
figures in percentages for others—yet none each constraint function fi (x), evaluated by
of these users identified scaling as a prob- recalculating the spreadsheet, satisfied the
lem. It seems that in the widespread move following condition:
to emphasize modeling over algorithms,
|fi (x*) 1 (fi (x0) ` ¹fi (x0)(x* 1 x0))| # tol.
such issues as scaling (still important in
using software) have been de-emphasized Here ¹fi (x0) is the function gradient, that
or forgotten. is, the appropriate row of the LP coeffi-
To improve performance of the nonlin- cient matrix, and tol is the Precision value
September–October 1998 39
FYLSTRA ET AL.
in the Solver Options dialog box with a the spreadsheet at the optimal point,
default value of 1016. match the values provided by the LP solu-
Given that the model might contain any tion within the Precision value in the
of the hundreds of Excel built-in functions Solver Options dialog. As long as the user
as well as user-written functions and that selects the Use Automatic Scaling box, so
the test is performed at discrete points, that the values in the LP matrix are well
this test cannot be perfect; very occasion- scaled internally, this test should be robust
ally, a model with nonlinear, or even dis- even for poorly scaled models.
continuous functions, will pass the linear- Modeling Practice
ity test. In practice, however, this linearity Students (and instructors) who use Ex-
test almost always detects situations in cel 97, with its automatic scaling and its
which the user has accidentally set up a improved linearity test, can avoid the pit-
model that doesn’t satisfy the linearity as- falls described earlier. We strongly encour-
sumption—and truly linear models will age business school instructors to upgrade
always pass the linearity test, as long as to Excel 97 as soon as possible. Schools
they are well scaled. still using Windows 3.1 can obtain an aca-
Unfortunately, linear models that are demic version of Frontline Systems’ Pre-
poorly scaled will sometimes fail this test. mium Solver for Excel 5.0 with the same
Since the resulting error message is “The enhancements, but support for this 16-bit
conditions for Assume Linear Model are version will be limited in the future. Still,
not satisfied,” the user who is not con- we emphasize that, while we have used
scious of the effect of poor scaling may not scaling methods favored in the literature
realize that this is the problem. (The only [Gill, Murray, and Wright 1981], no auto-
saving grace is that very poorly scaled matic scaling method is perfect. It will al-
models, which might otherwise yield in- ways be possible to create examples that
correct answers in the absence of auto- cause problems in spite of automatic scal-
matic scaling, almost always give this er- ing, and we suggest that instructors de-
ror message instead.) vote at least some time to explaining the
In Excel 97, we have substantially re- limitations of finite precision computer
vised the linearity test. The Solver per- arithmetic to students. Ragsdale [1997] ad-
forms a quick check before solving the dresses scaling briefly but effectively, for
problem by verifying that the problem instance. The example model in Figure 5,
functions, evaluated at several multiples of which is available for download on Prac-
the initial variable values, satisfy the tice Online, is a poorly scaled variant of
above condition. If the problem fails this the Working Capital Management work-
test, the user is warned against using the sheet distributed with Excel. It will yield a
simplex method. When the Solver finds an nonoptimal solution (of all zeroes) in Excel
optimal solution using the simplex 5.0 and 7.0 and in Excel 97 if the Use Au-
method it performs a further check. It ver- tomatic Scaling box is cleared. It yields the
ifies that the objective function and con- correct solution in Excel 97 if the user
straint slacks, obtained by recalculating checks the Use Automatic Scaling box.
INTERFACES 28:5 40
MICROSOFT EXCEL SOLVER
Figure 5: This spreadsheet, which can be downloaded from Practice Online as FIGURE5.XLS, is
a poorly scaled model that “fools” the linearity test in earlier Excel versions, yielding the mes-
sage “The conditions for Assume Linear Model are not satisfied.”
September–October 1998 41
FYLSTRA ET AL.
ing was not very effective on typical non- the feasibility tolerance (Precision option),
linear spreadsheet models where scaling decreasing the convergence tolerance to
was a problem.) make it more difficult to terminate in
GRG2 Stopping Conditions phase one, trying central differences, and
Like the simplex method, the GRG2 al- trying other starting points.
gorithm will stop when it finds an optimal Nonsmooth Functions
solution, when the objective appears to be The convergence results for gradient-
unbounded, when it can find no feasible based methods, such as GRG2, depend on
solution, or when it reaches the time limit differentiability of the problem functions.
or maximum number of iterations. For The spreadsheet formula language is de-
nonlinear models, an “optimal solution” signed to express arbitrary calculations,
means that the Solver has found a local and users can easily create optimization
optimum where the Kuhn-Tucker condi- models that include nonsmooth functions,
tions are satisfied to within the conver- that is, functions with discontinuous val-
gence tolerance; the message displayed is ues or first partial derivatives at one or
“Solver found a solution.” GRG2 also more points. Examples of such functions
stops when the current solution meets a are ABS, MIN and MAX, INT and
“slow progress” test: The relative change ROUND, CEILING and FLOOR, and the
in the objective is less than the conver- commonly used IF, CHOOSE, and
gence tolerance for the last five iterations. LOOKUP functions. Expressions involving
In this case, the message displayed is relations (outside the context of Solver-
“Solver converged to the current solu- recognized constraints) and such Boolean
tion.” In previous Excel versions, the con- operators as AND, OR, and NOT are dis-
vergence tolerance was fixed at 1014 or continuous at their points of transition be-
1015 (depending on the version) and tween FALSE and TRUE values.
could not be changed by the user. In Excel The presence of any of these (or many
97, there is new Convergence edit box other) functions in a spreadsheet does not
(Figure 4) that sets this tolerance. necessarily mean that the optimization
The message “Solver could not find a model is nonsmooth. For example, an IF
feasible solution” occurs when the GRG2 function whose conditional expression is
algorithm terminates with a positive sum independent of the decision variables and
of infeasibilities. This almost always indi- whose result expressions are smooth is it-
cates a truly infeasible model, but with self smooth. Similar statements apply to
nonlinear problems this can occur (rarely) the other functions mentioned above.
in feasible problems if GRG2 finds a local Even if the problem is nonsmooth,
optimum of the phase one objective (the GRG2 may never encounter a point of dis-
sum of the infeasibilities) or if GRG2 sim- continuity. This depends on the path that
ply terminates in phase one due to slow the algorithm takes, which depends on the
progress. Remedies available through the starting point. GRG2 may simply skip
Solver Options dialog box (Figure 4) in- over a discontinuity or may never encoun-
clude using automatic scaling, increasing ter a region where discontinuities occur.
INTERFACES 28:5 42
MICROSOFT EXCEL SOLVER
Problems occur when the finite difference factors it uses depend on the initial values
process (which approximates partial deriv- of the variables. Users should take care to
atives) spans both sides of a discontinuity, start the solution process with values for
for then the estimated derivatives are the variable cells that are representative of
likely to be very large. If GRG2 is converg- the values expected at the optimal solu-
ing to a local solution where the objective tion, rather than with arbitrary values,
is nonsmooth, inaccurate derivative esti- such as all zeroes. The example spread-
mates near the solution are likely to cause sheet in Figure 6, which is available for
it to oscillate about that point and to ter- download on Practice Online, is an Excel
minate because of a small fractional version of a product-mix and pricing
change in the objective. model from Fylstra [1992]. If the model is
Modeling Practice solved with initial values of zero for all
The path GRG2 takes and the scaling four variables, GRG2 stops immediately,
Figure 6: This spreadsheet, which can be downloaded from Practice Online as FIGURE6.XLS,
causes the GRG2 nonlinear solver to stop at a nonoptimal solution if the initial values of all
variables are zero. GRG2 finds the correct optimal solution for initial variable values that make
the profits per unit positive.
September–October 1998 43
FYLSTRA ET AL.
declaring this point to be an “optimal so- Figure 7, also available for download on
lution” (in fact, this point is a Kuhn- Practice Online, is a variant of the Quick
Tucker point). With initial values that Tour worksheet distributed with Excel. If
make each quantity to build and the profit this model is solved in Excel 97 with the
per unit positive, GRG2 finds the correct default convergence tolerance of 1014, the
optimal solution. Alternatively, if one Solver stops with the message “Solver
changes the constraint that requires pro- converged to the current solution” and an
duction to be less than or equal to demand objective value of $79,705.55, just short of
to an equality constraint, GRG2 is able to the true optimum. If the convergence tol-
find the correct solution even with initial erance is tightened to 1015, the Solver
values of zero, since it can solve for certain stops with “Solver found a solution” and
variables in terms of others. an objective value of $79,705.62. (In Excel
We encourage users who encounter dif- 5.0 and 7.0, solving this model yields the
ficulty with slow progress or who receive optimal objective of $79,705.62, because
the message “Solver converged to the cur- the convergence tolerance is hard-wired in
rent solution” to upgrade to Excel 97, these versions to 1015.)
which allows them to control the conver- GRG2 uses the value in the Precision
gence tolerance. The example model in edit box shown in Figure 4 (default 1016)
Figure 7: This spreadsheet, which can be downloaded from Practice Online as FIGURE7.XLS,
shows how the GRG2 nonlinear solver can stop with the message “Solver converged to the cur-
rent solution.” With a tighter convergence tolerance, it stops at a slightly better, optimal point
with the message “Solver found a solution.”
INTERFACES 28:5 44
MICROSOFT EXCEL SOLVER
for its feasibility tolerance. Constraints are The branch-and-bound algorithm starts
classified as active when they are within by solving the relaxed problem (without
this (absolute) tolerance of one of their the integer constraints) using either GRG2
bounds and are violated when their bound or the simplex method, yielding an initial
violation exceeds this tolerance. The de- best bound for the problem including the
fault value is rather tight for nonlinear integer constraints. The algorithm then be-
problems, and users may find that they gins branching and solving subproblems
can solve some problems with nonlinear with additional (or tighter) bounds on the
constraints faster or even to a better result integer variables. A subproblem whose so-
if they increase this value. We recommend lution satisfies all of the integer constraints
1014 for nonlinear problems but caution is a candidate for the solution of the over-
against using values greater than 1012. all problem; the candidate with the best
Users requiring high accuracy may prefer objective value so far is saved as the in-
the default value. For nonlinear problems, cumbent. The algorithm uses the best ob-
maximum accuracy results from choosing jective of the remaining nodes to be fath-
central differences and the default feasibil- omed to update the best bound. Each time
ity tolerance. the algorithm finds a new incumbent, it
When a model is nonsmooth or noncon- computes the relative difference between
vex, we recommend trying several differ- its objective and the current best bound,
ent starting points. If GRG2 reaches yielding an upper bound on the improve-
roughly the same final point, one can be ment in the objective that might be ob-
fairly confident that this is a global solu- tained by continuing the solution process:
tion. If not, one can choose the best of the
Objective(Incumbent) 1 Objective(BestBound)
solutions obtained. .
Objective(BestBound)
For further information on reduced gra-
dient methods and the GRG2 solver, see If this value is less than or equal to the
Lasdon and Smith [1992]. Tolerance edit box value (Figure 4), the al-
Solving Problems with Integer gorithm stops. Some users have failed to
Constraints notice that the default tolerance amount is
When a problem includes integer vari- not zero but 0.05 and have therefore con-
ables, the Excel Solver invokes a branch- cluded that the Excel Solver was not find-
and-bound (B&B) algorithm that can use ing the correct integer solution. We chose
either the simplex method or GRG2 to this default value, at Microsoft’s request,
solve its subproblems. The user indicates to limit the time taken by nontrivial inte-
which of the decision variables are integer ger problems. It often happens that the
by adding constraints, such as A1:A10 4 branch-and-bound algorithm finds a rea-
integer (or, in Excel 97, A1:A10 4 binary), sonably good solution fairly quickly and
where A1:A10 is a range of variable cells. then spends a great deal of time finding
(One enters such constraints by selecting (or verifying that it has found) the true in-
“int” or “bin” from the Relation list in the teger optimal solution.
Add or Change Constraints dialog box.) In the standard Excel Solver, the branch-
September–October 1998 45
FYLSTRA ET AL.
INTERFACES 28:5 46
MICROSOFT EXCEL SOLVER
Figure 8: The Solver Results dialog box is displayed whenever the Solver stops. It allows the
user to keep the solution or restore the original values of the variable cells and produce one or
more of the Solver’s reports.
September–October 1998 47
FYLSTRA ET AL.
Figure 9: The Answer Report summarizes the initial and final values of the variables, con-
straints, and objective and indicates whether the constraints are binding (satisfied with equal-
ity) or have slack.
specified it for competitive reasons, since report values are automatically formatted
the former Lotus-developed solver in 1-2-3 with dollars and cents, percent symbols,
featured a similar report. scientific notation, or whatever custom
Report Pitfalls formatting was used in the model. The pit-
There are two pitfalls that users some- fall arises when users format their models
times encounter with these reports. The to display variable and constraint values
more common problem arises from the rounded to integers (say), which causes
fact that the report spreadsheets are con- the corresponding dual values to be for-
structed so that each cell “inherits” its for- matted as integers also. Not realizing this,
matting from the corresponding cell in the some users think that the dual values are
user’s model. This feature, which Micro- wrong. However, the Solver stores the
soft specified, has the advantage that the dual values to full precision on the report
INTERFACES 28:5 48
MICROSOFT EXCEL SOLVER
Figure 10: The Sensitivity Report shows, for linear problems, reduced costs for the variables
and shadow prices for the constraints, as well as the ranges of validity of these dual values.
Figure 11: The Limits Report shows the objective value obtained by maximizing and minimiz-
ing each variable in turn while holding the other variables’ values constant.
September–October 1998 49
FYLSTRA ET AL.
spreadsheet; one can inspect each value by form the label that appears for that cell in
selecting it with the mouse, and one can the report.
easily reformat the values to whatever pre- Users should avoid the pitfalls cited
cision one desires. above. Because the default formatting for
The second pitfall relates only to the cells is general, report values will appear
Sensitivity Report. The Excel Solver recog- to full precision unless the user defines
nizes constraints that are simple bounds custom formatting for the variable or con-
on the variables and passes them in this straint cells. If one wants such formatting,
form to both the simplex and GRG2 op- one must simply bear in mind its effect on
timizers, where they are handled more ef- the reports. To see the dual values for sim-
ficiently than if they were included as gen- ple variable bounds in the Constraints sec-
eral constraints. If one of these constraints tion of the Sensitivity Report, one can
is binding at the solution this actually modify the constraint right-hand side to
means that the corresponding decision be (say) the formula 0 ` 5 rather than the
variable has been driven to its bound. The constant 5. In this case, the Solver will not
dual value for this binding constraint will recognize the constraint as a simple vari-
appear as a reduced cost for the decision able bound. In Frontline Systems’ Pre-
variable, rather than as a shadow price for mium Solver products, we changed this
the constraint; it will be nonzero if the report so that dual values always appear
variable was nonbasic at the solution. (In in the Constraints section of the report,
fact, constraints that are simple bounds on even for constraints that are recognized as
the variables are never listed in the Con- simple variable bounds, making this
straints section of the Sensitivity Report.) work-around unnecessary.
We encourage modelers to take advan- Use of the Solver in Industry
tage of the fact that the reports are spread- We have heard many opinions about
sheets. Not only can they view them but use of the Excel Solver from OR/MS pro-
they can easily modify them, use them to fessionals. Many view spreadsheet solvers
draw charts and graphs, transfer them to as suitable only for quite small problems
other programs, or inspect them using Vi- or only for educational rather than indus-
sual Basic programs. Since the reports trial use. Some wonder how such tools can
show a text label as well as a cell reference be successfully employed by individuals
for each variable and constraint, users can with little if any formal training in
easily design their spreadsheet models so OR/MS methods. Some, seeing little usage
that meaningful labels appear on the re- of the Excel Solver among their colleagues,
ports. The algorithm for constructing these think that the Solver is widely distributed
labels is very simple: starting from the but not very widely used.
variable or constraint cell on the model We do not have enough systematic data
worksheet, the Solver looks left and up for to project the actual number of users of
the first text label in the same row and the Excel Solver among the 30-million-plus
the first text label in the same column. It copies of Microsoft Office and Excel dis-
then concatenates these two labels to tributed to date. But based on our contacts
INTERFACES 28:5 50
MICROSOFT EXCEL SOLVER
with users and the data we do have, we the textbooks that we feature on the Front-
believe that OR/MS professionals are see- line Systems’ Web site). In other cases,
ing only the proverbial tip of the iceberg these spreadsheet optimization models are
and that use of the Excel Solver is far created by outside consultants with indus-
more widespread than their comments try expertise, rather than OR/MS expertise
would suggest. per se.
Problem Size OR/MS Training
Having worked with commercial users Every day we see successful Solver ap-
for more than five years, we are very con- plications created by spreadsheet users
fident that spreadsheet solvers are capable with little or no formal OR/MS training.
of solving the majority of industrial LP Users of Frontline Systems’ Premium
models, as well as many integer and non- Solver products are typically solving LP
linear models. We base this belief on our models in the range of several hundred to
own experience and on information about a few thousand (some as large as 10,000)
problem size gained in discussions with decision variables and constraints and in-
other vendors of (non-spreadsheet-based) teger and nonlinear problems of some-
optimization software. In fact, we believe what smaller size. Although this group is
that the median-size industrial LP model self-selected for applications more ambi-
is smaller than many OR/MS profession- tious than those built with the standard
als might expect—possibly as small as Excel Solver, we estimate that 90 to 95 per-
2,000 rows and columns. Spreadsheet op- cent of these users have no affiliation with
timizers can readily handle problems well the OR/MS community. They are clearly
above this size. “dispersed practitioners” [Geoffrion 1991].
Model Developers Yet this is just another layer of the ice-
OR/MS professionals usually create op- berg. A much larger number of Excel
timization models in situations where the Solver users visit Frontline Systems’ World
modeling task is challenging enough and Wide Web site (www.frontsys.com), which
the economic value of the problem is large receives more than 10,000 “hits” per day.
enough to justify expert consulting help. We have some survey data on these users
These problems are often much larger than that indicate that a surprising number of
our median size estimate. But this is a tiny Solver applications are below 200 vari-
part of the spectrum of optimization appli- ables in size but are of sufficient value that
cations that we see. Many spreadsheet their developers are planning to distribute
models are straightforward, successful copies of these applications within their
adaptations of classic forms, such as trans- organizations or commercially. This
portation, blending, multiperiod inventory, survey data and our experience in techni-
and portfolio-optimization problems. cal support lead us to believe that this
These models are created by functional class of applications is at least five
managers who base them on the examples times and perhaps 10 times larger than
supplied with Excel or found in various the class of applications above 200
books (indeed, such users often seek out variables.
September–October 1998 51
FYLSTRA ET AL.
Still deeper in the iceberg are the return on investment in such application
smaller-size spreadsheet solver applica- projects is extremely high.
tions that are developed for use within Use of the Solver in Education
only one department or office and not for Spreadsheets have become the preferred
redistribution. These users may well find tool for teaching quantitative methods to
that the standard Excel Solver, Microsoft undergraduate and graduate business stu-
technical support, and the variety of trade dents. Their use is strongly endorsed in a
books about Excel meet all of their needs. recent report of the operating subcommit-
We believe that this group is the largest of tee of the INFORMS Business School Edu-
all, but we are unable to estimate its size. cation Task Force [Jordan et al. 1997]. In
In any case, we are reasonably certain that July 1994, the presidents of ORSA and
OR/MS professionals collectively are in- TIMS, Dick Larson and Gary Lilien, char-
volved in, at most, a fraction of one per- tered the INFORMS Business School Edu-
cent of the Excel Solver applications actu- cation Task Force in response to the de-
ally in use. cline of OR/MS content in business
Economic Value education that began in the early ’90s. The
Small optimization models may yield task force’s survey of business school
high economic value. In one case, a For- OR/MS faculty (306 responses) revealed
tune 50 company (which prefers to remain that many faculty members planned to in-
anonymous) used the standard Excel crease their use of spreadsheets (Table 2)
Solver to build a purchasing logistics to strengthen the role of OR/MS in their
model used in negotiating contracts for MBA programs.
over a billion dollars worth of a single The subcommittee also conducted struc-
commodity. This model, whose size was a tured telephone interviews with program
function of the number of supplier loca- administrators at 21 of the leading MBA
tions and company plants, fit within the programs in the US. One of the questions
200-variable limit of the standard Solver. they asked was “What particular sets of
Savings from use of this model amounted quantitative skills are in greatest demand
to nearly $3 million in the first round of from employers of your graduates?” The
purchasing negotiations and the company interpretation of responses was “Demand
estimates future savings of $7 million per for particular ‘hard’ OR/MS skills is very
year. A major difference from the OR/MS low. Where technique is needed, it in-
successes of the 1970s was the time and ef- volves statistics more than OR/MS. There
fort required to formulate, test, and gain is demand for general skill in model for-
acceptance of this model. One individual, mulation and interpretation and in quanti-
with no formal OR/MS training, com- tative reasoning.” A related question was
pleted the entire project in three person- “What level of competence is appropriate
months, with about one month spent on for MBAs?” and it had the summarized re-
the actual optimization model. The result- sponse “MBAs need to be able to use
ing spreadsheet is operated directly by the spreadsheets and statistical software at the
senior vice president of purchasing. The level of the ‘educated consumer.’ ”
INTERFACES 28:5 52
MICROSOFT EXCEL SOLVER
Which of the following “fixes” have the highest potential to strengthen the role of MS/OR
in your particular school of business?
More use of cases and real-world examples 60
More emphasis on modeling skills and numeracy and less on algorithms 55
Better math background for students 49
Use of spreadsheets instead of special purpose OR/MS software 39
What changes are you planning to make in your MS/OR course in the near future?
More emphasis on modeling and less on the teaching of algorithms 55
Increasing the role of the computer in the course 43
More use of spreadsheets in the course 37
More case analyses 34
Table 2: Two questions and the most often selected responses from the INFORMS Business
School Education Task Force’s 1997 survey of business school OR/MS faculty (306 respon-
dents).
The authors of the report conclude that examples. All use the Excel Solver for op-
OR/MS courses in business schools timization, and several use spreadsheet
should focus on common, realistic busi- add-ins for decision tree analysis and
ness situations, acknowledge important Monte Carlo simulation. All include a disk
nonmathematical issues, use spreadsheets, containing a complete set of spreadsheet
and emphasize model formulation and files, bundled with the text and intended
assessment more than model structuring. for student use, and an instructor’s disk or
Recommendations include the following: CD-ROM containing spreadsheets for each
embed analytical material strongly in a problem and case. Some contain a shell
business context; use spreadsheets as a de- version of the instructor spreadsheets, in
livery vehicle for OR/MS algorithms; and which the members and formulas are
stress the development of general model- omitted. These greatly ease the instructor’s
ing skills. task of grading many spreadsheets, espe-
There are now strong trends in these di- cially when he or she uses the grading
rections, most of which began well before macros that are provided for some
the INFORMS report appeared. They are problems.
most prominent in the form of new text- In the introductions to these texts, the
books for the basic OR/MS course for un- authors advocate a course based on learn-
dergraduate or graduate business stu- ing modeling by doing examples. They in-
dents. Such texts include those of Hesse clude many traditional examples from the
[1997], Ragsdale [1997], Winston and operations management area of business:
Albright [1997], a revision of the Eppen production and inventory planning, distri-
and Gould text [Eppen et al. 1998], and a bution inventory models, and so forth. In
book by Sam Savage [1997]. The authors addition, they include problems from fi-
use spreadsheet models as the focus nance (portfolio selection, options pricing,
around which they base all discussion and cash management), and marketing (sales-
September–October 1998 53
FYLSTRA ET AL.
force allocation). Problems in finance and pend on the variables), could be used to
marketing are often of more interest to express these concepts directly. In the fu-
MBA students than the traditional opera- ture, we would like to support the creation
tions examples. of optimization models using as much of
Outside the traditional OR/MS course, the full power of the spreadsheet formula
new texts are also appearing with a focus language as possible. To do this, we expect
on spreadsheets. For example, the market- to perform more analysis and transforma-
ing textbook by Lilien and Rangaswamy tion of the spreadsheet formulas, obtaining
[1997] includes 17 models in Excel, most the Jacobian matrix through a combination
using the Solver, controlled by the au- of automatic differentiation of the most
thors’ programs written in Visual Basic for common operators and functions and the
Applications. selective use of finite differences for oth-
For more on configuring a successful ers. We are also considering approaches to
OR/MS course for business students see global optimization and heuristics and al-
the articles by Bodily [1996] and Powell gorithmic methods that yield good solu-
[1995] and many other articles in the tions that may not be provably optimal
“Teachers forum” section of Interfaces. (for example, clustering methods, genetic
Conclusions and Directions algorithms, and simulated annealing),
for Future Work since our users have clearly indicated their
We designed the Excel Solver to “make interest in such methods.
optimization a feature of spreadsheets.” Spreadsheets, such as Excel, have be-
Where OR/MS professionals tend to see it come so ubiquitous that they serve as a
as simply another tool for doing optimiza- kind of lingua franca for quantitative
tion, managers in industry tend to see it as models, understood by nearly every deci-
an extension of spreadsheet technology sion maker in industry, government, and
that enables them to solve resource- education. Because of this universality,
allocation problems in a new way, in their spreadsheet software has become an excel-
own work groups, without outside help. lent delivery vehicle for such OR/MS
Our most important direction for future techniques as optimization, as the Excel
work is to extend the range of optimiza- Solver clearly demonstrates. We encourage
tion problems that managers can solve OR/MS professionals to gain experience
without special OR/MS training or out- with these tools and explore the world of
side help. Classical linear and smooth non- spreadsheet-based problem solving that
linear functions are too restrictive for continues to grow outside the traditional
many of the problems our users want to boundaries of the field.
solve. The use of integer variables and We also encourage OR/MS profession-
special constraints to express such con- als to communicate with Microsoft and
structs as fixed charges and either-or con- with Frontline Systems about their desires
ditions is unnecessarily complex for users; for the Excel Solver. E-mail is the preferred
familiar spreadsheet functions, such as IF, method: Microsoft welcomes feedback on
CHOOSE, and LOOKUP (which may de- the Solver and other Excel features sent to
INTERFACES 28:5 54
MICROSOFT EXCEL SOLVER
September–October 1998 55