Professional Documents
Culture Documents
Modeling with
LINGO
Sixth Edition
Preliminary
Edition
TRADEMARKS
WhatsBest! and LINDO are registered trademarks and LINGO is a trademark of LINDO Systems,
Inc. Other product and company names mentioned herein are the property of their respective owners.
Contents
Preface .................................................................................................................................. xiii
Acknowledgments................................................................................................................xiii
1 What Is Optimization? ......................................................................................................... 1
1.1 Introduction ...................................................................................................................... 1
1.2 A Simple Product Mix Problem........................................................................................ 1
1.2.1 Graphical Analysis .................................................................................................... 2
1.3 Linearity ........................................................................................................................... 5
1.4 Analysis of LP Solutions .................................................................................................. 6
1.5 Sensitivity Analysis, Reduced Costs, and Dual Prices.................................................... 8
1.5.1 Reduced Costs ......................................................................................................... 8
1.5.2 Dual Prices................................................................................................................ 8
1.6 Unbounded Formulations ................................................................................................ 9
1.7 Infeasible Formulations ................................................................................................. 10
1.8 Multiple Optimal Solutions and Degeneracy ................................................................. 11
1.8.1 The Snake Eyes Condition ................................................................................... 13
1.8.2 Degeneracy and Redundant Constraints................................................................ 16
1.9 Nonlinear Models and Global Optimization ................................................................... 17
1.10 Problems...................................................................................................................... 18
2 Solving Math Programs with LINGO ................................................................................ 23
2.1 Introduction .................................................................................................................... 23
2.2 LINGO for Windows....................................................................................................... 23
2.2.1 File Menu ................................................................................................................ 23
2.2.2 Edit Menu ................................................................................................................ 25
2.2.3 LINGO Menu ........................................................................................................... 27
2.2.4 Windows Menu ....................................................................................................... 28
2.2.5 Help Menu............................................................................................................... 29
2.2.6 Summary................................................................................................................. 29
2.3 Getting Started on a Small Problem .............................................................................. 29
2.4 Integer Programming with LINGO ................................................................................. 30
2.4.1 Warning for Integer Programs................................................................................. 32
2.5 Solving an Optimization Model ...................................................................................... 32
2.6 Problems........................................................................................................................ 33
3 Analyzing Solutions ........................................................................................................... 35
3.1 Economic Analysis of Solution Reports......................................................................... 35
3.2 Economic Relationship Between Dual Prices and Reduced Costs............................... 35
3.2.1 The Costing Out Operation: An Illustration ............................................................. 36
3.2.2 Dual Prices, LaGrange Multipliers, KKT Conditions, and Activity Costing ............. 37
3.3 Range of Validity of Reduced Costs and Dual Prices ................................................... 38
3.3.1 Predicting the Effect of Simultaneous Changes in ParametersThe 100% Rule . 43
3.4 Sensitivity Analysis of the Constraint Coefficients......................................................... 44
iii
iv
Table of Contents
3.5 The Dual LP Problem, or the Landlord and the Renter................................................. 45
3.6 Problems........................................................................................................................ 47
Table of Contents
vi
Table of Contents
8.9.4 Fleet Routing and Assignment.............................................................................. 168
8.9.5 Fleet Assignment .................................................................................................. 171
8.9.6 Leontief Flow Models ............................................................................................ 176
8.9.7 Activity/Resource Diagrams.................................................................................. 178
8.9.8 Spanning Trees..................................................................................................... 180
8.9.9 Steiner Trees......................................................................................................... 182
8.10 Nonlinear Networks ................................................................................................... 186
8.11 Problems.................................................................................................................... 188
Table of Contents ix
13.7.2 Portfolio Matching, Tracking, and Program Trading ........................................... 398
13.8 Methods for Constructing Benchmark Portfolios ....................................................... 399
13.8.1 Scenario Approach to Benchmark Portfolios ...................................................... 402
13.8.2 Efficient Benchmark Portfolios ............................................................................ 404
13.8.3 Efficient Formulation of Portfolio Problems......................................................... 405
13.9 Cholesky Factorization for Quadratic Programs........................................................ 407
13.10 Problems.................................................................................................................. 409
14 Multiple Criteria and Goal Programming ..................................................................... 411
14.1 Introduction ................................................................................................................ 411
14.1.1 Alternate Optima and Multicriteria ...................................................................... 412
14.2 Approaches to Multi-criteria Problems ...................................................................... 412
14.2.1 Pareto Optimal Solutions and Multiple Criteria ................................................... 412
14.2.2 Utility Function Approach .................................................................................... 412
14.2.3 Trade-off Curves ................................................................................................. 413
14.2.4 Example: Ad Lib Marketing ................................................................................. 413
14.3 Goal Programming and Soft Constraints................................................................... 416
14.3.1 Example: Secondary Criterion to Choose Among Alternate Optima .................. 417
14.3.2 Preemptive/Lexico Goal Programming ............................................................... 419
14.4 Minimizing the Maximum Hurt, or Unordered Lexico Minimization ........................... 422
14.4.1 Example .............................................................................................................. 423
14.4.2 Finding a Unique Solution Minimizing the Maximum.......................................... 423
14.5 Identifying Points on the Efficient Frontier................................................................. 428
14.5.1 Efficient Points, More-is-Better Case.................................................................. 428
14.5.2 Efficient Points, Less-is-Better Case .................................................................. 430
14.5.3 Efficient Points, the Mixed Case ......................................................................... 432
14.6 Comparing Performance with Data Envelopment Analysis....................................... 433
14.7 Problems.................................................................................................................... 438
15 Economic Equilibria and Pricing .................................................................................. 441
15.1 What is an Equilibrium?............................................................................................. 441
15.2 A Simple Simultaneous Price/Production Decision ................................................... 442
15.3 Representing Supply & Demand Curves in LPs........................................................ 443
15.4 Auctions as Economic Equilibria ............................................................................... 447
15.5 Multi-Product Pricing Problems ................................................................................. 451
15.6 General Equilibrium Models of An Economy............................................................. 455
15.7 Transportation Equilibria............................................................................................ 457
15.7.1 User Equilibrium vs. Social Optimum ................................................................. 461
15.8 Equilibria in Networks as Optimization Problems...................................................... 463
15.8.1 Equilibrium Network Flows.................................................................................. 465
15.9 Problems.................................................................................................................... 467
16 Game Theory and Cost Allocation ............................................................................... 471
16.1 Introduction ................................................................................................................ 471
16.2 Two-Person Games................................................................................................... 471
16.2.1 The Minimax Strategy ......................................................................................... 472
16.3 Two-Person Non-Constant Sum Games................................................................... 474
Table of Contents
16.3.1 Prisoners Dilemma............................................................................................. 475
16.3.2 Choosing a Strategy ........................................................................................... 476
16.3.3 Bimatrix Games with Several Solutions.............................................................. 479
16.4 Nonconstant-Sum Games Involving Two or More Players ....................................... 481
16.4.1 Shapley Value..................................................................................................... 483
16.5 The Stable Marriage/Assignment Problem................................................................ 483
16.5.1 The Stable Room-mate Matching Problem......................................................... 487
16.6 Problems.................................................................................................................... 490
Table of Contents xi
18.4.2 Evaluating Service Centralization via the Erlang C Model ................................. 538
18.4.3 A Mixed Service/Inventory System via the M/G/f Model ................................... 539
18.4.4 Optimal Number of Repairmen via the Finite Source Model. ............................. 540
18.4.5 Selection of a Processor Type via the M/G/1 Model .......................................... 541
18.4.6 Multiple Server Systems with General Distribution, M/G/c & G/G/c ................... 543
18.5 Critical Assumptions and Their Validity ..................................................................... 545
18.6 Networks of Queues .................................................................................................. 545
18.7 Designer Queues....................................................................................................... 547
18.7.1 Example: Positive but Finite Waiting Space System .......................................... 547
18.7.2 Constant Service Time. Infinite Source. No Limit on Line Length ...................... 550
18.7.3 Example Effect of Service Time Distribution....................................................... 550
18.8 Problems.................................................................................................................... 553
19 Design & Implementation of Optimization-Based Decision Support Systems........ 555
19.1 General Structure of the Modeling Process .............................................................. 555
19.1.1 Developing the Model: Detail and Maintenance ................................................. 556
19.2 Verification and Validation ......................................................................................... 556
19.2.1 Appropriate Level of Detail and Validation.......................................................... 556
19.2.2 When Your Model & the RW Disagree, Bet on the RW...................................... 557
19.2.3 Should We Behave Non-Optimally? ................................................................... 558
19.3 Separation of Data and System Structure................................................................. 558
19.3.1 System Structure ................................................................................................ 559
19.4 Marketing the Model .................................................................................................. 559
19.4.1 Reports................................................................................................................ 559
19.4.2 Report Generation in LINGO .............................................................................. 563
19.5 Reducing Model Size................................................................................................. 565
19.5.1 Reduction by Aggregation................................................................................... 566
19.5.2 Reducing the Number of Nonzeroes .................................................................. 569
19.5.3 Reducing the Number of Nonzeroes in Covering Problems............................... 569
19.6 On-the-Fly Column Generation ................................................................................. 571
19.6.1 Example of Column Generation Applied to a Cutting Stock Problem ................ 572
19.6.2 Column Generation and Integer Programming................................................... 576
19.6.3 Row Generation .................................................................................................. 576
19.7 Problems.................................................................................................................... 577
References ........................................................................................................................... 579
INDEX ................................................................................................................................... 589
Preface
This book shows how to use the power of optimization, sometimes known as mathematical
programming, to solve problems of business, industry, and government. The intended audience is
students of business, managers, and engineers. The major technical skill required of the reader is to be
comfortable with the idea of using a symbol to represent an unknown quantity.
This book is one of the most comprehensive expositions available on how to apply optimization
models to important business and industrial problems. If you do not find your favorite business
application explicitly listed in the table of contents, check the very comprehensive index at the back of
the book.
There are essentially three kinds of chapters in the book:
1.
2.
3.
Readers completely new to optimization should read at least the first five chapters. Readers
familiar with optimization, but unfamiliar with LINGO, should read at least chapters 2 and 5. Readers
familiar with optimization and familiar with at least the concepts of a modeling language can probably
skip to chapters 6-18. One can pick and choose from these chapters on applications. There is no strong
sequential ordering among chapters 6-18, other than that the easier topics are in the earlier chapters.
Among these application chapters, chapters 11 (on integer programming), and 12 (on stochastic
programming) are worthy of special mention. They cover two computationally intensive techniques of
fairly general applicability. As computers continue to grow more powerful, integer programming and
stochastic programming will become even more valuable. Chapter 19 is a concluding chapter on
implementing optimization models. It requires some familiarity with the details of models, as
illustrated in the preceding chapters.
There is a natural progression of skills needed as technology develops. For optimization, it has
been:
1) Ability to solve the models: 1950s
2) Ability to formulate optimization models: 1970s
3) Ability to use turnkey or template models: 1990s onward.
This book has no material on the mathematics of solving optimization models. For users who are
discovering new applications, there is a substantial amount of material on the formulation of
optimization models. For the modern two minute manager, there is a big collection of
off-the-shelf, ready-to-apply template models throughout the book.
Users familiar with the text Optimization Modeling with LINDO will notice much of the material
in this current book is based on material in the LINDO book. The major differences are due to the two
very important capabilities of LINGO: the ability to solve nonlinear models, and the availability of the
set or vector notation for compactly representing large models.
Acknowledgments
This book has benefited from comments and corrections from Egon Balas, Robert Bosch, Angel G.
Coca Balta, Sergio Chayet, Richard Darst, Daniel Davidson, Robert Dell, Hamilton Emmons, Saul
Gass, Tom Knowles, Milt Gutterman, Changpyo David Hong, Kipp Martin, Syam Menon, Raul
xiii
xiv
Preface
Negro, David Phillips, J. Pye, Fritz Raffensperger, Rick Rosenthal, James Schmidt, Paul Schweitzer,
Shuichi Shinmura, Rob Stubbs, David Tulett, Richard Wendell, Mark Wiley, and Gene Woolsey and
his students. The outstanding software expertise and sage advice of Kevin Cunningham was crucial.
The production of this book (from editing and formatting to printing) was ably managed by Sarah
Snider, Hanzade Izmit, Srinnath Tumu and Jane Rees.