G.4 GLPK – GNU Linear Programming Kit

The GLPK [36] (GNU Linear Programming Kit) package is intended for solving large-scale linear programming (LP), mixed integer programming (MIP), and other related problems. It is a set of routines written in ANSI C and organized in the form of a callable library.

To use GLPK with Matpower, a MEX interface is required69 . For Microsoft Windows users, a pre-compiled MEX version of GLPK (and numerous other solvers, such as CLP and Ipopt) are easily installable as part of the OPTI Toolbox70  [49].

When GLPK is installed, either as part of Octave or with a MEX interface for Matlab, it can be used to solve DC OPF problems that do not include any quadratic costs by setting the opf.dc.solver option equal to 'GLPK'. The solution algorithms and other GLPK parameters can be set directly via Matpower’s glpk.opts option. A “GLPK user options” function can also be specified via glpk.opt_fname to override the defaults for any of the many GLPK parameters. See help glpk_options and the parameters section the GLPK documentation at https://www.gnu.org/software/octave/doc/interpreter/Linear-Programming.html for details. See Table C-11 for a summary of the GLPK-related Matpower options.

GLPK can also be used to solve general LP problems via Matpower’s common QP solver interface qps_matpower, or MILP problems via miqps_matpower, with the algorithm option set to 'GLPK', or by calling qps_glpk or miqps_glpk directly.