
alpar@1: %* glpk10.tex *%
alpar@1: 
alpar@1: \chapter{Stand-alone LP/MIP Solver}
alpar@1: \label{chaglpsol}
alpar@1: 
alpar@1: The GLPK package includes the program \verb|glpsol|, which is a
alpar@1: stand-alone LP/MIP solver. This program can be invoked from the command
alpar@1: line of from the shell to read LP/MIP problem data in any format
alpar@1: supported by GLPK, solve the problem, and write the problem solution
alpar@1: obtained to an output text file.
alpar@1: 
alpar@1: \subsubsection*{Usage}
alpar@1: 
alpar@1: \noindent
alpar@1: \verb|glpsol| [{\it options\dots}] [{\it filename}]
alpar@1: 
alpar@1: \subsubsection*{General options}
alpar@1: 
alpar@1: \noindent
alpar@1: \begin{tabular}{@{}p{30mm}p{92.3mm}@{}}
alpar@1: \verb|--mps|      &  read LP/MIP problem in fixed MPS format \\
alpar@1: \verb|--freemps|  &  read LP/MIP problem in free MPS format (default)\\
alpar@1: \verb|--lp|       &  read LP/MIP problem in CPLEX LP format \\
alpar@1: \verb|--glp|      &  read LP/MIP problem in GLPK format \\
alpar@1: \verb|--math|     &  read LP/MIP model written in GNU MathProg modeling
alpar@1:                      language \\
alpar@1: \multicolumn{2}{@{}l}{{\tt -m} {\it filename}, {\tt --model}
alpar@1: {\it filename}} \\
alpar@1:                   &  read model section and optional data section from
alpar@1:                      {\it filename} (the same as \verb|--math|) \\
alpar@1: \multicolumn{2}{@{}l}{{\tt -d} {\it filename}, {\tt --data}
alpar@1: {\it filename}} \\
alpar@1:                   &  read data section from {\it filename}
alpar@1:                      (for \verb|--math| only); if model file also has
alpar@1:                      data section, that section is ignored \\
alpar@1: \multicolumn{2}{@{}l}{{\tt -y} {\it filename}, {\tt --display}
alpar@1: {\it filename}} \\
alpar@1:                   &  send display output to {\it filename}
alpar@1:                      (for \verb|--math| only); by default the output is
alpar@1:                      sent to \verb|stdout| \\
alpar@1: \end{tabular}
alpar@1: 
alpar@1: \noindent
alpar@1: \begin{tabular}{@{}p{30mm}p{92.3mm}@{}}
alpar@1: \verb|--seed| {\it value}
alpar@1:                   &  initialize pseudo-random number generator used in
alpar@1:                      MathProg model with specified seed (any integer);
alpar@1:                      if the seed value is specified as \verb|?|
alpar@1:                      (question mark), some random seed will be used\\
alpar@1: \verb|--mincost|  &  read min-cost flow problem in DIMACS format\\
alpar@1: \verb|--maxflow|  &  read maximum flow problem in DIMACS format\\
alpar@1: \verb|--simplex|  &  use simplex method (default) \\
alpar@1: \verb|--interior| &  use interior point method (for pure LP only) \\
alpar@1: \multicolumn{2}{@{}l}{{\tt -r} {\it filename}, {\tt --read}
alpar@1: {\it filename}} \\
alpar@1:                   &  read solution from {\it filename} rather to find
alpar@1:                      it with the solver \\
alpar@1: \verb|--min|      &  minimization \\
alpar@1: \verb|--max|      &  maximization \\
alpar@1: \verb|--scale|    &  scale problem (default) \\
alpar@1: \verb|--noscale|  &  do not scale problem \\
alpar@1: \multicolumn{2}{@{}l}{{\tt -o} {\it filename}, {\tt --output}
alpar@1: {\it filename}} \\
alpar@1:                   &  write solution to {\it filename} in printable
alpar@1:                      format \\
alpar@1: \multicolumn{2}{@{}l}{{\tt -w} {\it filename}, {\tt --write}
alpar@1: {\it filename}} \\
alpar@1:                   &  write solution to {\it filename} in plain text
alpar@1:                      format \\
alpar@1: \multicolumn{2}{@{}l}{{\tt --ranges} {\it filename}} \\
alpar@1:                   &  write sensitivity analysis report to {\it filename}
alpar@1:                      in printable format (simplex only) \\
alpar@1: \verb|--tmlim| {\it nnn}
alpar@1:                   &  limit solution time to {\it nnn} seconds
alpar@1:                      (\verb|--tmlim 0| allows obtaining solution at
alpar@1:                      initial point) \\
alpar@1: \verb|--memlim| {\it nnn}
alpar@1:                   &  limit available memory to {\it nnn} megabytes \\
alpar@1: \verb|--check|    &  do not solve problem, check input data only \\
alpar@1: \verb|--name| {\it probname}
alpar@1:                   &  change problem name to {\it probname} \\
alpar@1: \verb|--wmps| {\it filename}
alpar@1:                   &  write problem to {\it filename} in fixed MPS
alpar@1:                      format \\
alpar@1: \multicolumn{2}{@{}l}{{\tt --wfreemps} {\it filename}} \\
alpar@1:                   &  write problem to {\it filename} in free MPS
alpar@1:                      format \\
alpar@1: \verb|--wlp| {\it filename}
alpar@1:                   &  write problem to {\it filename} in CPLEX LP
alpar@1:                      format \\
alpar@1: \verb|--wglp| {\it filename}
alpar@1:                   &  write problem to {\it filename} in GLPK format \\
alpar@1: \verb|--log| {\it filename}
alpar@1:                   &  write copy of terminal output to {\it filename} \\
alpar@1: \verb|-h|, \verb|--help|
alpar@1:                   &  display this help information and exit \\
alpar@1: \verb|-v|, \verb|--version|
alpar@1:                   &  display program version and exit \\
alpar@1: \end{tabular}
alpar@1: 
alpar@1: \subsection*{LP basis factorization options}
alpar@1: 
alpar@1: \noindent
alpar@1: \begin{tabular}{@{}p{30mm}p{92.3mm}@{}}
alpar@1: \verb|--luf|      &  LU + Forrest--Tomlin update \\
alpar@1:                   &  (faster, less stable; default) \\
alpar@1: \verb|--cbg|      &  LU + Schur complement + Bartels--Golub update \\
alpar@1:                   &  (slower, more stable) \\
alpar@1: \verb|--cgr|      &  LU + Schur complement + Givens rotation update \\
alpar@1:                   &  (slower, more stable) \\
alpar@1: \end{tabular}
alpar@1: 
alpar@1: \subsubsection*{Options specific to the simplex solver}
alpar@1: 
alpar@1: \noindent
alpar@1: \begin{tabular}{@{}p{30mm}p{92.3mm}@{}}
alpar@1: \verb|--primal|   &  use primal simplex (default) \\
alpar@1: \verb|--dual|     &  use dual simplex \\
alpar@1: \verb|--std|      &  use standard initial basis of all slacks \\
alpar@1: \verb|--adv|      &  use advanced initial basis (default) \\
alpar@1: \verb|--bib|      &  use Bixby's initial basis\\
alpar@1: \verb|--ini| {\it filename}
alpar@1:                   &  use as initial basis previously saved with
alpar@1:                      \verb|-w| \\
alpar@1:                   & (disables LP presolver) \\
alpar@1: \verb|--steep|    &  use steepest edge technique (default) \\
alpar@1: \verb|--nosteep|  &  use standard ``textbook'' pricing \\
alpar@1: \verb|--relax|    &  use Harris' two-pass ratio test (default) \\
alpar@1: \verb|--norelax|  &  use standard ``textbook'' ratio test \\
alpar@1: \verb|--presol|   &  use LP presolver (default; assumes \verb|--scale|
alpar@1:                      and \verb|--adv|) \\
alpar@1: \verb|--nopresol| &  do not use LP presolver \\
alpar@1: \verb|--exact|    & use simplex method based on exact arithmetic \\
alpar@1: \verb|--xcheck|   & check final basis using exact arithmetic \\
alpar@1: \end{tabular}
alpar@1: 
alpar@1: \subsubsection*{Options specific to the interior-point solver}
alpar@1: 
alpar@1: \noindent
alpar@1: \begin{tabular}{@{}p{30mm}p{92.3mm}@{}}
alpar@1: \verb|--nord|     &  use natural (original) ordering \\
alpar@1: \verb|--qmd|      &  use quotient minimum degree ordering \\
alpar@1: \verb|--amd|      &  use approximate minimum degree ordering (default)\\
alpar@1: \verb|--symamd|   &  use approximate minimum degree ordering \\
alpar@1: \end{tabular}
alpar@1: 
alpar@1: \subsubsection*{Options specific to the MIP solver}
alpar@1: 
alpar@1: \noindent
alpar@1: \begin{tabular}{@{}p{30mm}p{92.3mm}@{}}
alpar@1: \verb|--nomip|    &  consider all integer variables as continuous
alpar@1:                      (allows solving MIP as pure LP) \\
alpar@1: \verb|--first|    &  branch on first integer variable \\
alpar@1: \verb|--last|     &  branch on last integer variable \\
alpar@1: \verb|--mostf|    &  branch on most fractional variable \\
alpar@1: \end{tabular}
alpar@1: 
alpar@1: \noindent
alpar@1: \begin{tabular}{@{}p{30mm}p{92.3mm}@{}}
alpar@1: \verb|--drtom|    &  branch using heuristic by Driebeck and Tomlin
alpar@1:                      (default) \\
alpar@1: \verb|--pcost|    &  branch using hybrid pseudocost heuristic (may be
alpar@1:                      useful for hard instances) \\
alpar@1: \verb|--dfs|      &  backtrack using depth first search \\
alpar@1: \verb|--bfs|      &  backtrack using breadth first search \\
alpar@1: \verb|--bestp|    &  backtrack using the best projection heuristic
alpar@1:                      (default) \\
alpar@1: \verb|--bestb|    &  backtrack using node with best local bound \\
alpar@1: \verb|--intopt|   &  use MIP presolver (default)\\
alpar@1: \verb|--nointopt| &  do not use MIP presolver\\
alpar@1: \verb|--binarize| &  replace general integer variables by binary ones
alpar@1:                      (assumes \verb|--intopt|)\\
alpar@1: \verb|--fpump|    & apply feasibility pump heuristic\\
alpar@1: \verb|--gomory|   &  generate Gomory's mixed integer cuts\\
alpar@1: \verb|--mir|      &  generate MIR (mixed integer rounding) cuts\\
alpar@1: \verb|--cover|    &  generate mixed cover cuts\\
alpar@1: \verb|--clique|   &  generate clique cuts\\
alpar@1: \verb|--cuts|     &  generate cuts of all classes above (assumes
alpar@1:                      \verb|--intopt|)\\
alpar@1: \verb|--mipgap| {\it tol}
alpar@1:                   & set relative mip gap tolerance to {\it tol}\\
alpar@1: \end{tabular}
alpar@1: 
alpar@1: \bigskip
alpar@1: 
alpar@1: \noindent
alpar@1: For description of the MPS format see Appendix \ref{champs},
alpar@1: page \pageref{champs}.
alpar@1: 
alpar@1: \bigskip
alpar@1: 
alpar@1: \noindent
alpar@1: For description of the CPLEX LP format see Appendix \ref{chacplex},
alpar@1: page \pageref{chacplex}.
alpar@1: 
alpar@1: \bigskip
alpar@1: 
alpar@1: \noindent
alpar@1: For description of the modeling language see the document ``Modeling
alpar@1: Language GNU MathProg: Language Reference'' included in the GLPK
alpar@1: distribution.
alpar@1: 
alpar@1: \bigskip
alpar@1: 
alpar@1: \noindent
alpar@1: For description of the DIMACS min-cost flow problem format and DIMACS
alpar@1: maximum flow problem format see the document ``GLPK: Graph and Network
alpar@1: Routines'' included in the GLPK distribution.
alpar@1: 
alpar@1: %* eof *%




