OS Manuals

/usr/bin/glpsol

The GLPK (GNU Linear Programming Kit) package is intended for solving large-scale linear programming (LP), mixed integer programming (MIP), and other related problems

From glpk 5.0-r10 (os), captured 2026-11-05 by running glpsol --help (exit 0). permalink

Usage: /usr/bin/glpsol [options...] filename

General options:
   --mps             read LP/MIP problem in fixed MPS format
   --freemps         read LP/MIP problem in free MPS format (default)
   --lp              read LP/MIP problem in CPLEX LP format
   --glp             read LP/MIP problem in GLPK format
   --math            read LP/MIP model written in GNU MathProg modeling
                     language
   -m filename, --model filename
                     read model section and optional data section from
                     filename (same as --math)
   -d filename, --data filename
                     read data section from filename (for --math only);
                     if model file also has data section, it is ignored
   -y filename, --display filename
                     send display output to filename (for --math only);
                     by default the output is sent to terminal
   --seed value      initialize pseudo-random number generator used in
                     MathProg model with specified seed (any integer);
                     if seed value is ?, some random seed will be used
   --mincost         read min-cost flow problem in DIMACS format
   --maxflow         read maximum flow problem in DIMACS format
   --cnf             read CNF-SAT problem in DIMACS format
   --simplex         use simplex method (default)
   --interior        use interior point method (LP only)
   -r filename, --read filename
                     read solution from filename rather to find it with
                     the solver
   --min             minimization
   --max             maximization
   --scale           scale problem (default)
   --noscale         do not scale problem
   -o filename, --output filename
                     write solution to filename in printable format
   -w filename, --write filename
                     write solution to filename in plain text format
   --ranges filename
                     write sensitivity analysis report to filename in
                     printable format (simplex only)
   --tmlim nnn       limit solution time to nnn seconds
   --memlim nnn      limit available memory to nnn megabytes
   --check           do not solve problem, check input data only
   --name probname   change problem name to probname
   --hide            remove all symbolic names from problem object
   --wmps filename   write problem to filename in fixed MPS format
   --wfreemps filename
                     write problem to filename in free MPS format
   --wlp filename    write problem to filename in CPLEX LP format
   --wglp filename   write problem to filename in GLPK format
   --wcnf filename   write problem to filename in DIMACS CNF-SAT format
   --log filename    write copy of terminal output to filename
   -h, --help        display this help information and exit
   -v, --version     display program version and exit

LP basis factorization options:
   --luf             plain LU-factorization (default)
   --btf             block triangular LU-factorization
   --ft              Forrest-Tomlin update (requires --luf; default)
   --cbg             Schur complement + Bartels-Golub update
   --cgr             Schur complement + Givens rotation update

Options specific to simplex solver:
   --primal          use primal simplex (default)
   --dual            use dual simplex
   --std             use standard initial basis of all slacks
   --adv             use advanced initial basis (default)
   --bib             use Bixby's initial basis
   --ini filename    use as initial basis previously saved with -w
                     (disables LP presolver)
   --steep           use steepest edge technique (default)
   --nosteep         use standard "textbook" pricing
   --relax           use Harris' two-pass ratio test (default)
   --norelax         use standard "textbook" ratio test
   --flip            use long-step ratio test
   --presol          use presolver (default; assumes --scale and --adv)
   --nopresol        do not use presolver
   --exact           use simplex method based on exact arithmetic
   --xcheck          check final basis using exact arithmetic

Options specific to interior-point solver:
   --nord            use natural (original) ordering
   --qmd             use quotient minimum degree ordering
   --amd             use approximate minimum degree ordering (default)
   --symamd          use approximate minimum degree ordering

Options specific to MIP solver:
   --nomip           consider all integer variables as continuous
                     (allows solving MIP as pure LP)
   --first           branch on first integer variable
   --last            branch on last integer variable
   --mostf           branch on most fractional variable
   --drtom           branch using heuristic by Driebeck and Tomlin
                     (default)
   --pcost           branch using hybrid pseudocost heuristic (may be
                     useful for hard instances)
   --dfs             backtrack using depth first search
   --bfs             backtrack using breadth first search
   --bestp           backtrack using the best projection heuristic
   --bestb           backtrack using node with best local bound
                     (default)
   --intopt          use MIP presolver (default)
   --nointopt        do not use MIP presolver
   --binarize        replace general integer variables by binary ones
                     (assumes --intopt)
   --fpump           apply feasibility pump heuristic
   --proxy [nnn]     apply proximity search heuristic (nnn is time limit
                     in seconds; default is 60)
   --gomory          generate Gomory's mixed integer cuts
   --mir             generate MIR (mixed integer rounding) cuts
   --cover           generate mixed cover cuts
   --clique          generate clique cuts
   --cuts            generate all cuts above
   --mipgap tol      set relative mip gap tolerance to tol
   --minisat         translate integer feasibility problem to CNF-SAT
                     and solve it with MiniSat solver
   --objbnd bound    add inequality obj <= bound (minimization) or
                     obj >= bound (maximization) to integer feasibility
                     problem (assumes --minisat)

