doc/glpk10.tex
changeset 1 c445c931472f
equal deleted inserted replaced
-1:000000000000 0:7ce18a6a8e03
       
     1 %* glpk10.tex *%
       
     2 
       
     3 \chapter{Stand-alone LP/MIP Solver}
       
     4 \label{chaglpsol}
       
     5 
       
     6 The GLPK package includes the program \verb|glpsol|, which is a
       
     7 stand-alone LP/MIP solver. This program can be invoked from the command
       
     8 line of from the shell to read LP/MIP problem data in any format
       
     9 supported by GLPK, solve the problem, and write the problem solution
       
    10 obtained to an output text file.
       
    11 
       
    12 \subsubsection*{Usage}
       
    13 
       
    14 \noindent
       
    15 \verb|glpsol| [{\it options\dots}] [{\it filename}]
       
    16 
       
    17 \subsubsection*{General options}
       
    18 
       
    19 \noindent
       
    20 \begin{tabular}{@{}p{30mm}p{92.3mm}@{}}
       
    21 \verb|--mps|      &  read LP/MIP problem in fixed MPS format \\
       
    22 \verb|--freemps|  &  read LP/MIP problem in free MPS format (default)\\
       
    23 \verb|--lp|       &  read LP/MIP problem in CPLEX LP format \\
       
    24 \verb|--glp|      &  read LP/MIP problem in GLPK format \\
       
    25 \verb|--math|     &  read LP/MIP model written in GNU MathProg modeling
       
    26                      language \\
       
    27 \multicolumn{2}{@{}l}{{\tt -m} {\it filename}, {\tt --model}
       
    28 {\it filename}} \\
       
    29                   &  read model section and optional data section from
       
    30                      {\it filename} (the same as \verb|--math|) \\
       
    31 \multicolumn{2}{@{}l}{{\tt -d} {\it filename}, {\tt --data}
       
    32 {\it filename}} \\
       
    33                   &  read data section from {\it filename}
       
    34                      (for \verb|--math| only); if model file also has
       
    35                      data section, that section is ignored \\
       
    36 \multicolumn{2}{@{}l}{{\tt -y} {\it filename}, {\tt --display}
       
    37 {\it filename}} \\
       
    38                   &  send display output to {\it filename}
       
    39                      (for \verb|--math| only); by default the output is
       
    40                      sent to \verb|stdout| \\
       
    41 \end{tabular}
       
    42 
       
    43 \noindent
       
    44 \begin{tabular}{@{}p{30mm}p{92.3mm}@{}}
       
    45 \verb|--seed| {\it value}
       
    46                   &  initialize pseudo-random number generator used in
       
    47                      MathProg model with specified seed (any integer);
       
    48                      if the seed value is specified as \verb|?|
       
    49                      (question mark), some random seed will be used\\
       
    50 \verb|--mincost|  &  read min-cost flow problem in DIMACS format\\
       
    51 \verb|--maxflow|  &  read maximum flow problem in DIMACS format\\
       
    52 \verb|--simplex|  &  use simplex method (default) \\
       
    53 \verb|--interior| &  use interior point method (for pure LP only) \\
       
    54 \multicolumn{2}{@{}l}{{\tt -r} {\it filename}, {\tt --read}
       
    55 {\it filename}} \\
       
    56                   &  read solution from {\it filename} rather to find
       
    57                      it with the solver \\
       
    58 \verb|--min|      &  minimization \\
       
    59 \verb|--max|      &  maximization \\
       
    60 \verb|--scale|    &  scale problem (default) \\
       
    61 \verb|--noscale|  &  do not scale problem \\
       
    62 \multicolumn{2}{@{}l}{{\tt -o} {\it filename}, {\tt --output}
       
    63 {\it filename}} \\
       
    64                   &  write solution to {\it filename} in printable
       
    65                      format \\
       
    66 \multicolumn{2}{@{}l}{{\tt -w} {\it filename}, {\tt --write}
       
    67 {\it filename}} \\
       
    68                   &  write solution to {\it filename} in plain text
       
    69                      format \\
       
    70 \multicolumn{2}{@{}l}{{\tt --ranges} {\it filename}} \\
       
    71                   &  write sensitivity analysis report to {\it filename}
       
    72                      in printable format (simplex only) \\
       
    73 \verb|--tmlim| {\it nnn}
       
    74                   &  limit solution time to {\it nnn} seconds
       
    75                      (\verb|--tmlim 0| allows obtaining solution at
       
    76                      initial point) \\
       
    77 \verb|--memlim| {\it nnn}
       
    78                   &  limit available memory to {\it nnn} megabytes \\
       
    79 \verb|--check|    &  do not solve problem, check input data only \\
       
    80 \verb|--name| {\it probname}
       
    81                   &  change problem name to {\it probname} \\
       
    82 \verb|--wmps| {\it filename}
       
    83                   &  write problem to {\it filename} in fixed MPS
       
    84                      format \\
       
    85 \multicolumn{2}{@{}l}{{\tt --wfreemps} {\it filename}} \\
       
    86                   &  write problem to {\it filename} in free MPS
       
    87                      format \\
       
    88 \verb|--wlp| {\it filename}
       
    89                   &  write problem to {\it filename} in CPLEX LP
       
    90                      format \\
       
    91 \verb|--wglp| {\it filename}
       
    92                   &  write problem to {\it filename} in GLPK format \\
       
    93 \verb|--log| {\it filename}
       
    94                   &  write copy of terminal output to {\it filename} \\
       
    95 \verb|-h|, \verb|--help|
       
    96                   &  display this help information and exit \\
       
    97 \verb|-v|, \verb|--version|
       
    98                   &  display program version and exit \\
       
    99 \end{tabular}
       
   100 
       
   101 \subsection*{LP basis factorization options}
       
   102 
       
   103 \noindent
       
   104 \begin{tabular}{@{}p{30mm}p{92.3mm}@{}}
       
   105 \verb|--luf|      &  LU + Forrest--Tomlin update \\
       
   106                   &  (faster, less stable; default) \\
       
   107 \verb|--cbg|      &  LU + Schur complement + Bartels--Golub update \\
       
   108                   &  (slower, more stable) \\
       
   109 \verb|--cgr|      &  LU + Schur complement + Givens rotation update \\
       
   110                   &  (slower, more stable) \\
       
   111 \end{tabular}
       
   112 
       
   113 \subsubsection*{Options specific to the simplex solver}
       
   114 
       
   115 \noindent
       
   116 \begin{tabular}{@{}p{30mm}p{92.3mm}@{}}
       
   117 \verb|--primal|   &  use primal simplex (default) \\
       
   118 \verb|--dual|     &  use dual simplex \\
       
   119 \verb|--std|      &  use standard initial basis of all slacks \\
       
   120 \verb|--adv|      &  use advanced initial basis (default) \\
       
   121 \verb|--bib|      &  use Bixby's initial basis\\
       
   122 \verb|--ini| {\it filename}
       
   123                   &  use as initial basis previously saved with
       
   124                      \verb|-w| \\
       
   125                   & (disables LP presolver) \\
       
   126 \verb|--steep|    &  use steepest edge technique (default) \\
       
   127 \verb|--nosteep|  &  use standard ``textbook'' pricing \\
       
   128 \verb|--relax|    &  use Harris' two-pass ratio test (default) \\
       
   129 \verb|--norelax|  &  use standard ``textbook'' ratio test \\
       
   130 \verb|--presol|   &  use LP presolver (default; assumes \verb|--scale|
       
   131                      and \verb|--adv|) \\
       
   132 \verb|--nopresol| &  do not use LP presolver \\
       
   133 \verb|--exact|    & use simplex method based on exact arithmetic \\
       
   134 \verb|--xcheck|   & check final basis using exact arithmetic \\
       
   135 \end{tabular}
       
   136 
       
   137 \subsubsection*{Options specific to the interior-point solver}
       
   138 
       
   139 \noindent
       
   140 \begin{tabular}{@{}p{30mm}p{92.3mm}@{}}
       
   141 \verb|--nord|     &  use natural (original) ordering \\
       
   142 \verb|--qmd|      &  use quotient minimum degree ordering \\
       
   143 \verb|--amd|      &  use approximate minimum degree ordering (default)\\
       
   144 \verb|--symamd|   &  use approximate minimum degree ordering \\
       
   145 \end{tabular}
       
   146 
       
   147 \subsubsection*{Options specific to the MIP solver}
       
   148 
       
   149 \noindent
       
   150 \begin{tabular}{@{}p{30mm}p{92.3mm}@{}}
       
   151 \verb|--nomip|    &  consider all integer variables as continuous
       
   152                      (allows solving MIP as pure LP) \\
       
   153 \verb|--first|    &  branch on first integer variable \\
       
   154 \verb|--last|     &  branch on last integer variable \\
       
   155 \verb|--mostf|    &  branch on most fractional variable \\
       
   156 \end{tabular}
       
   157 
       
   158 \noindent
       
   159 \begin{tabular}{@{}p{30mm}p{92.3mm}@{}}
       
   160 \verb|--drtom|    &  branch using heuristic by Driebeck and Tomlin
       
   161                      (default) \\
       
   162 \verb|--pcost|    &  branch using hybrid pseudocost heuristic (may be
       
   163                      useful for hard instances) \\
       
   164 \verb|--dfs|      &  backtrack using depth first search \\
       
   165 \verb|--bfs|      &  backtrack using breadth first search \\
       
   166 \verb|--bestp|    &  backtrack using the best projection heuristic
       
   167                      (default) \\
       
   168 \verb|--bestb|    &  backtrack using node with best local bound \\
       
   169 \verb|--intopt|   &  use MIP presolver (default)\\
       
   170 \verb|--nointopt| &  do not use MIP presolver\\
       
   171 \verb|--binarize| &  replace general integer variables by binary ones
       
   172                      (assumes \verb|--intopt|)\\
       
   173 \verb|--fpump|    & apply feasibility pump heuristic\\
       
   174 \verb|--gomory|   &  generate Gomory's mixed integer cuts\\
       
   175 \verb|--mir|      &  generate MIR (mixed integer rounding) cuts\\
       
   176 \verb|--cover|    &  generate mixed cover cuts\\
       
   177 \verb|--clique|   &  generate clique cuts\\
       
   178 \verb|--cuts|     &  generate cuts of all classes above (assumes
       
   179                      \verb|--intopt|)\\
       
   180 \verb|--mipgap| {\it tol}
       
   181                   & set relative mip gap tolerance to {\it tol}\\
       
   182 \end{tabular}
       
   183 
       
   184 \bigskip
       
   185 
       
   186 \noindent
       
   187 For description of the MPS format see Appendix \ref{champs},
       
   188 page \pageref{champs}.
       
   189 
       
   190 \bigskip
       
   191 
       
   192 \noindent
       
   193 For description of the CPLEX LP format see Appendix \ref{chacplex},
       
   194 page \pageref{chacplex}.
       
   195 
       
   196 \bigskip
       
   197 
       
   198 \noindent
       
   199 For description of the modeling language see the document ``Modeling
       
   200 Language GNU MathProg: Language Reference'' included in the GLPK
       
   201 distribution.
       
   202 
       
   203 \bigskip
       
   204 
       
   205 \noindent
       
   206 For description of the DIMACS min-cost flow problem format and DIMACS
       
   207 maximum flow problem format see the document ``GLPK: Graph and Network
       
   208 Routines'' included in the GLPK distribution.
       
   209 
       
   210 %* eof *%