home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / faqs / sci / answers / linear-programming-faq < prev    next >
Internet Message Format  |  1997-10-05  |  93KB

  1. Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!thetimes.pixel.kodak.com!news.kodak.com!news-pen-16.sprintlink.net!newsfeed.nysernet.net!news.nysernet.net!207.41.200.4!news-pen-4.sprintlink.net!206.229.87.26!news-east.sprintlink.net!news-dc-26.sprintlink.net!news-peer.sprintlink.net!news.sprintlink.net!Sprint!newsfeed.internetmci.com!131.103.1.102!iagnet.net!newsfeed.acns.nwu.edu!news.acns.nwu.edu!4er
  2. From: 4er@iems.nwu.edu (Robert Fourer)
  3. Newsgroups: sci.op-research,sci.answers,news.answers
  4. Subject: Linear Programming FAQ
  5. Followup-To: sci.op-research
  6. Date: 4 Oct 1997 20:20:01 GMT
  7. Organization: Northwestern University, Evanston, IL, US
  8. Lines: 1711
  9. Approved: news-answers-request@MIT.Edu
  10. Distribution: world
  11. Expires: 11/05/97
  12. Message-ID: <6168dh$mhm@news.acns.nwu.edu>
  13. Reply-To: 4er@iems.nwu.edu (Robert Fourer)
  14. NNTP-Posting-Host: scherzo.iems.nwu.edu
  15. Summary: A List of Frequently Asked Questions about Linear Programming
  16. Keywords: FAQ, LP, Linear Programming
  17. Originator: 4er@scherzo.iems.nwu.edu
  18. Xref: senator-bedfellow.mit.edu sci.op-research:8387 sci.answers:7178 news.answers:113857
  19.  
  20. Posted-By: auto-faq 2.4
  21. Archive-name: linear-programming-faq
  22. Last-modified: October 4, 1997
  23.  
  24. [ ]
  25.  
  26.         Linear Programming
  27.         Frequently Asked Questions
  28.  
  29. Optimization Technology Center of
  30. Northwestern University and Argonne National Laboratory
  31. Posted monthly to Usenet newsgroup sci.op-research
  32.  
  33. World Wide Web version:
  34. http://www.mcs.anl.gov/home/otc/Guide/faq/linear-programming-faq.html
  35. Plain-text version:
  36. ftp://rtfm.mit.edu/pub/usenet/sci.answers/linear-programming-faq
  37.  
  38. THIS PLAIN-TEXT VERSION DOES NOT SHOW THE MANY HYPERTEXT LINKS THAT
  39. ARE INCLUDED IN THE WORLD WIDEWEB VERSION.
  40.  
  41. Date of this version: October 4, 1997
  42.  
  43.    * Q1. "What is Linear Programming?"
  44.    * Q2. "Where is there good software to solve LP problems?"
  45.         o "Free" codes
  46.         o Commercial codes and modeling systems
  47.         o Free demos of commercial codes
  48.    * Q3. "Oh, and we also want to solve it as an integer program."
  49.    * Q4. "I wrote an optimization code. Where are some test models?"
  50.    * Q5. "What is MPS format?"
  51.    * Q6. Topics briefly covered:
  52.         o Q6.1: "What is a modeling language?"
  53.         o Q6.2: "How do I diagnose an infeasible LP model?"
  54.         o Q6.3: "I want to know the specific constraints that contradict
  55.           each other."
  56.         o Q6.4: "I just want to know whether or not a feasible solution
  57.           *exists*."
  58.         o Q6.5: "I have an LP, except it's got several objective functions."
  59.         o Q6.6: "I have an LP that has large almost-independent matrix
  60.           blocks that are linked by a few constraints. Can I take advantage
  61.           of this?"
  62.         o Q6.7: "I am looking for an algorithm to compute the convex hull of
  63.           a finite number of points in n-dimensional space."
  64.         o Q6.8: "Are there any parallel LP codes?"
  65.         o Q6.9: "What software is there for Network models?"
  66.         o Q6.10: "What software is there for the Traveling Salesman Problem
  67.           (TSP)?"
  68.         o Q6.11: "What software is there for the Knapsack Problem?"
  69.         o Q6.12: "What software is there for Stochastic Programming?"
  70.         o Q6.13: "I need to do post-optimal analysis."
  71.         o Q6.14: "Do LP codes require a starting vertex?"
  72.         o Q6.15: "How can I combat cycling in the Simplex algorithm?"
  73.    * Q7. "What references and Web links are there in this field?"
  74.    * Q8. "How do I access the Netlib server?"
  75.    * Q9. "Who maintains this FAQ list?"
  76.  
  77. See also the following pages
  78. pertaining to mathematical programming and optimization modeling:
  79.  
  80.    * The related Nonlinear Programming FAQ.
  81.    * The NEOS Guide to optimization models and software.
  82.    * The Decision Tree for Optimization Software by H.D. Mittelmann and P.
  83.      Spellucci.
  84.    * Jiefeng Xu's List of Interesting Optimization Codes in the Public
  85.      Domain.
  86.    * Software for Optimization: A Buyer's Guide by Robert Fourer.
  87.    * Harvey Greenberg's Mathematical Programming Glossary.
  88.  
  89. [ ]
  90.  
  91. Q1. "What is Linear Programming?"
  92.  
  93. A: (For rigorous definitions and theory, which are beyond the scope of this
  94. document, the interested reader is referred to the many LP textbooks in
  95. print, a few of which are listed in the references section.)
  96.  
  97. A Linear Program (LP) is a problem that can be expressed as follows (the
  98. so-called Standard Form):
  99.  
  100.     minimize   cx
  101.     subject to Ax  = b
  102.                 x >= 0
  103.  
  104. where x is the vector of variables to be solved for, A is a matrix of known
  105. coefficients, and c and b are vectors of known coefficients. The expression
  106. "cx" is called the objective function, and the equations "Ax=b" are called
  107. the constraints. All these entities must have consistent dimensions, of
  108. course, and you can add "transpose" symbols to taste. The matrix A is
  109. generally not square, hence you don't solve an LP by just inverting A.
  110. Usually A has more columns than rows, and Ax=b is therefore quite likely to
  111. be under-determined, leaving great latitude in the choice of x with which to
  112. minimize cx.
  113.  
  114. The word "Programming" is used here in the sense of "planning"; the
  115. necessary relationship to computer programming was incidental to the choice
  116. of name. Hence the phrase "LP program" to refer to a piece of software is
  117. not a redundancy, although I tend to use the term "code" instead of
  118. "program" to avoid the possible ambiguity.
  119.  
  120. Although all linear programs can be put into the Standard Form, in practice
  121. it may not be necessary to do so. For example, although the Standard Form
  122. requires all variables to be non-negative, most good LP software allows
  123. general bounds l <= x <= u, where l and u are vectors of known lower and
  124. upper bounds. Individual elements of these bounds vectors can even be
  125. infinity and/or minus-infinity. This allows a variable to be without an
  126. explicit upper or lower bound, although of course the constraints in the
  127. A-matrix will need to put implied limits on the variable or else the problem
  128. may have no finite solution. Similarly, good software allows b1 <= Ax <= b2
  129. for arbitrary b1, b2; the user need not hide inequality constraints by the
  130. inclusion of explicit "slack" variables, nor write Ax >= b1 and Ax <= b2 as
  131. two separate constraints. Also, LP software can handle maximization problems
  132. just as easily as minimization (in effect, the vector c is just multiplied
  133. by -1).
  134.  
  135. The importance of linear programming derives in part from its many
  136. applications (see further below) and in part from the existence of good
  137. general-purpose techniques for finding optimal solutions. These techniques
  138. take as input only an LP in the above Standard Form, and determine a
  139. solution without reference to any information concerning the LP's origins or
  140. special structure. They are fast and reliable over a substantial range of
  141. problem sizes and applications.
  142.  
  143. Two families of solution techniques are in wide use today. Both visit a
  144. progressively improving series of trial solutions, until a solution is
  145. reached that satisfies the conditions for an optimum. Simplex methods,
  146. introduced by Dantzig about 50 years ago, visit "basic" solutions computed
  147. by fixing enough of the variables at their bounds to reduce the constraints
  148. Ax = b to a square system, which can be solved for unique values of the
  149. remaining variables. Basic solutions represent extreme boundary points of
  150. the feasible region defined by Ax = b, x >= 0, and the simplex method can be
  151. viewed as moving from one such point to another along the edges of the
  152. boundary. Barrier or interior-point methods, by contrast, visit points
  153. within the interior of the feasible region. These methods derive from
  154. techniques for nonlinear programming that were developed and popularized in
  155. the 1960s by Fiacco and McCormick, but their application to linear
  156. programming dates back only to Karmarkar's innovative analysis in 1984.
  157.  
  158. The related problem of integer programming (or integer linear programming,
  159. strictly speaking) requires some or all of the variables to take integer
  160. (whole number) values. Integer programs (IPs) often have the advantage of
  161. being more realistic than LPs, but the disadvantage of being much harder to
  162. solve. The most widely used general-purpose techniques for solving IPs use
  163. the solutions to a series of LPs to manage the search for integer solutions
  164. and to prove optimality. Thus most IP software is built upon LP software,
  165. and this FAQ applies to problems of both kinds.
  166.  
  167. Linear and integer programming have proved valuable for modeling many and
  168. diverse types of problems in planning, routing, scheduling, assignment, and
  169. design. Industries that make use of LP and its extensions include
  170. transportation, energy, telecommunications, and manufacturing of many kinds.
  171. A sampling of applications can be found in many LP textbooks, in books on LP
  172. software systems, and among the application cases in the journal Interfaces.
  173.  
  174. [ ]
  175.  
  176. Q2. "Where is there good software to solve LP problems?"
  177.  
  178. A: Thanks to the advances in computing of the past decade, linear programs
  179. in a few thousand variables and constraints are nowadays viewed as "small".
  180. Problems having tens or hundreds of thousands of continuous variables are
  181. regularly solved; tractable integer programs are necessarily smaller, but
  182. are still commonly in the hundreds or thousands of variables and
  183. constraints. The computers of choice for linear and integer programming
  184. applications are Pentium-based PCs and the several varieties of Unix
  185. workstations.
  186.  
  187. There is more to linear programming than optimal solutions and
  188. number-crunching, however. This can be appreciated by observing that modern
  189. LP software comes in two related but very different kinds of packages:
  190.  
  191.    * Algorithmic codes are devoted to finding optimal solutions to specific
  192.      linear programs. A code takes as input a compact listing of the LP
  193.      constraint coefficients (the A, b, c and related values in the standard
  194.      form) and produces as output a similarly compact listing of optimal
  195.      solution values and related information.
  196.  
  197.    * Modeling systems are designed to help people formulate LPs and analyze
  198.      their solutions. An LP modeling system takes as input a description of
  199.      a linear program in a form that people find reasonably natural and
  200.      convenient, and allows the solution output to be viewed in similar
  201.      terms; conversion to the forms requried by algorithmic codes is done
  202.      automatically. The collection of statement forms for the input is often
  203.      called a modeling language.
  204.  
  205. Most modeling systems support a variety of algorithmic codes, while the more
  206. popular codes can be used with many different modeling systems. Because
  207. packages of the two kinds are often bundled for convenience of marketing or
  208. operation, the distinction between them is sometimes obscured, but it is
  209. important to keep in mind when attempting to sort through the many
  210. alternatives available.
  211.  
  212. Large-scale LP algorithmic codes rely on general-structure sparse matrix
  213. techniques and numerous other refinements developed through years of
  214. experience. The fastest and most reliable codes thus represent considerable
  215. development effort, and tend to be expensive except in very limited
  216. demonstration or "student" versions. Those codes that are free -- to all, or
  217. at least for research and teaching -- tend to be somewhat less robust,
  218. though they are still useful for many problems. The ability of a code to
  219. solve any particular class of problems cannot easily be predicted from
  220. problem size alone; some experimentation is usually necessary to establish
  221. difficulty.
  222.  
  223. Large-scale LP modeling systems are commercial products virtually without
  224. exception, and tend to be as expensive as the commercial algorithmic codes
  225. (again with the exception of small demo versions). They vary so greatly in
  226. design and capability that a description in words is adequate only to make a
  227. preliminary decision among them; your ultimate choice is best guided by
  228. using each candidate to formulate a model of interest.
  229.  
  230. Listed below are summary descriptions of available free codes, and a
  231. tabulation of many commercial codes and modeling systems for linear (and
  232. integer) programming. A list of free demos of commercial software appears at
  233. the end of this section.
  234.  
  235. Another useful source of information is the Optimization Software Guide by
  236. Jorge More' and Stephen Wright, available from SIAM Books. It contains
  237. references to about 75 available software packages (not all of them just
  238. LP), and goes into more detail than is possible in this FAQ; see in
  239. particular the sections on "linear programming" and on "modeling languages
  240. and optimization systems." An updated Web version of this book is available
  241. on the NEOS Guide. Another good soruce of feature summaries and contact
  242. information is the Linear Programming Software Survey compiled by OR/MS
  243. Today (which also has the largest selection of advertisements for
  244. optimization software). Much information can also be obtained through the
  245. web sites of optimization software developers, many of which are identified
  246. in the writeup and tables below.
  247.  
  248. To provide some idea of the relative performance of LP codes, a Web page of
  249. pointers to benchmarks for optimization software is being compiled by Hans
  250. Mittelmann of Arizona State University. It currently includes tests of
  251. several public-domain simplex and interior-point implementations. When
  252. evaluating any performance comparison, however, whether performed by a
  253. customer, vendor, or disinterested third party, keep in mind that all
  254. high-quality codes provide options that offer superior performance on
  255. certain difficult kinds of LP or IP problems. Benchmark studies of the
  256. "default settings" of codes will fail to reflect the power of the optional
  257. settings that are available.
  258.  
  259. "Free" codes
  260.  
  261. Some of these programs require registration or payment for some (especially
  262. commercial) uses. Conditions of use are also subject to change. It is a good
  263. practice to check a code's "readme" file or introductory documentation for
  264. restrictions before committing to use it.
  265.  
  266. Based on the simplex method:
  267.  
  268. There is an ftp-able code, written in C, called lp_solve that its author
  269. (Michel Berkelaar, email at michel@es.ele.tue.nl) says has solved models
  270. with up to 30,000 variables and 50,000 constraints. The author requests that
  271. people retrieve it from ftp://ftp.es.ele.tue.nl/pub/lp_solve (numerical
  272. address at last check: 131.155.20.126). There is an older version to be
  273. found in the Usenet archives, but it contains bugs that have been fixed in
  274. the meantime, and hence is unsupported. The author also made available a
  275. program that converts data files from MPS-format into lp_solve's own input
  276. format; it's in the same directory, in file mps2eq_0.2.tar.Z. The
  277. documentation states that it is not public domain, and the author wants to
  278. discuss it with would-be commercial users. As an editorial opinion, I must
  279. state that difficult models will give lp_solve trouble; it's not as good as
  280. a commercial code. But for someone who isn't sure what kind of LP code is
  281. needed, it represents a reasonable first try.
  282.  
  283. LP-Optimizer is a simplex-based code for linear and integer programs,
  284. written by Markus Weidenauer (nc-weidenma@netcologne.de). Free Borland
  285. Pascal 7.0 source is available for downloading, as are executables for DOS
  286. and OS/2.
  287.  
  288. SoPlex is an object-oriented implementation of the primal and dual simplex
  289. algorithms, developed by Roland Wunderling. Source code is available free
  290. for research uses at noncommercial and academic institutions.
  291.  
  292. Among the SLATEC library routines is a Fortran sparse implementation of the
  293. simplex method, SPLP, at ftp://netlib2.cs.utk.edu/slatec/src/splp.f. Its
  294. documentation states that it can solve LP models of "at most a few thousand
  295. constraints and variables".
  296.  
  297. Based on interior-point methods:
  298.  
  299. The Optimization Technology Center at Argonne and Northwestern has developed
  300. the interior-point code PCx. This code can be downloaded directly from the
  301. PCx home page; it is freely available, except that you must contact Argonne
  302. if you want to include it in a product for resale. A Windows 95/NT version
  303. of PCx was announced in April 1997, and is available under the same
  304. conditions as the original. (If you want to solve an LP without downloading
  305. a code to your own machine, you can execute PCx remotely through the NEOS
  306. Server.)
  307.  
  308. A Fortran 77 interior-point code, BPMPD, has been developed by Csaba
  309. Meszaros (meszaros@sztaki.hu) at the Computer and Automation Research
  310. Institute of the Hungarian Academy of Sciences. It is available as source
  311. code, as a Windows95/NT executable (which is also extended to solve convex
  312. quadratic problems), and in a DLL version for Windows.
  313.  
  314. Jacek Gondzio (gondzio@divsun.unige.ch) has made source for his interior
  315. point LP solver HOPDM available at
  316. http://ecolu-info.unige.ch/~logilab/software/hopdm.html. Additionally,
  317. several papers devoted to HOPDM code are available at this site. It uses a
  318. higher order primal-dual predictor-corrector logarithmic barrier algorithm,
  319. and according to David Gay, it "seems to work well in limited testing. For
  320. example, it happily solves all of the examples in netlib's lp/data
  321. directory." Prof. Gondzio notes that problem size is limited only by
  322. available memory, and on a virtual memory system it has been used to solve
  323. models with hundreds of thousand of constraints and variables. An older
  324. version of the source code is kept in netlib's opt directory:
  325. ftp://netlib.bell-labs.com/netlib/opt/hopdm.shar.Z
  326.  
  327. Other software of interest:
  328.  
  329. ABACUS is a C++ class library that "provides a framework for the
  330. implementation of branch-and-bound algorithms using linear programming
  331. relaxations that can be complemented with the dynamic generation of cutting
  332. planes or columns" (branch-and-cut and/or branch-and-price). It relies on
  333. CPLEX or SoPlex to solver linear programs. Further information is available
  334. from Stefan Thienel, thienel@informatik.uni-koeln.de.
  335.  
  336. A web-based service by a group at Berkeley called Interactive Linear
  337. Programming appears to be useful for solving small models that can be
  338. entered by hand. Along similar lines, the NEOS Guide offers a Java-based
  339. Simplex Tool, which demonstrates the workings of the simplex method on small
  340. user-entered problems and is especially useful for educational purposes.
  341. Anima-LP by Chris Jones (cvj@u.washington.edu) graphs and solves
  342. two-dimensional linear programs interactively on any Java-compatible
  343. browser; there is also a Macintosh version.
  344.  
  345. The Systems Analysis Laboratory at Seoul National University offers Linear
  346. Programming software (both Simplex and Barrier) at
  347. http://orly1.snu.ac.kr/Software.html
  348.  
  349. Will Naylor (naylor@mti.sgi.com) has a collection of software he calls
  350. WNLIB. Routines of interest include
  351. - simplex method for linear programming: contains anti-cycling and numerical
  352. stability hacks. No optimization for sparse matrix.
  353. - transportation problem/assignment problem routine: optimization for sparse
  354. matrix.
  355. Read the INSTALL.txt file for further information. WNLIB also contains
  356. routines pertaining to nonlinear optimization.
  357.  
  358. The next several suggestions are for public-domain codes that are severely
  359. limited by the algorithm they use (tableau Simplex); they may be OK for
  360. models with (on the order of) 100 variables and constraints, but it's
  361. unlikely they will be satisfactory for larger models. In the words of Matt
  362. Saltzman (mjs@clemson.edu):
  363.  
  364.      The main problems with these codes have to do with scaling, use of
  365.      explicit inverses and lack of reinversion, and handling of degeneracy.
  366.      Even small problems that are ill-conditioned or degenerate can bring
  367.      most of these tableau codes to their knees. Other disadvantages for
  368.      larger problems relate to sparsity, pricing, and maintaining the
  369.      complete nonbasic portion of the tableau. But for small, dense problems
  370.      these difficulties may not be serious enough to prevent tableau codes
  371.      from being useful, or even preferable to more "sophisticated" sparse
  372.      codes. In any event, use them with care.
  373.  
  374.    * For DOS/PC users, there is an LP and Linear Goal Programming binary
  375.      called tslin, at ftp://garbo.uwasa.fi/pc/ts (the current file name is
  376.      tslin34.zip, using ZIP compression), or else I suggest contacting Prof.
  377.      Salmi at ts@uwasa.fi . For North American users, the garbo server is
  378.      mirrored on FTP site wuarchive.wustl.edu, in directory
  379.      mirrors/garbo.uwasa.fi.
  380.    * Also on the garbo server is a file called lp261.zip, having a
  381.      descriptor of "Linear Programming Optimizer by ScanSoft". It consists
  382.      of PC binaries, and is evidently some sort of shareware (i.e., not
  383.      strictly public domain).
  384.    * There is an ACM TOMS routine for LP, #552, available at
  385.      ftp://netlib2.cs.utk.edu/toms/552. This routine was designed for
  386.      fitting data to linear constraints using an L1 norm, but it uses a
  387.      modification of the Simplex Method and could presumably be modified to
  388.      satisfy LP purposes.
  389.    * There are books that contain source code for the Simplex Method. See
  390.      the section on references. You should not expect such code to be
  391.      robust. In particular, you can check whether it uses a 2-dimensional
  392.      array for the A-matrix; if so, it is surely using the tableau Simplex
  393.      Method rather than sparse methods, and Saltzman's comments will apply.
  394.  
  395. For Macintosh users there is a free package called LinPro that is available
  396. at ftp://ftp.ari.net/MacSciTech/programming/. Some users have reported that
  397. it performs well, while one correspondent informs me he had trouble getting
  398. it to solve any problems at all; perhaps this code is sensitive to memory
  399. size of the machine. It comes with a "large example" of 100 variables, which
  400. gives a hint of its design limits. It seems to be slower than commercial
  401. codes, but that should not be a surprise (or a criticism of a free code).
  402. LinPro has its own input format and does not support MPS format.
  403.  
  404. Walter C. Riley (73700.776@compuserve.com) writes:
  405.  
  406.    * My shareware program, the R-Tek Scratchpad (rtksp106.zip $15), is
  407.      intended for teachers and students. It basically handles problems that
  408.      students in an Introduction to Finite Mathematics course might
  409.      encounter, including typical small textbook LP problems. Its primary
  410.      advantages are that it uses readable math notation, handles fractions,
  411.      and allows you to step through the problem to its solution. It is now
  412.      available on the net for ftp download at
  413.      ftp://ftp.coast.net/SimTel/win3/calc/ or one of its mirror sites.
  414.  
  415. Stephen F. Gale (sfgale@freenet.calgary.ab.ca) writes:
  416.  
  417.    * Available at http://www.freenet.calgary.ab.ca/~sfgale/simplex.html is a
  418.      fairly simple Simplex Solver written for Turbo Pascal 3.0. The original
  419.      algorithm is from the book "Some Common BASIC Programs" by Lon Poole
  420.      and Mary Borchers (ISBN 0-931988-06-3). However, I revised it
  421.      considerably when I converted it to Pascal. I then added Sensitivity
  422.      Analysis based on the book "The Operations Research Problem Solver"
  423.      (ISBN 0-87891-548-6). I have tested the program on over 30 textbook
  424.      problems, but never used it for real life applications. If someone
  425.      finds a problem with the program, I would be pleased to correct it. I
  426.      would also appreciate knowing how the program was used.
  427.  
  428. The following suggestions may represent low-cost ways of solving LPs if you
  429. already have certain software available to you.
  430.  
  431.    * All of the most popular spreadsheet programs offer an LP solver as a
  432.      feature or add-in.
  433.    * A package called QSB (Quantitative Systems for Business, from
  434.      Prentice-Hall publishers) has an LP module among its routines.
  435.    * If you have access to a commercial math library, such as SAS
  436.      (919-677-8000), IMSL (800-222-4675 or 713-784-3131 or
  437.      support@houston.vni.com) or NAG (708-971-2337), you may be able to use
  438.      an LP routine from there.
  439.    * Mathematical systems MATLAB (The Math Works, Inc., (508) 653-1415, see
  440.      comment in the NLP FAQ) and MAPLE (Waterloo Maple Software, 450 Phillip
  441.      Street, Waterloo, Ontario, Canada N2L 5J2 Phone: (519) 747-2373 Fax:
  442.      (519) 747-5284) also have LP solvers. An interface from MATLAB to
  443.      lp_solve is available from Jeff Kantor (Jeffrey.Kantor@nd.edu) in
  444.      ftp://control.cheg.nd.edu/pub/Kantor/matlab/lp_solve. A MATLAB toolkit
  445.      for solving LP models using Interior-Point methods, called LIPSOL is
  446.      available at ftp://ftp.math.umbc.edu/pub/zhang/lipsol - check the
  447.      documentation in this directory (README.1ST) for more information; the
  448.      current version is in subdirectory v0.3. There is an FTP site with
  449.      user-contributed .m files to do Simplex located at
  450.      ftp://ftp.mathworks.com/pub/contrib/optim/simplex1. There's a Usenet
  451.      newsgroup on MATLAB: comp.soft-sys.matlab. If speed matters to you,
  452.      then according to a Usenet posting by Pascal Koiran
  453.      (koiran@ens-lyon.fr), on randomly generated LP models, MATLAB was an
  454.      order of magnitude faster than MAPLE on a 200x20 problem but an order
  455.      of magnitude slower than lp_solve on a 50x100 problem. (I don't intend
  456.      to get into benchmarking in this document, but I mention these results
  457.      just to explain why I choose to focus mostly on special purpose LP
  458.      software.)
  459.  
  460. Commercial codes and modeling systems
  461.  
  462. If your models prove to be too difficult for free or add-on software to
  463. handle, then you may have to consider acquiring a commercial LP code. Dozens
  464. of such codes are on the market. There are many considerations in selecting
  465. an LP code. Speed is important, but LP is complex enough that different
  466. codes go faster on different models; you won't find a "Consumer Reports"
  467. article to say with certainty which code is THE fastest. I usually suggest
  468. getting benchmark results for your particular type of model if speed is
  469. paramount to you. Benchmarking can also help determine whether a given code
  470. has sufficient numerical stability for your kind of models.
  471.  
  472. Other questions you should answer: Can you use a stand-alone code, or do you
  473. need a code that can be used as a callable library, or do you require source
  474. code? Do you want the flexibility of a code that runs on many platforms
  475. and/or operating systems, or do you want code that's tuned to your
  476. particular hardware architecture (in which case your hardware vendor may
  477. have suggestions)? Is the choice of algorithm (Simplex, Interior-Point)
  478. important to you? Do you need an interface to a spreadsheet code? Is the
  479. purchase price an overriding concern? If you are at a university, is the
  480. software offered at an academic discount? How much hotline support do you
  481. think you'll need? There is usually a large difference in LP codes, in
  482. performance (speed, numerical stability, adaptability to computer
  483. architectures) and in features, as you climb the price scale.
  484.  
  485. In the following table is a condensed version of a survey of LP software
  486. that appeared in the June 1992 issue of OR/MS Today (a publication of
  487. INFORMS) and that has subsequently been updated in the October 1995 and
  488. April 1997 issues. Consult the full survey for more detailed information, or
  489. click on the product names to browse their developers' web pages.
  490.  
  491. The table is in two parts, the first consisting of packages that are
  492. primarily algorithmic codes, and the second containing modeling systems.
  493. Product names are linked to product or developer web sites where known.
  494.  
  495. Under "Platform" is an indication of common environments in which the code
  496. runs, with the choices being PC-DOS and/or versions of Microsoft Windows
  497. (PC), Macintosh OS (M), and Unix on various computer types (U). For other
  498. possibilities, check the full survey or contact the vendor.
  499.  
  500. Even more so than usual, I emphasize that you must use this information at
  501. your own risk. I cannot guarantee that every entry is completely correct and
  502. up-to-date, but I will gladly correct any mistakes that are pointed out to
  503. me.
  504.  
  505. Key to Features:  S=Simplex    I=Interior-Point or Barrier
  506.                   Q=Quadratic  G=General-Nonlinear
  507.                   M=MIP        N=Network
  508.                                V=Visualization
  509.  
  510. Solver
  511. Product   Features Platform      Phone   E-mail address
  512. CPLEX     SIMNQ    PC M U  702-831-7744  info@cplex.com
  513. C-WHIZ    SM       PC U    703-412-3201  ketronms@erols.com
  514. FortMP    SIMQ     PC U    630-971-2337  naginfo@nag.com
  515.                                      +44 hossein@unicom.co.uk
  516.                             1895-256484
  517.  
  518. HI-PLEX   S        PC U              +44 i.maros@ic.ac.uk
  519.                            171-594-8334
  520. HS/LP     SM       PC      201-627-1424  info@haverly.com
  521. ILOG
  522. Planner   M        PC U    415-390-9000  info@ilog.com
  523.  
  524. LAMPS     SM       PC U              +44 info@amsoft.demon.co.uk
  525.                            181-870-8882
  526. LINDO     SMQ      PC      312-988-7422  info@lindo.com
  527. LOQO      GI       PC U    609-258-0876  rvdb@princeton.edu
  528. LPS-867   SM       PC U    609-737-6800  info@main.aae.com
  529. LS-XLSOL  SM       PC      702-831-0300  info@frontsys.com
  530. MINOS     SQG      PC      415-962-8719  mike@sol-michael.stanford.edu
  531. MINTO     M        U       404-894-6287  martin.savelsbergh@isye.gatech.edu
  532. MPSIII    SMN      PC U    703-412-3201  ketronms@erols.com
  533. OSL       SIMNQ    PC U    914-433-4740  osl@vnet.ibm.com
  534. SAS/OR    SMNGQ    PC M U  919-677-8000  saseph@unx.sas.com
  535.  
  536. SCICONIC  SM       PC U              +44 msukwt03.gztltm@eds.com
  537.                             1908-284188
  538. SOPT      SIMGQ    PC U    908-264-4700  saitech@monmouth.com
  539. XA        SM       PC M U  818-441-1565  sunsetsw@ix.netcom.com
  540. XPRESS-MP SIMQ     PC M    202-887-0296  info@dash.co.uk
  541.                                      +44
  542.                             1604-858993
  543.  
  544. Modeling
  545. Product       Platform          Phone   E-mail address
  546. AIMMS         PC        +31 23-5350935  info@paragon.nl
  547. AMPL          PC U        702-322-7600  info@ampl.com
  548. ANALYZE       PC          303-796-7830  hgreenbe@carbon.cudenver.edu
  549. DecisionPRO   PC          919-859-4101  vginfo@vanguardsw.com
  550. DATAFORM      PC U        703-412-3201  ketronms@erols.com
  551. GAMS          PC U        202-342-0180  sales@gams.com
  552. LINGO         PC U        800-441-2378  info@lindo.com
  553. MathPro       PC U        202-887-0296  mathpro@erols.com
  554. MIMI          PC U        908-464-8300  info@chesapeake.com
  555. MODLER        PC U        303-796-7830  hgreenbe@carbon.cudenver.edu
  556. MPL           PC          703-522-7900  info@maximal-usa.com
  557. OMNI          PC U        201-627-1424  info@haverly.com
  558. VMP           PC U        301-622-4319  j-welch@sundown-vmp.com
  559. What's Best!  PC M U      800-441-2378  info@lindo.com
  560. XPRESS-MP     PC M        202-887-0296  info@dash.co.uk
  561.                        +44 1604-858993
  562.  
  563. Free demos of commercial codes
  564.  
  565. An increasing number of commercial LP software developers are making demo or
  566. academic versions available for downloading through web sites or as add-ons
  567. to book packages. Typically these versions are limited in the size of
  568. problem they accept or the length of time that they will operate, or are
  569. made available only for "academic use" (mainly research or teaching at
  570. universities). Nevertheless, they have most or all of the features of the
  571. full versions. Most run under several variations of Microsoft Windows on
  572. PCs, and/or certain Unix workstations; check the relevant web pages for
  573. details.
  574.  
  575. Downloadable free demos include:
  576.  
  577.    * AIMMS with XA and CONOPT
  578.    * ANALYZE, MODLER and RANDMOD
  579.    * LINDO and What's Best!
  580.    * LOQO with a built-in AMPL interface
  581.    * MPL with CPLEX
  582.    * Visual XPRESS with XPRESS-MP
  583.  
  584. Books that are packaged with demo software include:
  585.  
  586.    * A. Brooke, D. Kendrick and A. Meeraus, GAMS: A Users' Guide, Wadsworth
  587.      Publishing Co/Duxbury Press, ISBN 0-894-26215-7.
  588.    * R. Fourer, D.M. Gay and B.W. Kernighan, AMPL: A Modeling Language for
  589.      Mathematical Programming, Wadsworth Publishing Co/Duxbury Press, ISBN
  590.      0-534-50983-5.
  591.    * H.J. Greenberg, Modeling by Object-Driven Linear Elemental Relations: A
  592.      User's Guide for MODLER, Kluwer Academic Publishers, ISBN
  593.      0-792-39323-6.
  594.    * L. Schrage, Optimization Modeling with LINDO, LINDO Systems, order
  595.      directly from developer.
  596.  
  597. Many developers are also willing to arrange for you to "borrow" copies of
  598. their full-featured versions for purposes of evaluation. Details vary,
  599. however, so you'll have to check with each vendor whose product you're
  600. interested in.
  601.  
  602. [ ]
  603.  
  604. Q3. "Oh, and we also want to solve it as an integer program."
  605.  
  606. A: Integer LP models are ones whose variables are constrained to take
  607. integer or whole number (as opposed to fractional) values. It may not be
  608. obvious that integer programming is a very much harder problem than ordinary
  609. linear programming, but that is nonetheless the case, in both theory and
  610. practice.
  611.  
  612. Integer models are known by a variety of names and abbreviations, according
  613. to the generality of the restrictions on their variables. Mixed integer
  614. (MILP or MIP) problems require only some of the variables to take integer
  615. values, whereas pure integer (ILP or IP) problems require all variables to
  616. be integer. Zero-one (or 0-1 or binary) MIPs or IPs restrict their integer
  617. variables to the values zero and one. (The latter are more common than you
  618. might expect, because many kinds of combinatorial and logical restrictions
  619. can be modeled through the use of zero-one variables.)
  620.  
  621. For the sake of generality, the following disucssion uses the term MIP to
  622. refer to any kind of integer LP problem; the other kinds can be viewed as
  623. special cases. MIP, in turn, is a particular member of the class of
  624. combinatorial or discrete optimization problems. In fact the problem of
  625. determining whether a MIP has an objective value less than a given target is
  626. a member of the class of "NP-complete" problems, all of which are very hard
  627. to solve (at least as far as anyone has been able to tell). Since any
  628. NP-complete problem is reducible to any other, virtually any combinatorial
  629. problem of interest can be attacked in principle by solving some equivalent
  630. MIP. This approach sometimes works well in practice, though it is by no
  631. means infallible.
  632.  
  633. People are sometimes surprised to learn that MIP problems are solved using
  634. floating point arithmetic. Most available general-purpose large-scale MIP
  635. codes use a procedure called "branch-and-bound" to search for an optimal
  636. integer solution by solving a sequence of related LP "relaxations" that
  637. allow some fractional values. Good codes for MIP distinguish themselves
  638. primarily by solving shorter sequences of LPs, and secondarily by solving
  639. the individual LPs faster. (The similarities between successive LPs in the
  640. "search tree" can be exploited to speed things up considerably.) Even more
  641. so than with regular LP, a costly commercial code may prove its value if
  642. your MIP model is difficult.
  643.  
  644. Another solution approach known generally as constraint logic programming
  645. (CLP) has drawn increasing interest of late. Having their roots in studies
  646. of logical inference in artificial intelligence, CLP codes typically do not
  647. proceed by solving any LPs. As a result, compared to branch-and-bound they
  648. search "harder" but faster through the tree of potential solutions. Their
  649. greatest advantage, however, lies in their ability to tailor the search to
  650. many constraint forms that can be converted only with difficulty to the form
  651. of an integer program; their greatest success tends to be with "highly
  652. combinatorial" optimization problems such as scheduling, sequencing, and
  653. assignment, where the construction of an equivalent IP would require the
  654. definition of large numbers of zero-one variables. More information and a
  655. list of available codes can be found in the Constraints FAQ (also posted to
  656. the newsgroup comp.constraints).
  657.  
  658. Whatever your solution technique, you should be prepared to devote far more
  659. computer time and memory to solving a MIP problem than to solving the
  660. corresponding LP relaxation. (Or equivalently, you should be prepared to
  661. solve much smaller MIP problems than LP problems using a given amount of
  662. computer resources.) To further complicate matters, the difficulty of any
  663. particular MIP problem is hard to predict (in advance, at least!). Problems
  664. in no more than a hundred variables can be challenging, while others in tens
  665. of thousands of variables solve readily. The best explanations of why a
  666. particular MIP is difficult often rely on some insight into the system you
  667. are modeling, and even then tend to appear only after a lot of computational
  668. tests have been run. A related observation is that the way you formulate
  669. your model can be as important as the actual choice of solver.
  670.  
  671. Thus a MIP problem with hundreds of variables (or more) should be approached
  672. with a certain degree of caution and patience. A willingness to experiment
  673. with alternative formulations and with a MIP code's many search options
  674. often pays off in greatly improved performance. In the hardest cases, you
  675. may wish to abandon the goal of a provable optimum; by terminating a MIP
  676. code prematurely, you can often obtain a high-quality solution along with a
  677. provable upper bound on its distance from optimality. A solution whole
  678. objective value is within some fraction of 1% of optimal may be all that is
  679. required for your purposes. (Indeed, it may be an optimal solution. In
  680. contrast to methods for ordinary LP, procedures for MIP may not be able to
  681. prove a solution to be optimal until long after they have found it.)
  682.  
  683. Once one accepts that large MIP models are not typically solved to a proved
  684. optimal solution, that opens up a broad area of approximate methods,
  685. probabilistic methods and heuristics, as well as modifications to B&B. See
  686. [Balas] which contains a useful heuristic for 0-1 MIP models. See also the
  687. brief discussion of Genetic Algorithms and Simulated Annealing in the
  688. Nonlinear Programming FAQ.
  689.  
  690. A major exception to this somewhat gloomy outlook is that there are certain
  691. models whose LP solution always turns out to be integer, assuming the input
  692. data is integer to start with. In general these models have a "unimodular"
  693. constraint matrix of some sort, but by far the best-known and most widely
  694. used models of this kind are the so-called pure network flow models. It
  695. turns out that such problems are best solved by specialized routines,
  696. usually based on the simplex method, that are much faster than any
  697. general-purpose LP methods. See the section on Network models for further
  698. information.
  699.  
  700. Commercial MIP codes are listed with the commercial LP codes and modeling
  701. systems above. The April 1994 issue of OR/MS Today contains a survey of MIP
  702. codes, which largely overlaps the content of the earlier survey on LP:
  703. "Survey: Mixed Integer Programming" by Matthew Saltzman, pp 42-51. The
  704. following are notes on some publicly available codes for MIP problems.
  705.  
  706.    * The public domain code lp_solve, mentioned earlier, accepts MIP models.
  707.  
  708.    * Peter Barth has announced opbdp, an implementation in C++ of an
  709.      implicit enumeration algorithm for solving linear 0-1 optimization
  710.      problems. The algorithm compares well with commercial linear
  711.      programming-based branch-and-bound on a variety of standard 0-1 integer
  712.      programming benchmarks. He says that exploiting the logical structure
  713.      of a problem, using opbdp, yields good performance on problems where
  714.      exploiting the polyhedral structure seems to be inefficient and vice
  715.      versa. The package is also available via anonymous ftp at
  716.  
  717.          ftp://ftp.mpi-sb.mpg.de/pub/guide/staff/barth/opbdp/opbdp.tar.Z
  718.  
  719.      along with a Postscript-format technical report (in file mpii952002.ps)
  720.      describing the techniques used.
  721.  
  722.    * I have seen mention made of algorithm 333 in the Collected Algorithms
  723.      from CACM, though I'd be surprised if it was robust enough to solve
  724.      large models. I am not aware of this algorithm being available online
  725.      anywhere.
  726.  
  727.    * In [Syslo] is code for 28 algorithms, most of which pertain to some
  728.      aspect of Discrete Optimization.
  729.  
  730.    * There is a code called Omega that analyzes systems of linear equations
  731.      in integer variables. It does not solve optimization problems, except
  732.      in the case that a model reduces completely, but its features could be
  733.      useful in analyzing and reducing MIP models. It's available at
  734.      ftp.cs.umd.edu:pub/omega (documentation is provided there), or contact
  735.      Bill Pugh at pugh@cs.umd.edu.
  736.  
  737.    * Mustafa Akgul (akgul@bilkent.edu.tr) at Bilkent University maintains an
  738.      archive in ftp://ftp.bilkent.edu.tr/pub/IEOR/Opt. There is a copy of
  739.      lp_solve (though I would recommend using the official source listed in
  740.      the previous section), and there is mip386.zip, which is a
  741.      zip-compressed code for PC's. He also has a couple of network codes and
  742.      various other codes he has picked up. All this is in the further
  743.      subdirectories LP, PC, and Network. In addition to the ftp site, there
  744.      is gopher (gopher.bilkent.edu.tr), Web (www.bilkent.edu.tr), and
  745.      archive-server@bilkent.edu.tr.
  746.  
  747.    * Bob Craig of Lucent Technologies (kat3@ihgp-ebb.ih.lucent.com) has
  748.      software written in C, which implements Balas' enumerative algorithm
  749.      for solving 0-1 ILP, that he is willing to make available to those who
  750.      request it.
  751.  
  752. [ ]
  753.  
  754. Q4. "I wrote an optimization code. Where are some test models?"
  755.  
  756. A: If you want to try out your code on some real-world LP models, there is a
  757. very nice collection of small-to-medium-size ones, with a few that are
  758. rather large, at ftp://netlib2.cs.utk.edu/lp/data, popularly known as the
  759. Netlib collection (although Netlib consists of much more than just LP).
  760. These files (after you uncompress them) are in a format called MPS, which is
  761. described in another section of this document. Note that, when you receive a
  762. model, it may be compressed both with the Unix utility (use `uncompress` if
  763. the file name ends in .Z) AND with an LP-specific program (grab either
  764. emps.f or emps.c at the same time you download the model, then compile/run
  765. the program to reverse the compression).
  766.  
  767. Also on netlib is a collection of infeasible LP models, located in
  768. ftp://netlib2.cs.utk.edu/lp/infeas.
  769.  
  770. There is a collection of MIP models, called MIPLIB, housed at Rice
  771. University in http://www.caam.rice.edu/~bixby/miplib/miplib.html. FTP users
  772. can use ftp://ftp.caam.rice.edu/pub/people/bixby/miplib. Or, send an email
  773. message containing "send catalog" to softlib@rice.edu , to get started, if
  774. you can't access the files by other means.
  775.  
  776. There's a Travelling Salesman Problem library (TSPLIB) in
  777. ftp://softlib.cs.rice.edu/pub/tsplib. (Alternate address:
  778. ftp://elib.zib-berlin.de/pub/mp-testdata/tsp.) A Web version is at
  779. http://www.iwr.uni-heidelberg.de/iwr/comopt/soft/TSPLIB95/TSPLIB.html.
  780.  
  781. For network flow problems, there are some generators and instances collected
  782. at DIMACS. The NETGEN and GNETGEN generator can be downloaded from netlib.
  783. Generators and instances for multicommodity network flow problems are
  784. maintained by the Operations Research group in the Department of Computer
  785. Science at the University of Pisa.
  786.  
  787. The commercial modeling language GAMS comes with about 160 test models,
  788. which you might be able to test your code with. AIMMS also comes with some
  789. test models.
  790.  
  791. There is a collection called MP-TESTDATA available at Konrad-Zuse-Zentrum
  792. fuer Informations-technik Berlin (ZIB) in
  793. ftp://elib.zib-berlin.de/pub/mp-testdata. This directory contains various
  794. subdirectories, each of which has a file named "index" containing further
  795. information. Indexed at this writing are: assign, cluster, lp, ip, matching,
  796. maxflow, mincost, set-parti, steiner-tree, tsp, vehicle-rout, and
  797. generators.
  798.  
  799. John Beasley maintains the OR-Lib, at ftp://mscmga.ms.ic.ac.uk/pub/, which
  800. contains various optimization test problems. There is an index in
  801. ftp://mscmga.ms.ic.ac.uk/pub/info.txt. WWW access now available at
  802. http://mscmga.ms.ic.ac.uk/. Have a look in the Journal of the Operational
  803. Research Society, Volume 41, Number 11, Pages 1069-72. If you can't access
  804. these resources, send e-mail to umtsk99@vaxa.cc.imperial.ac.uk to get
  805. started. Information about test problems can be obtained by emailing
  806. o.rlibrary@ic.ac.uk with the email message being the file name for the
  807. problem areas you are interested in, or just the word "info".
  808.  
  809. [ ]
  810.  
  811. Q5. "What is MPS format?"
  812.  
  813. A: MPS format was named after an early IBM LP product and has emerged as a
  814. de facto standard ASCII medium among most of the commercial LP codes.
  815. Essentially all commercial LP codes accept this format, but if you are using
  816. public domain software and have MPS files, you may need to write your own
  817. reader routine for this. It's not too hard. See also the comment regarding
  818. the lp_solve code, in another section of this document, for the availability
  819. of an MPS reader.
  820.  
  821. The main things to know about MPS format are that it is column oriented (as
  822. opposed to entering the model as equations), and everything (variables,
  823. rows, etc.) gets a name. MPS format is described in more detail in
  824. [Murtagh]. A brief description of MPS format is available at
  825. ftp://softlib.cs.rice.edu/pub/miplib
  826.  
  827. MPS is an old format, so it is set up as though you were using punch cards,
  828. and is not free format. Fields start in column 1, 5, 15, 25, 40 and 50.
  829. Sections of an MPS file are marked by so-called header cards, which are
  830. distinguished by their starting in column 1. Although it is typical to use
  831. upper-case throughout the file (like I said, MPS has long historical roots),
  832. many MPS-readers will accept mixed-case for anything except the header
  833. cards, and some allow mixed-case anywhere. The names that you choose for the
  834. individual entities (constraints or variables) are not important to the
  835. solver; you should pick names that are meaningful to you, or will be easy
  836. for a post-processing code to read.
  837.  
  838. Here is a little sample model written in MPS format (explained in more
  839. detail below):
  840.  
  841. NAME          TESTPROB
  842. ROWS
  843.  N  COST
  844.  L  LIM1
  845.  G  LIM2
  846.  E  MYEQN
  847. COLUMNS
  848.     XONE      COST                 1   LIM1                 1
  849.     XONE      LIM2                 1
  850.     YTWO      COST                 4   LIM1                 1
  851.     YTWO      MYEQN               -1
  852.     ZTHREE    COST                 9   LIM2                 1
  853.     ZTHREE    MYEQN                1
  854. RHS
  855.     RHS1      LIM1                 5   LIM2                10
  856.     RHS1      MYEQN                7
  857. BOUNDS
  858.  UP BND1      XONE                 4
  859.  LO BND1      YTWO                -1
  860.  UP BND1      YTWO                 1
  861. ENDATA
  862.  
  863. For comparison, here is the same model written out in an equation-oriented
  864. format:
  865.  
  866. Optimize
  867.  COST:    XONE + 4 YTWO + 9 ZTHREE
  868. Subject To
  869.  LIM1:    XONE + YTWO < = 5
  870.  LIM2:    XONE + ZTHREE > = 10
  871.  MYEQN:   - YTWO + ZTHREE  = 7
  872. Bounds
  873.  0 < = XONE < = 4
  874. -1 < = YTWO < = 1
  875. End
  876.  
  877. Strangely, there is nothing in MPS format that specifies the direction of
  878. optimization. And there really is no standard "default" direction; some LP
  879. codes will maximize if you don't specify otherwise, others will minimize,
  880. and still others put safety first and have no default and require you to
  881. specify it somewhere in a control program or by a calling parameter. If you
  882. have a model formulated for minimization and the code you are using insists
  883. on maximization (or vice versa), it may be easy to convert: just multiply
  884. all the coefficients in your objective function by (-1). The optimal value
  885. of the objective function will then be the negative of the true value, but
  886. the values of the variables themselves will be correct.
  887.  
  888. The NAME card can have anything you want, starting in column 15. The ROWS
  889. section defines the names of all the constraints; entries in column 2 or 3
  890. are E for equality rows, L for less-than ( <= ) rows, G for greater-than (
  891. >= ) rows, and N for non-constraining rows (the first of which would be
  892. interpreted as the objective function). The order of the rows named in this
  893. section is unimportant.
  894.  
  895. The largest part of the file is in the COLUMNS section, which is the place
  896. where the entries of the A-matrix are put. All entries for a given column
  897. must be placed consecutively, although within a column the order of the
  898. entries (rows) is irrelevant. Rows not mentioned for a column are implied to
  899. have a coefficient of zero.
  900.  
  901. The RHS section allows one or more right-hand-side vectors to be defined;
  902. most people don't bother having more than one. In the above example, the
  903. name of the RHS vector is RHS1, and has non-zero values in all 3 of the
  904. constraint rows of the problem. Rows not mentioned in an RHS vector would be
  905. assumed to have a right-hand-side of zero.
  906.  
  907. The optional BOUNDS section lets you put lower and upper bounds on
  908. individual variables (no * wild cards, unfortunately), instead of having to
  909. define extra rows in the matrix. All the bounds that have a given name in
  910. column 5 are taken together as a set. Variables not mentioned in a given
  911. BOUNDS set are taken to be non-negative (lower bound zero, no upper bound).
  912. A bound of type UP means an upper bound is applied to the variable. A bound
  913. of type LO means a lower bound is applied. A bound type of FX ("fixed")
  914. means that the variable has upper and lower bounds equal to a single value.
  915. A bound type of FR ("free") means the variable has neither lower nor upper
  916. bounds.
  917.  
  918. There is another optional section called RANGES that I won't go into here.
  919. The final card must be ENDATA, and yes, it is spelled funny.
  920.  
  921. [ ]
  922.  
  923. Q6. Topics briefly covered:
  924.  
  925. Q6.1: "What is a modeling language?"
  926.  
  927. A: There is more to linear programming (or integer programming) than optimal
  928. solutions and number-crunching. This can be appreciated by observing that
  929. modern LP software comes in two related but very different kinds of
  930. packages:
  931.  
  932.    * Algorithmic codes are devoted to finding optimal solutions to specific
  933.      linear programs. A code takes as input a compact listing of the LP
  934.      constraint coefficients (the A, b, c and related values in the standard
  935.      form) and produces as output a similarly compact listing of optimal
  936.      solution values and related information.
  937.  
  938.    * Modeling systems are designed to help people formulate LPs and analyze
  939.      their solutions. An LP modeling system takes as input a description of
  940.      a linear program in a form that people find reasonably natural and
  941.      convenient, and allows the solution output to be viewed in similar
  942.      terms; conversion to the forms requried by algorithmic codes is done
  943.      automatically. The collection of statement forms for the input is often
  944.      called a modeling language.
  945.  
  946. Most modeling systems support a variety of algorithmic codes, while the more
  947. popular codes can be used with many different modeling systems. Because
  948. packages of the two kinds are often bundled for convenience of marketing or
  949. operation, the distinction between them is sometimes obscured, but it is
  950. important to keep in mind when sorting through the many possibilities. See
  951. under Commercial Codes and Modeling Systems elsewhere in this FAQ for a list
  952. of modeling systems available. There are no free ones of note, but many do
  953. offer free demo versions.
  954.  
  955. Common alternatives to modeling languages and systems include spreadsheet
  956. front ends to optimization, and custom optimization applications written in
  957. general-purpose programming languages. You can find a discussion of the pros
  958. and cons of these approaches in What Modeling Tool Should I Use? on the
  959. Frontline Systems web site.
  960.  
  961. Q6.2: "How do I diagnose an infeasible LP model?"
  962.  
  963. A: A linear program is infeasible if the constraints are inconsistent, i.e.,
  964. if no feasible solution can be constructed. It's often difficult to track
  965. down a cause. The cure may even be ambiguous: is it that some demand was set
  966. too high, or a supply set too low? A useful technique is goal programming
  967. (or elastic programming), one variant of which is to include two explicit
  968. slack variables (positive and negative), with huge cost coefficients, in
  969. each constraint. The revised model is guaranteed to have a feasible solution
  970. (at a possibly unbearable cost); constraints that have large slack values in
  971. the "optimal" solution are prime suspects as causes of infeasibility in the
  972. original LP. (Many modelers recommend a an elastic programming philosophy
  973. even if you aren't having trouble achieving feasibility; the idea is that
  974. almost any constraint can be violated, for a great enough price.)
  975.  
  976. Another approach is to apply auxiliary algorithms that identify constraints
  977. or groups of constraints that can be considered to "cause" the infeasibility
  978. in an LP. A software system called ANALYZE was developed by Harvey Greenberg
  979. to provide computer-assisted analysis, including rule-based intelligence; he
  980. has also compiled a bibliography of more than 400 references on the subject
  981. of model analysis. A system based on the MINOS solver, called MINOS(IIS),
  982. available from John Chinneck (chinneck@sce.carleton.ca), can also be used to
  983. identify a so-called Irreducible Infeasible Subset; the IIS feature is now
  984. available in CPLEX (command "display iis"), OSL, and LINDO (command
  985. "debug"). As a final comment, commercial codes sometimes have other built-in
  986. features to help track infeasibilities.
  987.  
  988. Q6.3: "I want to know the specific constraints that contradict each other."
  989.  
  990. A: This may not be a well posed problem. If by this you mean you want to
  991. find the minimal set of constraints that should be removed to restore
  992. feasibility, this can be modeled as an Integer LP (which means, it's
  993. potentially a harder problem than the underlying LP itself). Start with a
  994. Goal Programming approach as outlined above, and introduce some 0-1
  995. variables to turn the slacks off or on. Then minimize on the sum of these
  996. 0-1 variables.
  997. John Chinneck (chinneck@sce.carleton.ca) has modified his MINOS(IIS)
  998. extension to find the Irreducible Infeasible Subset as explained in Chinneck
  999. and Dravnieks in the Spring 1991 ORSA Journal on Computing (vol 3, number
  1000. 2).
  1001.  
  1002. Q6.4: "I just want to know whether or not a feasible solution *exists*."
  1003.  
  1004. A: From the standpoint of computational complexity, finding out if an LP
  1005. model has a feasible solution is essentially as hard as actually finding the
  1006. optimal LP solution, within a factor of 2 on average, in terms of effort in
  1007. the Simplex Method; plug your problem into a normal LP solver with any
  1008. objective function you like, such as c=0. For MIP models, it's also
  1009. difficult - if there exists no feasible solution, then you must go through
  1010. the entire Branch and Bound procedure (or whatever algorithm you use) to
  1011. prove this. There are no shortcuts in general, unless you know something
  1012. useful about your model's structure (e.g., if you are solving some form of a
  1013. transportation problem, you may be able to assure feasibility by checking
  1014. that the sources add up to at least as great a number as the sum of the
  1015. destinations).
  1016.  
  1017. Q6.5: "I have an LP, except it's got several objective functions."
  1018.  
  1019. A: If you have several objectives, then you may find that they cannot all be
  1020. optimized by any one solution. Instead, you will need to look for a solution
  1021. or solutions that achieve an acceptable tradeoff between objectives.
  1022. Deciding what tradeoffs are "acceptable" is a topic of investigation in its
  1023. own right. You may want to consult MCDM WorldScan, the newsletter of the
  1024. International Society on Multiple Criteria Decision Making.
  1025.  
  1026. There are a few free software packages specifically for multiple objective
  1027. linear programming, including:
  1028.  
  1029.    * ADBASE computes all efficient (i.e., nondominated) extreme points of a
  1030.      multiple objective linear program. It is available without charge for
  1031.      research and instructional purposes. If someone has a genuine need for
  1032.      such a code, they should send a request to: Ralph E. Steuer, Faculty of
  1033.      Management Science, Brooks Hall, University of Georgia, Athens, GA
  1034.      30602-6255.
  1035.    * PROTASS is also available. Currently its web page is in Polish, but you
  1036.      can write to protass@free.polbox.pl.
  1037.    * NIMBUS is an interactive multiobjective optimization system that has a
  1038.      Web interface.
  1039.  
  1040. Other approaches that have worked are:
  1041.  
  1042.    * Goal Programming (treat the objectives as constraints with costed
  1043.      slacks), or, almost equivalently, form a composite function from the
  1044.      given objective functions;
  1045.    * Pareto preference analysis (essentially brute force examination of all
  1046.      vertices);
  1047.    * Put your objective functions in priority order, optimize on one
  1048.      objective, then change it to a constraint fixed at the optimal value
  1049.      (perhaps subject to a small tolerance), and repeat with the next
  1050.      function.
  1051.  
  1052. There is a section on this whole topic in [Nemhauser]. [Schrage] has a
  1053. chapter devoted to the subject. [Hwang] has also been recommended by a
  1054. reader on Usenet. As a final piece of advice, if you can cast your model in
  1055. terms of physical realities, or dollars and cents, sometimes the multiple
  1056. objectives disappear! 8v)
  1057.  
  1058. Q6.6: "I have an LP that has large almost-independent matrix blocks that are
  1059. linked by a few constraints. Can I take advantage of this?"
  1060.  
  1061. A: Possibly. See section 6.2 in [Nemhauser] for a discussion of
  1062. Dantzig-Wolfe decomposition. I am told that the commercial code OSL has
  1063. features to assist in doing this. With any other code, you'll have to create
  1064. your own framework and then call the LP solver to solve the subproblems. The
  1065. folklore is that generally such schemes take a long time to converge so that
  1066. they're slower than just solving the model as a whole, although research
  1067. continues. For now my advice, unless you are using OSL or your model is so
  1068. huge that a good solver can't fit it in memory, is to not bother decomposing
  1069. it. It's probably more cost effective to upgrade your solver, if the
  1070. algorithm is limiting you, than to invest your time; but I suppose that's an
  1071. underlying theme in a lot of my advice. 8v)
  1072.  
  1073. Q6.7: "I am looking for an algorithm to compute the convex hull of a finite
  1074. number of points in n-dimensional space."
  1075.  
  1076. A: There is a program called qhull, available at
  1077. ftp://geom.umn.edu/pub/software/qhull.tar.Z. When you uncompress it and
  1078. untar it, it will create a directory called qhull which has source code plus
  1079. a README file. It uses the "Beneath Beyond" method, described in
  1080. [Edelsbrunner].
  1081.  
  1082. A code in C called cdd is available at ftp://ifor13.ethz.ch/pub/fukuda/cdd
  1083. and is written by Komei Fukuda; download the file named cdd-***.tar.Z, where
  1084. *** is the version number (choose the most recent version, which at last
  1085. check was 056). It solves the problem stated above, as well as that of
  1086. enumerating all vertices. There is also a C++ version at this site (version
  1087. 073).
  1088.  
  1089. A code in C called rs, by David Avis, is available at
  1090. ftp://mutt.cs.mcgill.ca/pub/C/README and implements the reverse search
  1091. method.
  1092.  
  1093. Ken Clarkson has written a program called Hull which is an ANSI C program
  1094. that computes the convex hull of a point set in general dimension. The input
  1095. is a list of points, and the output is a list of facets of the convex hull
  1096. of the points, each facet presented as a list of its vertices. It can be
  1097. downloaded from ftp://netlib.bell-labs.com/netlib/voronoi/hull.shar.Z.
  1098.  
  1099. There is a directory in ftp://elib.zib-berlin.de/pub/mathprog/polyth that
  1100. contains pointers to some tools for such problems.
  1101.  
  1102. Nina Amenta has a list of computational geometry software at
  1103. http://www.geom.umn.edu/locate/cglist.
  1104.  
  1105. Other algorithms for such problems are described in [Swart], [Seidel], and
  1106. [Avis]. Such topics are said to be discussed in [Schrijver] (page 224),
  1107. [Chvatal] (chapter 18), [Balinski], and [Mattheis] as well. Part of the
  1108. method described in [Avis], to enumerate vertices, is implemented in a
  1109. Mathematica package called VertexEnum.m at
  1110. ftp://cs.sunysb.edu/pub/Combinatorica, in file VE041.Z.
  1111.  
  1112. Q6.8: "Are there any parallel LP codes?"
  1113.  
  1114. A: The vendors for OSL, CPLEX and XPRESS-MP each have announced parallel
  1115. implementations of Branch and Bound solvers for MIP. CPLEX has also
  1116. announced parallel implementations of its barrier and dual simplex
  1117. algorithms on the Silicon Graphics Power Challenge, and OSL likewise has a
  1118. parallel implementation of its barrier method for its SP2 system.
  1119.  
  1120. Jeffrey Horn (horn@cs.wisc.edu) has compiled a bibliography of papers
  1121. relating to research on parallel B&B. There is an survey article by Gendron
  1122. and Crainic in the journal Operations Research, Vol. 42 (1994), No. 6, pp.
  1123. 1042-1066.
  1124.  
  1125. If your particular model is a good candidate for decomposition (see
  1126. Decomposition, above) then that form of parallelism could also be very
  1127. useful, but you'll have to implement it yourself. Here's what I say to
  1128. people who write parallel LP solvers as class projects:
  1129.  
  1130. You are probably working with the tableau form of the Simplex method. This
  1131. method works well for small models, but it is inefficient for most
  1132. real-world models because such models are usually <1% dense. Sparse matrix
  1133. methods dominate here. It may well be true that you can get good parallel
  1134. speedups with your code, but I'd wager that by the time you get to problems
  1135. with 1000 rows, any parallel-dense LP code will be slower than a single-
  1136. processor sparse code. And, worse yet, I think it's generally accepted that
  1137. no one currently knows how to do a good (i.e., scalable) parallel sparse LP
  1138. code. I wouldn't be harping on this point, except that most people's
  1139. interest in parallelism is because of the promise of scalability, in which
  1140. case large-scale considerations are important. Writing even a
  1141. single-processor large-scale LP code is a multi-year project, realistically.
  1142. The point is, don't get too enthralled by speedups in your code, unless
  1143. there's something to what you are doing that I haven't guessed.
  1144.  
  1145. Q6.9: "What software is there for Network models?"
  1146.  
  1147. A: In the context of linear programming, the term "network" is most often
  1148. associated with the minimum-cost network flow problem. A network for this
  1149. problem is viewed as a collection of nodes (or circles or locations) and
  1150. arcs (or lines or routes) connecting selected pairs of nodes. Arcs carry a
  1151. physical or conceptual flow of some kind, and may be directed (one-way) or
  1152. undirected (two-way). Some nodes may be sources (permitting flow to enter
  1153. the network) or sinks (permitting flow to leave).
  1154.  
  1155. The network linear programming problem is to minimize the (linear) total
  1156. cost of flows along all arcs of a network, subject to conservation of flow
  1157. at each node, and upper and/or lower bounds on the flow along each arc. This
  1158. is a special case of the general linear programming problem. The
  1159. transportation problem is an even more special case in which the network is
  1160. bipartite: all arcs run from nodes in one subset to the nodes in a disjoint
  1161. subset. A variety of other well-known network problems, including shortest
  1162. path problems, maximum flow problems, and certain assignment problems, can
  1163. also be modeled and solved as network linear programs. Details are presented
  1164. in many books on linear programming and operations research.
  1165.  
  1166. Network linear programs can be solved 10 to 100 times faster than general
  1167. linear programs of the same size, by use of specialized optimization
  1168. algorithms. Some commercial LP solvers include a version of the network
  1169. simplex method for this purpose. That method has the nice property that, if
  1170. it is given integer flow data, it will return optimal flows that are
  1171. integral. Integer network LPs can thus be solved efficiently without resort
  1172. to complex integer programming software.
  1173.  
  1174. Unfortunately, many different network problems of practical interest do not
  1175. have a formulation as a network LP. These include network LPs with
  1176. additional linear "side constraints" (such as multicommodity flow problems)
  1177. as well as problems of network routing and design that have completely
  1178. different kinds of constraints. In principle, nearly all of these network
  1179. problems can be modeled as integer programs. Some "easy" cases can be solved
  1180. much more efficiently by specialized network algorithms, however, while
  1181. other "hard" ones are so difficult that they require specialized methods
  1182. that may or may not involve some integer programming. Contrary to many
  1183. people's intuition, the statement of a hard problem may be only marginally
  1184. more complicated than the statement of some easy problem.
  1185.  
  1186. A canonical example of a hard network problem is the "traveling salesman"
  1187. problem of finding a shortest tour through a network that visits each node
  1188. once. A canonical easy problem not obviously equivalent to a linear program
  1189. is the "minimum spanning tree" problem to find a least-cost collection of
  1190. arcs that connect all the nodes. But if instead you want to connect only
  1191. some given subset of nodes (the "Steiner tree" problem) then you are faced
  1192. with a hard problem. These and many other network problems are described in
  1193. some of the references below.
  1194.  
  1195. Software for network optimization is thus in a much more fragmented state
  1196. than is general-purpose software for linear programming. The following are
  1197. some of the implementations that are available for downloading. Most are
  1198. freely available for many purposes, but check their web pages or "readme"
  1199. files for details.
  1200.  
  1201.    * ASSCT, an implementation of the Hungarian Method for the Assignment
  1202.      problem (#548 from Collected Algorithms of the ACM).
  1203.  
  1204.    * GIDEN, an interactive graphical environment for a variety of network
  1205.      problems and algorithms, available as a Java application or as an
  1206.      applet that can be executed through any Java-enabled Web browser.
  1207.      Further information is available by writing to giden@iems.nwu.edu.
  1208.  
  1209.    * MCF, a C implementation of the network simplex method (from Andreas
  1210.      Loebel, loebel@zib.de).
  1211.  
  1212.    * Netflo, the Fortran network simplex code from [Kennington], and several
  1213.      codes for maximum matching and maximum flow problems (from DIMACS,
  1214.      help@dimacs.rutgers.edu)
  1215.  
  1216.    * PPRN, for single or multicommodity network flow problems having a
  1217.      linear or nonlinear objective function, optionally with linear side
  1218.      constraints, by Jordi Castro (jcastro@etse.urv.es)
  1219.  
  1220.    * RELAX-IV for minimum-cost network flows (by Dimitri Bertsekas,
  1221.      bertsekas@lids.mit.edu and Paul Tseng, tseng@math.washington.edu); also
  1222.      a C++ version of the RELAX-IV algorithm (at the Department of Computer
  1223.      Science, University of Pisa, frangio@di.unipi.it)
  1224.  
  1225. The following indexes may also be useful:
  1226.  
  1227.    * Network optimization codes in Fortran 77 and in C, compiled by Ernesto
  1228.      Martins (eqvm@mat.uc.pt)
  1229.  
  1230.    * The network optimization library, including codes for assignment,
  1231.      shortest path, minimum-cost flow, and maximum flow/minimum cut, by
  1232.      Andrew Goldberg (avg@research.nj.nec.com).
  1233.  
  1234.    * Optimization routines for networks and graphs in the listing of
  1235.      public-domain optimization codes maintained by Jiefeng Xu
  1236.      (Jiefeng.Xu@Colorado.edu).
  1237.  
  1238.    * Network optimization listings from the NEOS Guide.
  1239.  
  1240. Fortran code for the Assignment Problem and others can also be copied
  1241. from[Burkard] and from [Martello].
  1242.  
  1243. Q6.10: "What software is there for the Traveling Salesman Problem (TSP)?"
  1244.  
  1245. A: TSP is a famously hard problem that has attracted many of the best minds
  1246. in the field. Solving for a proved optimum is combinatorial in nature;
  1247. methods have been explored both to give proved optimal solutions, and to
  1248. give approximate but "good" solutions. To my knowledge, there aren't any
  1249. commercial products to solve this problem. Public domain code for the
  1250. Asymmetric TSP is available in TOMS routine #750 available at
  1251. ftp://netlib2.cs.utk.edu/toms/750; it is documented in [Carpaneto]. For a
  1252. bibliography, check the Integer Programming section of [Nemhauser],
  1253. particularly the references with the names Groetschel and/or Padberg in
  1254. them. A good reference is [Lawler]. Another good one is [Reinelt]. There are
  1255. some heuristics for getting a "good" solution in the article by Lin and
  1256. Kernighan in Operations Research, Vol 21 (1973), pp 498-516. [Syslo]
  1257. contains some algorithms and Pascal code. Numerical Recipes [Press] contains
  1258. code that uses Simulated Annealing. [Bentley] is said to contain a
  1259. description of how to write a TSP code. Code for a solver can be obtained
  1260. via instructions in [Volgenant]. Bob Craig of Lucent Technologies
  1261. (kat3@ihgp-ebb.ih.lucent.com) has software written in C, for both exact
  1262. solution and heuristics, that he is willing to make available to those who
  1263. request it. Likewise, Chad Hurwitz (churritz@cts.com), offers a code called
  1264. tsp_solve for heuristic and optimal solution, to those who email him.
  1265.  
  1266. Q6.11: "What software is there for the Knapsack Problem?"
  1267.  
  1268. A: As with the TSP, I don't know of any commercial solvers for this specific
  1269. problem. Any good MIP solver should be able to be used, although any given
  1270. instance of this problem could be difficult. Specialized algorithms are said
  1271. to be available in [Syslo] and [Martello]. Bob Craig of Lucent Technologies
  1272. (kat3@ihgp-ebb.ih.lucent.com) has software written in C, for both exact
  1273. solution and heuristics, that he is willing to make available to those who
  1274. request it.
  1275.  
  1276. Q6.12: "What software is there for Stochastic Programming?"
  1277.  
  1278. A: [Thanks to Derek Holmes, dholmes@engin.umich.edu, for this text.] Your
  1279. success solving a stochastic program depends greatly on the characteristics
  1280. of your problem. The two broad classes of stochastic programming problems
  1281. are recourse problems and chance- constrained (or probabilistically
  1282. constrained) problems.
  1283.  
  1284. Recourse Problems are staged problems wherein one alteranates decisions with
  1285. realizations of stochastic data. The objective is to minimize total expected
  1286. costs of all decisions. The main sources of code (not necessarily public
  1287. domain) depend on how the data is distributed and how many stages (decision
  1288. points) are in the problem. For discretely distributed multistage problems,
  1289. a good package called MSLiP is available from Gus Gassman
  1290. (gassmann@ac.dal.ca, written up in Math. Prog. 47,407-423) Also, for not
  1291. huge discretely distributed problems, a deterministic equivalent can be
  1292. formed which can be solved with a standard solver. STOPGEN, available via
  1293. anonymous FTP from this author is a program which forms deterministic equiv.
  1294. MPS files from stopro problems in standard format (Birge, et. al., COAL
  1295. newsletter 17). The most recent program for continuously distributed data is
  1296. BRAIN, by K. Frauendorfer (frauendorfer@sgcl1.unisg.ch, written up in detail
  1297. in the author's monograph ``Stochastic Two-Stage Programming'', Lecture
  1298. Notes in Economics & Math. Systems #392 (Springer-Verlag).
  1299.  
  1300. CCP problems are not usually staged, and have a constraint of the form Pr(
  1301. Ax <= b ) >= alpha. The solvability of CCP problems depends on the
  1302. distribution of the data (A &/v b). I don't know of any public domain codes
  1303. for CCP probs., but you can get an idea of how to approach the problem by
  1304. reading Chapter 5 by Prof. A. Prekopa (prekopa@cancer.rutgers.edu) Y.
  1305. Ermoliev, and R. J-B. Wets, eds., Numerical Techniques for Stochastic
  1306. Optimization (Series in Comp. Math. 10, Springer-Verlag, 1988).
  1307.  
  1308. Both Springer Verlag texts mentioned above are good introductory references
  1309. to Stochastic Programming. This list of codes is far from comprehensive, but
  1310. should serve as a good starting point.
  1311.  
  1312. Q6.13: "I need to do post-optimal analysis."
  1313.  
  1314. A: Many commercial LP codes have features to do this. Also called Ranging or
  1315. Sensitivity Analysis, it gives information about how the coefficients in the
  1316. problem could change without affecting the nature of the solution. Most LP
  1317. textbooks, such as [Nemhauser], describe this. Unfortunately, all this
  1318. theory applies only to LP.
  1319.  
  1320. For a MIP model with both integer and continuous variables, you could get a
  1321. limited amount of information by fixing the integer variables at their
  1322. optimal values, re-solving the model as an LP, and doing standard
  1323. post-optimal analyses on the remaining continuous variables; but this tells
  1324. you nothing about the integer variables, which presumably are the ones of
  1325. interest. Another MIP approach would be to choose the coefficients of your
  1326. model that are of the most interest, and generate "scenarios" using values
  1327. within a stated range created by a random number generator. Perhaps five or
  1328. ten scenarios would be sufficient; you would solve each of them, and by some
  1329. means compare, contrast, or average the answers that are obtained. Noting
  1330. patterns in the solutions, for instance, may give you an idea of what
  1331. solutions might be most stable. A third approach would be to consider a
  1332. goal-programming formulation; perhaps your desire to see post-optimal
  1333. analysis is an indication that some important aspect is missing from your
  1334. model.
  1335.  
  1336. Q6.14: "Do LP codes require a starting vertex?"
  1337.  
  1338. A: No. You just have to give an LP code the constraints and the objective
  1339. function, and it will construct the vertices for you. Most codes go through
  1340. a so-called two phase method, wherein the code first looks for a feasible
  1341. solution, and then works on getting an optimal solution. The first phase can
  1342. begin anywhere, such as with all the variables at zero (though commercial
  1343. codes typically have a so-called "crash" algorithm to pick a better starting
  1344. point). So, no, you don't have to give a code a starting point. On the other
  1345. hand, it is not uncommon to do so, because it can speed up the solution time
  1346. tremendously. Commercial codes usually allow you to do this (they call it a
  1347. "basis", though that's a loose usage of a specific linear algebra concept);
  1348. free codes generally don't. You'd normally want to bother with a starting
  1349. basis only when solving families of related and difficult LP's (i.e., in
  1350. some sort of production mode).
  1351.  
  1352. Q6.15: "How can I combat cycling in the Simplex algorithm?"
  1353.  
  1354. A: Cycling is the condition that occurs when the Simplex method gets "stuck"
  1355. and finds itself repeating the same vertices over and over. While this
  1356. specific behavior is rather rare in practice, it is quite common for the
  1357. algorithm to reach a point where it temporarily stops making forward
  1358. progress in terms of improvement in the objective function; this is termed
  1359. "stalling", or more loosely known as "degeneracy" since it is caused by one
  1360. or more basic variables taking on the value of a lower or upper bound. In
  1361. most cases, the algorithm will work through this nest of coincident
  1362. vertices, then resume making tangible progress. However, in extreme cases
  1363. the degeneracy is so bad that to all intents and purposes it can be
  1364. considered cycling.
  1365.  
  1366. The simplest answer to the problem of degeneracy/cycling is often to "get a
  1367. better optimizer", i.e. one with stronger pricing algorithms, and a better
  1368. selection of features. However, obviously that is not always an option
  1369. (money!), and even the best LP codes can run into degeneracy on certain
  1370. models. Besides, they say it's a poor workman who blames his tools.
  1371.  
  1372. So, when one cannot change the optimizer, it's expedient to change the
  1373. model. Not drastically, of course, but a little "noise" can usually help to
  1374. break the ties that occur during the Simplex method. A procedure that can
  1375. work nicely is to add, to the values in the RHS, random values roughly six
  1376. orders of magnitude smaller. Depending on your model's formulation, such a
  1377. perturbation may not even seriously affect the quality of the solution
  1378. values. However, if you want to switch back to the original formulation, the
  1379. final solution basis for the perturbed model should be a useful starting
  1380. point for a "cleanup" optimization phase. (Depending on the code you are
  1381. using, this may take some ingenuity to do, however.)
  1382.  
  1383. Another helpful tactic: if your optimization code has more than one solution
  1384. algorithm, you can alternate among them. When one algorithm gets stuck,
  1385. begin again with another algorithm, using the most recent basis as a
  1386. starting point. For instance, alternating between a primal and a dual method
  1387. can move the solution away from a nasty point of degeneracy. Using partial
  1388. pricing can be a useful tactic against true cycling, as it tends to reorder
  1389. the columns. And of course Interior Point algorithms are much less affected
  1390. by (though not totally immune to) degeneracy. Unfortunately, the optimizers
  1391. richest in alternate algorithms and features also tend to be least prone to
  1392. problems with degeneracy in the first place.
  1393.  
  1394. [ ]
  1395.  
  1396. Q7. "What references and web links are there in this field?"
  1397.  
  1398. A: What follows here is an idiosyncratic list, a few books that I like, or
  1399. have been recommended on the net, or are recent. I have *not* reviewed them
  1400. all.
  1401.  
  1402. Regarding the common question of the choice of textbook for a college LP
  1403. course, it's difficult to give a blanket answer because of the variety of
  1404. topics that can be emphasized: brief overview of algorithms, deeper study of
  1405. algorithms, theorems and proofs, complexity theory, efficient linear
  1406. algebra, modeling techniques, solution analysis, and so on. A small and
  1407. unscientific poll of ORCS-L mailing list readers in 1993 uncovered a
  1408. consensus that [Chvatal] was in most ways pretty good, at least for an
  1409. algorithmically oriented class; of course, some new candidate texts have
  1410. been published in the meantime. For a class in modeling, a book about a
  1411. commercial code would be useful (LINDO, AMPL, GAMS were suggested),
  1412. especially if the students are going to use such a code; and I have always
  1413. had a fondness for the book by [Williams].
  1414.  
  1415. General reference
  1416.  
  1417.    * Nemhauser, Rinnooy Kan, & Todd, eds, Optimization, North-Holland, 1989.
  1418.      (Very broad-reaching, with large bibliography. Good reference; it's the
  1419.      place I tend to look first. Expensive, and tough reading for
  1420.      beginners.)
  1421.    * Harvey Greenberg has compiled an on-line Mathematical Programming
  1422.      Glossary.
  1423.  
  1424. Books containing source code
  1425.  
  1426.    * Best and Ritter, Linear Programming: active set analysis and computer
  1427.      programs, Prentice-Hall, 1985.
  1428.    * Bertsekas, D.P., Linear Network Optimization: Algorithms and Codes, MIT
  1429.      Press, 1991.
  1430.    * Bunday and Garside, Linear Programming in Pascal, Edward Arnold
  1431.      Publishers, 1987.
  1432.    * Bunday, Linear Programming in Basic (presumably the same publisher).
  1433.    * Burkard and Derigs, Springer Verlag Lecture Notes in Math Systems #184
  1434.      (the Assignment Problem and others).
  1435.    * Kennington & Helgason, Algorithms for Network Programming, Wiley, 1980.
  1436.      (A special case of LP; contains Fortran source code.)
  1437.    * Lau, H.T., A Numerical Library in C for Scientists and Engineers ,
  1438.      1994, CRC Press. (Contains a section on optimization.)
  1439.    * Martello and Toth, Knapsack Problems: Algorithms and Computer
  1440.      Implementations, Wiley, 1990. (Contains Fortran code, comes with a disk
  1441.      - also covers Assignment Problem.)
  1442.    * Press, Flannery, Teukolsky & Vetterling, Numerical Recipes, Cambridge,
  1443.      1986. (Comment: use their LP code with care.)
  1444.    * Syslo, Deo & Kowalik, Discrete Optimization Algorithms with Pascal
  1445.      Programs, Prentice-Hall (1983). (Contains code for 28 algorithms such
  1446.      as Revised Simplex, MIP, networks.)
  1447.  
  1448. LP textbooks
  1449.  
  1450.    * Bazaraa, Jarvis and Sherali. Linear Programming and Network Flows. Grad
  1451.      level.
  1452.    * Bertsimas, Dimitris and Tsitsiklis, John, Introduction to Linear
  1453.      Optimization. Athena Scientific, 1997 (ISBN 1-886529-19-1).
  1454.      Graduate-level text on linear programming, network flows, and discrete
  1455.      optimization.
  1456.    * Chvatal, Linear Programming, Freeman, 1983. Undergrad or grad.
  1457.    * Daellenbach and Bell, A User's Guide to LP. Good for engineers, but may
  1458.      be out of print.
  1459.    * Ecker & Kupferschmid, Introduction to Operations Research.
  1460.    * Ignizio, J.P. & Cavalier, T.M., Linear Programming, Prentice Hall,
  1461.      1994. Covers usual LP topics, plus interior point, multi-objective and
  1462.      heuristic techniques.
  1463.    * Luenberger, Introduction to Linear and Nonlinear Programming, Addison
  1464.      Wesley, 1984. Updated version of an old standby.
  1465.    * Murtagh, B., Advanced Linear Programming, McGraw-Hill, 1981. Good one
  1466.      after you've read an introductory text.
  1467.    * Murty, K., Linear and Combinatorial Programming.
  1468.    * Nash, S., and Sofer, A., Linear and Nonlinear Programming, McGraw-Hill,
  1469.      1996.
  1470.    * Nazareth, J.L., Computer Solution of Linear Programs, Oxford University
  1471.      Press, New York and Oxford, 1987.
  1472.    * Nering, E.D. & Tucker, A.W., Linear Programs and Related Problems,
  1473.      Academic Press, 1993.
  1474.    * Saigal, R., Linear Programming: A Modern Integrated Analysis, Kluwer
  1475.      Academic Publishers, 1995.
  1476.    * Schrijver, A., Theory of Linear and Integer Programming, Wiley, 1986.
  1477.      Advanced.
  1478.    * Taha, H., Operations Research: An Introduction, 1987.
  1479.    * Thie, P.R., An Introduction to Linear Programming and Game Theory,
  1480.      Wiley, 1988.
  1481.    * Vanderbei, Robert J., Linear Programming: Foundations and Extensions.
  1482.      Kluwer Academic Publishers, 1996 (ISBN 0-7923-9804-1). Balanced
  1483.      coverage of simplex and interior-point methods. Source code available
  1484.      on-line for all algorithms presented.
  1485.    * Williams, H.P., Model Building in Mathematical Programming, Wiley 1993,
  1486.      3rd edition. Little on algorithms, but excellent for learning what
  1487.      makes a good model.
  1488.  
  1489. Interior-Point LP methods (descendants of "Karmarkar's algorithm")
  1490.  
  1491.    * Arbel, Ami, Exploring Interior-Point Linear Programming, MIT Press,
  1492.      1993. Includes small-scale IBM PC software (binary only).
  1493.    * Fang and Puthenpura, Linear Optimization and Extensions. (Grad level
  1494.      textbook, also contains some Simplex and Ellipsoid. I heard mixed
  1495.      opinions on this one.)
  1496.    * Lustig, Marsten & Shanno, "Interior Point Methods for Linear
  1497.      Programming: Computational State of the Art", ORSA Journal on
  1498.      Computing, Vol. 6, No. 1, Winter 1994, pp. 1-14. Followed by commentary
  1499.      articles, and a rejoinder by the authors.
  1500.    * Roos, Terlaky and Vial, Theory and Algorithms for Linear Optimization:
  1501.      An Interior Point Approach. John Wiley, Chichester, 1997
  1502.    * Wright, Stephen J., Primal-Dual Interior-Point Methods. SIAM
  1503.      Publications, 1997. Covers theoretical, practical and computational
  1504.      aspects of the most important and useful class of interior-point
  1505.      algorithms. The web page for this book contains current information on
  1506.      interior-point codes for linear programming, including links to their
  1507.      web sites.
  1508.  
  1509. Presentations of commercially marketed systems (usable as texts for some
  1510. classes)
  1511.  
  1512.    * Bisschop & Entriken, AIMMS: The Modeling System, Paragon Decision
  1513.      Technology, 1993.
  1514.    * Brooke, Kendrick & Meeraus, GAMS: A Users' Guide, The Scientific
  1515.      Press/Duxbury Press, 1988.
  1516.    * Fourer, Gay & Kernighan, AMPL: A Modeling Language for Mathematical
  1517.      Programming, The Scientific Press/Duxbury Press, 1992. (Comes with DOS
  1518.      "student" version including MINOS and CPLEX.)
  1519.    * Greenberg, H.J., Modeling by Object-Driven Linear Elemental Relations:
  1520.      A User's Guide for MODLER, Kluwer Academic Publishers, 1993.
  1521.    * Schrage, L., LINDO: An Optimization Modeling System, The Scientific
  1522.      Press/Duxbury Press, 1991.
  1523.  
  1524. Additional books
  1525.  
  1526.    * Ahuja, Magnanti & Orlin, Network Flows, Prentice Hall, 1993.
  1527.    * Beasley, J.E., ed., Advances in Linear and Integer Programming. Oxford
  1528.      University Press, 1996 (ISBN 0-19-853856-1). Each chapter is a
  1529.      self-contained essay on one aspect of the subject.
  1530.    * Bondy & Murty, Graph Theory with Applications.
  1531.    * Edelsbrunner, Algorithms in Combinatorial Geometry, Springer Verlag,
  1532.      1987.
  1533.    * Forsythe, Malcolm & Moler, Computer Methods for Mathematical
  1534.      Computations, Prentice-Hall.
  1535.    * Gill, Murray and Wright, Numerical Linear Algebra and Optimization,
  1536.      Addison-Wesley, 1991.
  1537.    * Greenberg, H.J., A Computer-Assisted Analysis System for Mathematical
  1538.      Programming Models and Solutions: A User's Guide for ANALYZE, Kluwer
  1539.      Academic Publishers, 1993.
  1540.    * Hwang & Yoon, Multiple Attribute Decision Making : Methods and
  1541.      Applications, Springer-Verlag, Lecture Notes #186.
  1542.    * Lawler, Lenstra, et al, The Traveling Salesman Problem, Wiley, 1985.
  1543.    * More' & Wright, Optimization Software Guide, SIAM Publications, 1993.
  1544.      See also the NEOS Guide to Optimization Software.
  1545.    * Murty, Network Programming, Prentice Hall, 1992.
  1546.    * Papadimitriou & Steiglitz, Combinatorial Optimization. (Also contains a
  1547.      discussion of complexity of Simplex method.)
  1548.    * Reeves, C.R., ed., Modern Heuristic Techniques for Combinatorial
  1549.      Problems, Halsted Press (Wiley), 1993. (Contains chapters on tabu
  1550.      search, simulated annealing, genetic algorithms, neural nets, and
  1551.      Lagrangian relaxation.)
  1552.    * Reinelt, G., The Travelling Salesman: Computational Solutions for TSP
  1553.      Applications, Springer-Verlag Lecture Notes in Computer Science #840,
  1554.      1994.
  1555.  
  1556. Other publications
  1557.  
  1558.    * Avis & Fukuda, "A Pivoting Algorithm for Convex Hulls and Vertex
  1559.      Enumeration of Arrangements and Polyhedra", Discrete and Computational
  1560.      Geometry, 8 (1992), 295--313.
  1561.    * Balas, E. and Martin, C., "Pivot And Complement: A Heuristic For 0-1
  1562.      Programming Problems", Management Science, 1980, Vol 26, pp 86-96.
  1563.    * Balinski, M.L., "An Algorithm for Finding all Vertices of Convex
  1564.      Polyhedral Sets", SIAM J. 9, 1, 1961.
  1565.    * Carpaneto, Dell'amico & Toth, "A Branch-and-bound Algorithm for Large
  1566.      Scale Asymmetric Travelling Salesman Problems", ACM Transactions on
  1567.      Mathematical Software (TOMS), December 1995.
  1568.    * Mattheis and Rubin, "A Survey and Comparison of Methods for Finding All
  1569.      Vertices of Convex Polyhedral Sets", Mathematics of Operations
  1570.      Research, vol. 5 no. 2 1980, pp. 167-185.
  1571.    * Seidel, "Constructing Higher-Dimensional Convex Hulls at Logarithmic
  1572.      Cost per Face", 1986, 18th ACM STOC, 404--413.
  1573.    * Smale, Stephen, "On the Average Number of Steps in the Simplex Method
  1574.      of Linear Programming", Math Programming 27 (1983), 241-262.
  1575.    * Swart, "Finding the Convex Hull Facet by Facet", Journal of Algorithms,
  1576.      6 (1985), 17--48.
  1577.    * Volgenant, A., Symmetric TSPs, European Journal of Operations Research,
  1578.      49 (1990) 153-154.
  1579.  
  1580. On-Line Sources of Papers and Bibliographies
  1581.  
  1582.    * Michael Trick's Operations Research Page at http://mat.gsia.cmu.edu/
  1583.    * Optimization Technology Center: home of NEOS, Network-Enabled
  1584.      Optimization System.
  1585.    * WORMS (World-Wide-Web for Operations Research and Management Science)
  1586.      at http://www.maths.mu.oz.au/~worms/
  1587.    * List of interesting optimization codes in public domain at
  1588.      http://ucsu.colorado.edu/~xu/software.html. Includes many of the codes
  1589.      listed here, plus others of interest for specific problem classes.
  1590.    * Computational Mathematics Archive (London and South East Centre for
  1591.      High Performance Computing)
  1592.      http://www.lpac.ac.uk/SEL-HPC/Articles/GeneratedHtml/math.opt.html
  1593.    * Bibliography of books and survey papers on combinatorial optimization
  1594.      compiled by Brian Borchers (borchers@nmt.edu),
  1595.      ftp://archives.math.utk.edu/teaching.materials/bibliography/comb.opt.
  1596.    * Bibliography of books and papers on Interior-Point methods (taking more
  1597.      than 400 kilobytes storage with over 1300 entries!?!) in
  1598.      ftp://netlib2.cs.utk.edu/bib/intbib.bib, compiled by Dr. Eberhard
  1599.      Kranich (puett@math.uni-wuppertal.de).
  1600.    * Interior-Point Methods Online (another service of NEOS) contains most
  1601.      new reports in the area of interior-point methods that have appeared
  1602.      since December 1994 (over 200 reports as of March 1997). Abstracts for
  1603.      all reports are available, as are links to postscript source for most
  1604.      reports . A mailing list is used to notify interested parties whenever
  1605.      a new report arrives. You can join the list through a web page, or you
  1606.      can send mail to interior-point-methods-request@mcs.anl.gov containing
  1607.      the single word subscribe.
  1608.    * Information related to Semidefinite Programming is at
  1609.      ftp://orion.uwaterloo.ca/pub/henry/teaching/co769g/readme.html
  1610.    * An extensive bibliography for stochastic programming has been compiled
  1611.      by Maarten van der Vlerk at
  1612.      http://mally.eco.rug.nl/biblio/stoprog.html.
  1613.    * INFORMS home page is at http://www.informs.org/.
  1614.    * IMPS Consortium is at http://www-math.cudenver.edu/~hgreenbe/imps.html
  1615.  
  1616. On-Line Sources of Optimization Services
  1617.  
  1618. The following web sites offer, in some sense, to run your optimization
  1619. problem and return a result. Check their home pages for details, which vary
  1620. considerably. (Some are intended for nonlinear programming, but are included
  1621. here for completeness.)
  1622.  
  1623.    * DecisionNet. Provides access to "a distributed collection of decision
  1624.      technologies," including linear programming, "that are made available
  1625.      for execution over the World Wide Web. These technologies are developed
  1626.      and maintained locally by their providers. DecisionNet contains
  1627.      technology metainformation necessary to guide consumers in search,
  1628.      selection, and execution of these technologies." Facilities for
  1629.      submitting problems in popular modeling language formats are currently
  1630.      being tested.
  1631.  
  1632.    * GIDEN. An interactive graphical environment for a variety of network
  1633.      optimization problems and algorithms. It is written in Java, so you can
  1634.      try it out through any Java-enabled Web browser.
  1635.  
  1636.    * IBM Optimization Subroutine Library (OSL). Linear and quadratic
  1637.      programs in MPS format may be submitted by anonymous ftp.
  1638.  
  1639.    * Internet Enabled HQP Optimization Service. Nonlinear problems in SIF
  1640.      format may be submitted by e-mail.
  1641.  
  1642.    * MILP by Dmitry V. Golovashkin. Small-scale mixed-integer programs in a
  1643.      simple algebraic format are solved through a web form interface.
  1644.  
  1645.    * Network-Enabled Optimization System (NEOS) Server. Offers access to
  1646.      about a dozen solvers for a variety of optimization problems, including
  1647.      linear and nonlinear programming, network and stochastic linear
  1648.      programming, unconstrained and bound-constrained optimization of
  1649.      nonlinear functions, and nonlinear complementarity. Linear programs in
  1650.      MPS format and nonlinear problems in the form of a C or Fortran program
  1651.      may be submitted by e-mail, Web page, or a high speed, socket-based
  1652.      Unix interface.
  1653.  
  1654.    * NIMBUS. A multiobjective optimization system that accepts algebraic
  1655.      problem specifications through a series of Web forms.
  1656.  
  1657.    * Numerica. Global nonlinear optimization problems may be submitted in
  1658.      Numerica's algebraic modeling language, through a web form interface.
  1659.  
  1660. [ ]
  1661.  
  1662. Q8. "How do I access the Netlib server?"
  1663.  
  1664. A: If you have FTP access, you can try "ftp netlib2.cs.utk.edu", using
  1665. "anonymous" as the Name, and your email address as the Password. Do a "cd
  1666. (dir)" where (dir) is whatever directory was mentioned, and look around,
  1667. then do a "get (filename)" on anything that seems interesting. There often
  1668. will be a "README" file, which you would want to look at first. Another FTP
  1669. site is netlib.bell-labs.com although you will first need to do "cd netlib"
  1670. before you can cd to the (dir) you are interested in. Alternatively, you can
  1671. reach an e-mail server via "netlib@ornl.gov", to which you can send a
  1672. message saying "send index from (dir)"; follow the instructions you receive.
  1673. This is a list of sites mirroring the netlib repository:
  1674.  
  1675.    * Norway netlib@nac.no
  1676.    * England netlib@ukc.ac.uk
  1677.    * Germany anonymous@elib.zib-berlin.de
  1678.    * Taiwan netlib@nchc.edu.tw
  1679.    * Australia netlib@draci.cs.uow.edu.au
  1680.  
  1681. For those who have WWW (Mosaic, etc.) access, one can access Netlib via the
  1682. URL http://www.netlib.org. Also, there is, for X window users, a utility
  1683. called xnetlib that is available at ftp://netlib2.cs.utk.edu/xnetlib (look
  1684. at the "readme" file first).
  1685.  
  1686. [ ]
  1687.  
  1688. Q9. "Who maintains this FAQ list?"
  1689.  
  1690. A: This list was established by John W. Gregory (ashbury@skypoint.com), and
  1691. is currently being maintained by Robert Fourer (4er@iems.nwu.edu) and the
  1692. Optimization Technology Center.
  1693.  
  1694. This article is Copyright 1997 by Robert Fourer and John W. Gregory. It may
  1695. be freely redistributed in its entirety provided that this copyright notice
  1696. is not removed. It may not be sold for profit or incorporated in commercial
  1697. documents without the written permission of the copyright holder. Permission
  1698. is expressly granted for this document to be made available for file
  1699. transfer from installations offering unrestricted anonymous file transfer on
  1700. the Internet.
  1701.  
  1702. The material in this document does not reflect any official position taken
  1703. by any organization. While all information in this article is believed to be
  1704. correct at the time of writing, it is provided "as is" with no warranty
  1705. implied.
  1706.  
  1707. If you wish to cite this FAQ formally (hey, someone actually asked for
  1708. this), you may use:
  1709.  
  1710.      Fourer, Robert (4er@iems.nwu.edu) and Gregory, John W.
  1711.      (ashbury@skypoint.com), "Linear Programming FAQ" (1997). World
  1712.      Wide Web http://www.mcs.anl.gov/home/otc/
  1713.      faq/linear-programming-faq.html, Usenet sci.answers, anonymous FTP
  1714.      /pub/usenet/sci.answers/ linear-programming-faq from rtfm.mit.edu.
  1715.  
  1716. There's a mail server on rtfm.mit.edu, so if you don't have FTP privileges,
  1717. you can send an e-mail message to mail-server@rtfm.mit.edu containing:
  1718.  
  1719.     send usenet/sci.answers/linear-programming-faq
  1720.  
  1721. as the body of the message to receive the latest version (it is posted on
  1722. the first working day of each month). This FAQ is cross-posted to
  1723. news.answers and sci.op-research.
  1724.  
  1725. Suggestions, corrections, topics you'd like to see covered, and additional
  1726. material are all solicited. Send email to 4er@iems.nwu.edu.
  1727.  
  1728. [ ]
  1729.  
  1730. END linear-programming-faq
  1731.