12.10 Nonconvex Programming (With Spreadsheets)
12.10 Nonconvex Programming (With Spreadsheets)
FIGURE 12.18
The profit graph for a
nonconvex programming
example.
problem since a little analysis is required to verify that the objective function is not
concave over the feasible region. Therefore, suppose that the Excel Solver, which is designed
for solving convex programming problems, is applied to this example. Figure 12.19
demonstrates what a difficult time the Excel Solver has in attempting to cope with this
changing cell and Profit (C8) as the target cell. (Note that the Solver option, Assume
Linear Model, is not chosen in this case because this is not a linear programming model.)
When x _ 0 is entered as the initial value in the changing cell, the left spreadsheet in
Fig. 12.19 shows that the solver then indicates that x _ 0.371 is the optimal solution with
Profit _ $3.19. However, if x _ 3 is entered as the initial value instead, as in the middle
spreadsheet in Fig. 12.19, Solver obtains x _ 3.126 as the optimal solution with Profit _ $6.13.
Trying still another initial value of x _ 4.7 in the right spreadsheet, Solver now indicates an
optimal solution of x _ 5 with Profit _ $0. What is going on here?
Figure 12.18 helps to explain Solvers difficulties with this problem. Starting at x _ 0,
the profit graph does indeed climb to a peak at x _ 0.371, as reported in the left spreadsheet
of Fig. 12.19. Starting at x _ 3 instead, the graph climbs to a peak at x _ 3.126, which is the
solution found in the middle spreadsheet. Using the right spreadsheets starting solution of
x _ 4.7, the graph climbs until it reaches the boundary imposed by the x _ 5 constraint, so
x _ 5 is the peak in that direction. These three peaks are the local maxima (or local optima)
because each one is a maximum of the graph within a local neighborhood of that point. However,
only the largest of these local maxima is the global maximum, that is, the highest point
on the entire graph. Thus, the middle spreadsheet in Fig. 12.19 did succeed in finding the
globally optimal solution at x _ 3.126 with Profit _ $6.13.
The Excel Solver uses the generalized reduced gradient method, which adapts the gradient
search method described in Sec. 12.5 to solve convex programming problems. Therefore,
this algorithm can be thought of as a hill-climbing procedure. It starts at the initial solution
entered into the changing cells and then begins climbing that hill until it reaches the peak (or
is blocked from climbing further by reaching the boundary imposed by the constraints). The
procedure terminates when it reaches this peak (or boundary) and reports this solution. It has
no way of detecting whether there is a taller hill somewhere else on the profit graph.
The same thing would happen with any other hill-climbing procedure, such as SUMT
(described in Sec. 12.9), that stops when it finds a local maximum. Thus, if SUMT were
to be applied to this example with each of the three initial trial solutions used in Fig. 12.19,
it would find the same three local maxima found by the Excel Solver.
A More Systematic Approach to Finding Local Optima
A common approach to easy nonconvex programming problems is to apply some algorithmic
hill-climbing procedure that will stop when it finds a local maximum and then to restart
it a number of times from a variety of initial trial solutions (either chosen randomly or as a
systematic cross-section) in order to find as many distinct local maxima as possible. The best
of these local maxima is then chosen for implementation. Normally, the hill-climbing procedure
is one that has been designed to find a global maximum when all the assumptions of convex
programming hold, but it also can operate to find a local maximum when they do not.
When employing the Excel Solver, a systematic way of applying this approach is to
use the Solver Table add-in that is provided in your OR Courseware. To demonstrate, we
will continue to use the spreadsheet model shown in Fig. 12.19. Figure 12.20 displays how
the Solver Table is used to try six different starting points (0, 1, 2, 3, 4, and 5) as the
initial trial solutions for this model by executing the following steps. In the first row of the
table, enter formulas that refer to the changing cell, x (C5), and the target cell, Profit (C8).
The different starting points are entered in the first column of the table (G8:G13). Then,
select the entire table (G7:I13) and choose Solver Table from the Add-Ins tab (for Excel
2007) or the Tools menu (for earlier versions of Excel). The column input cell entered in
the Solver Table dialogue box is the changing cell x (C5), since this is where we want the
different starting points in the first column of the table to be entered. (No row input cell is
entered in this dialogue box since only a column is being used to list the starting points.)
Clicking OK then causes the Solver Table to re-solve the problem for all these starting
points in the first column and fill in the corresponding results (the local maximum for x
and Profit referred to in the first row) in the other columns of the table.
The example has only one variable and so only one changing cell. However, the Solver
Table also can be used to try multiple starting points for problems with two variables (changing
cells). This is done by using the first row and first column of the table to specify different
starting points for the two changing cells. Enter an equation referring to the
target cell in the upper left-hand corner of the table. Select the entire table and choose Solver
Table from the Add-Ins tab or Tools menu, with the two changing cells selected as the column
input cell and row input cell. The Solver Table then re-solves the problem for each combination
of starting points of the two changing cells and fills in the body of the table with the
objective function value of the solution that is found (a local optimum) for each of these combinations.
(See Sec. 6.8 for more details about setting up a two-dimensional Solver Table.)
For problems with more than two variables (changing cells), this same approach still
can be used to try multiple starting points for any two of the changing cells at a time.
However, this becomes a very cumbersome way of trying a broad range of starting points
for all the changing cells when there are more than three or four of these cells.
Unfortunately, there generally is no guarantee of finding a globally optimal solution,
no matter how many different starting points are tried. Also, if the profit graphs are not
smooth (e.g., if they have discontinuities or kinks), then Solver may not even be able to
find local optima. Fortunately, Excels Premium Solver provides another search procedure,
called Evolutionary Solver, to attempt to solve these somewhat more difficult nonconvex
programming problems.
Evolutionary Solver
Frontline Systems, the developer of the standard Solver included with Excel, has developed
Premium versions of Solver. One version of Premium Solver (Premium Solver for
Education) is available in your OR courseware (but not included with standard Excel).
Every version of Premium Solver, including this one, adds a search procedure called
Evolutionary Solver in the set of tools available to search for an optimal solution for a
model. The philosophy of Evolutionary Solver is based on genetics, evolution, and the
survival of the fittest. Hence, this type of algorithm is sometimes called a genetic
algorithm. We will devote Sec. 13.4 to describing how genetic algorithms operate.
Evolutionary Solver has three crucial advantages over the standard Solver (or any other
convex programming algorithm) for solving nonconvex programming problems. First, the
complexity of the objective function does not impact Evolutionary Solver. As long as the
function can be evaluated for a given trial solution, it does not matter if the function has
kinks or discontinuities or many local optima. Second, the complexity of the given constraints
(including even nonconvex constraints) also doesnt substantially impact Evolutionary
Solver (although the number of constraints does). Third, because it evaluates whole
populations of trial solutions that arent necessarily in the same neighborhood as the current
best trial solution, Evolutionary Solver keeps from getting trapped at a local optimum.
In fact, Evolutionary Solver is guaranteed to eventually find a globally optimal solution for
any nonlinear programming problem (including nonconvex programming problems), if it
is run forever (which is impractical of course). Therefore, Evolutionary Solver is well suited
for dealing with many relatively small nonconvex programming problems.
On the other hand, it must be pointed out that Evolutionary Solver is not a panacea.
First, it can take much longer than the standard Solver to find a final solution. Second,
Evolutionary Solver does not perform well on models that have many constraints. Third,
Evolutionary Solver is a random process, so running it again on the same model usually
will yield a different final solution. Finally, the best solution found typically is not quite
optimal (although it may be very close). Evolutionary Solver does not continuously move
toward better solutions. Rather it is more like an intelligent search engine, trying out different
random solutions. Thus, while it is quite likely to end up with a solution that is
very close to optimal, it almost never returns the exact globally optimal solution on most
types of nonlinear programming problems. Consequently, if often can be beneficial to run
the standard Solver (GRG Nonlinear option) after the Evolutionary Solver, starting with the
final solution obtained by the Evolutionary Solver, to see if this solution can be improved
by searching around its neighborhood