that when n is 12, the number of constraints is over 2000, not to mention that we would
find it very tedious to enter those constraints. The empirical finding seems to be that
only a very small fraction of the number of potential constraints is ever really
needed to obtain an optimal solution using the iterative procedure we have illustrated.
In our example, which contained six cities, we would have needed 25 constraints to
guarantee an optimal solution with one model, but we found that we needed only
four constraints when we implemented the one-at-a-time approach. (Most six-city pro-
blems require fewer than that.) Problems with 12, 15, or even 20 cities are usually
within the reach of spreadsheet-based solution approaches because the relatively
small number of elimination constraints actually needed is well within Solver’s
limits. The limiting factor is the time required to solve the necessary series of integer
programs en route to a final solution.
Applications of the TSP occur frequently in manufacturing and logistics, and
some very powerful solution methods, tailored to the TSP, have been developed for
repeated use or for tackling especially large versions. The main purpose here is to illus-
trate a complex logical constraint (the tour requirement) and to demonstrate that it is
possible to apply integer programming techniques effectively for nontrivial problem
sizes. Large-scale applications require prohibitive amounts of time from Solver, and
in those cases, it would be necessary to look elsewhere for a method specialized to
the TSP.
SUMMARY
The ability to treat variables as integer-valued, and, in particular, the ability to designate certain
variables as binary, opens up a wide variety of optimization models that can be addressed with
Solver. As illustrated in Chapters 6 and 7, Solver’s branch and bound capability can handle three
broad types of models.
†
The first type is one that resembles a linear program but with the requirement that certain
variables must be integer valued. In Solver, this requirement is added as a constraint.
†
The second type is one in which certain decisions exhibit an all-or-nothing structure,
reflecting actions that are indivisible. This is a role for a binary variable, which is
simply an integer-valued variable no less than zero and no greater than one. Such a vari-
able allows us to model the occurrence of yes/no choices and to use Solver, provided
that the structure of the model is linear in all other respects.
†
The third type is one in which binary variables are used to capture certain logical con-
straints in linear form. We don’t often think of logical constraints as being so closely
related to the inequalities of linear programs, so it takes some modeling practice to
appreciate how to make this connection. As the examples illustrate, binary variables
are useful in representing linking constraints for fixed costs, disjunctive constraints
for sequencing problems, and tour constraints for routing problems.
The categories that rely on binary variables include a number of well known combinatorial
problems. For many of these problems, large instances can take a great deal of time to solve,
282 Chapter 7 Integer Programming: Logical Constraints