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