The source code and dockerfile for the GSW2024 AI Lab.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

160 lines
7.1 KiB

2 months ago
  1. %* glpk10.tex *%
  2. \chapter{Stand-alone LP/MIP Solver}
  3. \label{chaglpsol}
  4. The GLPK package includes the program \verb|glpsol|, which is a
  5. stand-alone LP/MIP solver. This program can be invoked from the command
  6. line to read LP/MIP problem data in any format supported by GLPK, solve
  7. the problem, and write its solution to an output text file.
  8. \para{Usage}
  9. \verb|glpsol| [{\it options\dots}] [{\it filename}]
  10. \para{General options}
  11. \begin{verbatim}
  12. --mps read LP/MIP problem in fixed MPS format
  13. --freemps read LP/MIP problem in free MPS format (default)
  14. --lp read LP/MIP problem in CPLEX LP format
  15. --glp read LP/MIP problem in GLPK format
  16. --math read LP/MIP model written in GNU MathProg modeling
  17. language
  18. -m filename, --model filename
  19. read model section and optional data section from
  20. filename (same as --math)
  21. -d filename, --data filename
  22. read data section from filename (for --math only);
  23. if model file also has data section, it is ignored
  24. -y filename, --display filename
  25. send display output to filename (for --math only);
  26. by default the output is sent to terminal
  27. --seed value initialize pseudo-random number generator used in
  28. MathProg model with specified seed (any integer);
  29. if seed value is ?, some random seed will be used
  30. --mincost read min-cost flow problem in DIMACS format
  31. --maxflow read maximum flow problem in DIMACS format
  32. --cnf read CNF-SAT problem in DIMACS format
  33. --simplex use simplex method (default)
  34. --interior use interior point method (LP only)
  35. -r filename, --read filename
  36. read solution from filename rather to find it with
  37. the solver
  38. --min minimization
  39. --max maximization
  40. --scale scale problem (default)
  41. --noscale do not scale problem
  42. -o filename, --output filename
  43. write solution to filename in printable format
  44. -w filename, --write filename
  45. write solution to filename in plain text format
  46. --ranges filename
  47. write sensitivity analysis report to filename in
  48. printable format (simplex only)
  49. --tmlim nnn limit solution time to nnn seconds
  50. --memlim nnn limit available memory to nnn megabytes
  51. --check do not solve problem, check input data only
  52. --name probname change problem name to probname
  53. --wmps filename write problem to filename in fixed MPS format
  54. --wfreemps filename
  55. write problem to filename in free MPS format
  56. --wlp filename write problem to filename in CPLEX LP format
  57. --wglp filename write problem to filename in GLPK format
  58. --wcnf filename write problem to filename in DIMACS CNF-SAT format
  59. --log filename write copy of terminal output to filename
  60. -h, --help display this help information and exit
  61. -v, --version display program version and exit
  62. \end{verbatim}
  63. \para{LP basis factorization options}
  64. \begin{verbatim}
  65. --luf plain LU factorization (default)
  66. --btf block triangular LU factorization
  67. --ft Forrest-Tomlin update (requires --luf; default)
  68. --cbg Schur complement + Bartels-Golub update
  69. --cgr Schur complement + Givens rotation update
  70. \end{verbatim}
  71. \para{Options specific to the simplex solver}
  72. \begin{verbatim}
  73. --primal use primal simplex (default)
  74. --dual use dual simplex
  75. --std use standard initial basis of all slacks
  76. --adv use advanced initial basis (default)
  77. --bib use Bixby's initial basis
  78. --ini filename use as initial basis previously saved with -w
  79. (disables LP presolver)
  80. --steep use steepest edge technique (default)
  81. --nosteep use standard "textbook" pricing
  82. --relax use Harris' two-pass ratio test (default)
  83. --norelax use standard "textbook" ratio test
  84. --presol use presolver (default; assumes --scale and --adv)
  85. --nopresol do not use presolver
  86. --exact use simplex method based on exact arithmetic
  87. --xcheck check final basis using exact arithmetic
  88. \end{verbatim}
  89. \para{Options specific to the interior-point solver}
  90. \begin{verbatim}
  91. --nord use natural (original) ordering
  92. --qmd use quotient minimum degree ordering
  93. --amd use approximate minimum degree ordering (default)
  94. --symamd use approximate minimum degree ordering
  95. \end{verbatim}
  96. \para{Options specific to the MIP solver}
  97. \begin{verbatim}
  98. --nomip consider all integer variables as continuous
  99. (allows solving MIP as pure LP)
  100. --first branch on first integer variable
  101. --last branch on last integer variable
  102. --mostf branch on most fractional variable
  103. --drtom branch using heuristic by Driebeck and Tomlin
  104. (default)
  105. --pcost branch using hybrid pseudocost heuristic (may be
  106. useful for hard instances)
  107. --dfs backtrack using depth first search
  108. --bfs backtrack using breadth first search
  109. --bestp backtrack using the best projection heuristic
  110. --bestb backtrack using node with best local bound
  111. (default)
  112. --intopt use MIP presolver (default)
  113. --nointopt do not use MIP presolver
  114. --binarize replace general integer variables by binary ones
  115. (assumes --intopt)
  116. --fpump apply feasibility pump heuristic
  117. --proxy [nnn] apply proximity search heuristic (nnn is time limit
  118. in seconds; default is 60)
  119. --gomory generate Gomory's mixed integer cuts
  120. --mir generate MIR (mixed integer rounding) cuts
  121. --cover generate mixed cover cuts
  122. --clique generate clique cuts
  123. --cuts generate all cuts above
  124. --mipgap tol set relative mip gap tolerance to tol
  125. --minisat translate integer feasibility problem to CNF-SAT
  126. and solve it with MiniSat solver
  127. --objbnd bound add inequality obj <= bound (minimization) or
  128. obj >= bound (maximization) to integer feasibility
  129. problem (assumes --minisat)
  130. \end{verbatim}
  131. For description of the MPS format see Appendix \ref{champs}, page
  132. \pageref{champs}.
  133. For description of the CPLEX LP format see Appendix \ref{chacplex},
  134. page \pageref{chacplex}.
  135. For description of the modeling language see the document ``Modeling
  136. Language GNU MathProg: Language Reference'' included in the GLPK
  137. distribution.
  138. For description of the DIMACS min-cost flow problem format and DIMACS
  139. maximum flow problem format see the document ``GLPK: Graph and Network
  140. Routines'' included in the GLPK distribution.
  141. %* eof *%