For description of the MPS and CPLEX LP formats see Reference Manual.
For description of the modeling language see "GLPK: Modeling Language
GNU MathProg". Both documents are included in the GLPK distribution.

See GLPK web page at <http://www.gnu.org/software/glpk/glpk.html>.

Please report bugs to <bug-glpk@gnu.org>.
Options (76)
OptionDescriptionSource
--mpsread LP/MIP problem in fixed MPS formathelp
--freempsread LP/MIP problem in free MPS format (default)help
--lpread LP/MIP problem in CPLEX LP formathelp
--glpread LP/MIP problem in GLPK formathelp
--mathread LP/MIP model written in GNU MathProg modeling languagehelp
--seed valueinitialize pseudo-random number generator used in MathProg model with specified seed (any integer);help
--mincostread min-cost flow problem in DIMACS formathelp
--maxflowread maximum flow problem in DIMACS formathelp
--cnfread CNF-SAT problem in DIMACS formathelp
--simplexuse simplex method (default)help
--interioruse interior point method (LP only)help
--minminimizationhelp
--maxmaximizationhelp
--scalescale problem (default)help
--noscaledo not scale problemhelp
--ranges filenamewrite sensitivity analysis report to filename in printable format (simplex only)help
--tmlim nnnlimit solution time to nnn secondshelp
--memlim nnnlimit available memory to nnn megabyteshelp
--checkdo not solve problem, check input data onlyhelp
--name probnamechange problem name to probnamehelp
--hideremove all symbolic names from problem objecthelp
--wmps filenamewrite problem to filename in fixed MPS formathelp
--wfreemps filenamewrite problem to filename in free MPS formathelp
--wlp filenamewrite problem to filename in CPLEX LP formathelp
--wglp filenamewrite problem to filename in GLPK formathelp
--wcnf filenamewrite problem to filename in DIMACS CNF-SAT formathelp
--log filenamewrite copy of terminal output to filenamehelp
-h, --helpdisplay this help information and exithelp
-v, --versiondisplay program version and exithelp
--lufplain LU-factorization (default)help
--btfblock triangular LU-factorizationhelp
--ftForrest-Tomlin update (requires --luf;help
--cbgSchur complement + Bartels-Golub updatehelp
--cgrSchur complement + Givens rotation updatehelp
--primaluse primal simplex (default)help
--dualuse dual simplexhelp
--stduse standard initial basis of all slackshelp
--advuse advanced initial basis (default)help
--bibuse Bixby's initial basishelp
--ini filenameuse as initial basis previously saved with -w (disables LP presolver)help
--steepuse steepest edge technique (default)help
--nosteepuse standard "textbook" pricinghelp
--relaxuse Harris' two-pass ratio test (default)help
--norelaxuse standard "textbook" ratio testhelp
--flipuse long-step ratio testhelp
--presoluse presolver (default;help
--nopresoldo not use presolverhelp
--exactuse simplex method based on exact arithmetichelp
--xcheckcheck final basis using exact arithmetichelp
--norduse natural (original) orderinghelp
--qmduse quotient minimum degree orderinghelp
--amduse approximate minimum degree ordering (default)help
--symamduse approximate minimum degree orderinghelp
--nomipconsider all integer variables as continuous (allows solving MIP as pure LP)help
--firstbranch on first integer variablehelp
--lastbranch on last integer variablehelp
--mostfbranch on most fractional variablehelp
--drtombranch using heuristic by Driebeck and Tomlin (default)help
--pcostbranch using hybrid pseudocost heuristic (may be useful for hard instances)help
--dfsbacktrack using depth first searchhelp
--bfsbacktrack using breadth first searchhelp
--bestpbacktrack using the best projection heuristichelp
--bestbbacktrack using node with best local bound (default)help
--intoptuse MIP presolver (default)help
--nointoptdo not use MIP presolverhelp
--binarizereplace general integer variables by binary ones (assumes --intopt)help
--fpumpapply feasibility pump heuristichelp
--proxy nnnapply proximity search heuristic (nnn is time limit in seconds;help
--gomorygenerate Gomory's mixed integer cutshelp
--mirgenerate MIR (mixed integer rounding) cutshelp
--covergenerate mixed cover cutshelp
--cliquegenerate clique cutshelp
--cutsgenerate all cuts abovehelp
--mipgap tolset relative mip gap tolerance to tolhelp
--minisattranslate integer feasibility problem to CNF-SAT and solve it with MiniSat solverhelp
--objbnd boundadd inequality obj <= bound (minimization) or obj >= bound (maximization) to integer feasibility problem (assumes --minisat)help

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.