Jump to content

GLPK/Octave

From Wikibooks, open books for an open world

GNU Octave is a high-level language and environment for numerical computing. The language is mostly compatible with Matlab. But whereas Matlab is proprietary, Octave is a GNU project released under the GNU GPL license. Octave itself is written in Octave and C++.

Octave ships with an integrated version of GLPKMEX, a Matlab MEX interface to the GLPK library. Octave therefore, unlike Matlab, does not require that each user undertake a dedicated build of GLPKMEX. The original GLPKMEX code and the GLPK wrapper for Octave were written by Nicolò Giorgetti. But now the Octave/GLPK interface code is part of the Octave project.

As of April 2011, development of the Octave/GLPK interface had lagged behind that for the Matlab GLPKMEX bindings. In particular, the Octave/GLPK interface does not include improvements added by Niels Klitgord and still makes use of deprecated calls. Again, as of April 2011, the Octave developers have plans to align the Octave/GLPK wrapper with the current API set and to add new features. Please see this glpk-help thread and this octave-maintainers thread for more information.

Background material

[edit | edit source]

Tommi Sottinen’s course notes on operations research and GNU Octave [1] provide an excellent introduction to the use of GLPK and Octave. More specifically, these notes contain:

  • a simple implementation of the simplex method in Octave
  • examples based on the native Octave function glpk
  • a custom wrapper to glpk named stu_lp_solver ("simple to use LP solver")
  • examples based on the above

References

[edit | edit source]
  1. Sottinen, Tommi (2010). Operations research with GNU Octave. ORMS1020 course notes. Department of Mathematics and Statistics, University of Vaasa, Finland. http://lipas.uwasa.fi/~tsottine/or_with_octave/or_with_octave.pdf.