Math::GLPK::Solve - a low-level wrapper around the GNU Linear Programming Kit,
also known as GLPK.
============================================================================

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

The GLPK package includes the following main components:

* implementation of the simplex method;
* implementation of the primal-dual interior point method;
* implementation of the branch-and-bound method;
* application program interface (API);
* GNU MathProg modeling language (a subset of AMPL);
* GLPSOL, a stand-alone LP/MIP solver.

See GLPK webpage at http://www.gnu.org/software/glpk/glpk.html.

Math::GLPK::Solve is a basic interface generated by SWIG. It is intended to
provide low-level access to the GLPK API to facilitate using the
functionality of GLPK from within Perl scripts. If you want higher level,
object-oriented access to the GLPK API, you will definitely want to use
Math::GLPK instead.


INSTALLATION

To install this module type the following:

    perl Makefile.PL
    make
    make test
    make install

For a quick intro to using this module, see the enclosed file 'demo.pl'! 

If something goes wrong, chances are that you need to regenerate the SWIG
wrapper code. To do this, issue:

    swig -perl GLPK.i
    contrib/add_export_stuff.pl --swig-file=GLPK.i --pm-file=Solve.pm --verbose
    contrib/add_pm_version_number.pl --package="Math::GLPK::Solve" \
    --version=0.07 --pm-file=Solve.pm


DEPENDENCIES

This module requires these other modules and libraries:

  - a working version of GLPK: you need to have the GLPK compile-time library
    and all the GLPK headers installed for this module to work. Regarding the
    installation of GLPK on your specific architecture, visit the GLPK
    webpage at

          http://www.gnu.org/software/glpk/glpk.html

    WARNING: this module has not been tested on any other platforms than
    GNU/Linux. Though, it should work on other platforms, too.

    First of all, you need to have a working compiler(!), preferably `gcc',
    and the GLPK headers (most notably `glpk.h') in some place where gcc
    finds them. You can alter the `INC' section of `Makefile.PL' to specify
    any non-conform location of your headers. Furthermore, you need to have
    the GLPK compile-time library installed (on Linux, this is called
    `libglpk.a'). If it is in a directory not included in the default
    search-path of your compiler, you can alter the `LIBS' section of
    Makefile.PL accordingly. If your `libglpk.a' is compiled without
    position-independent code support (as is the case with e.g. Fedora Core 2
    x86 and x86-64), then you may need to recompile `libglpk.a' this time
    adding the `-fPIC' flag to the compiler options.


GLPK API VERSIONING

Until version 0.05, Math::GLPK::Solve supported multiple versions of GLPK,
using automatic version detection and some black magic. While this worked
reasonably well during the years, version misdetections and mismatches caused
permanent frustration both for users and the maintainers. So, nowadays
Math::GLPK is only tested and supported for one specific GLPK version. It
might work with older or newer versions tough, only it is not tested and
supported. Currently, the supported version of GLPK is 4.17.


CAVEATS

The most prominent problems you may experience with this module is that 

    (a) you run some operating system other than *NIX, most notably,
        Win32. You have a good chance to make the module work in this case
        too, however, be prepared that you are alone out there.
    
    (b) you do not have GLPK installed or the library `libglpk.a' is put to
        an unconventional place (i.e., other than /usr/lib). In the first
        case, install GLPK. In the latter, specify the location of the GLPK
        hearers and the library in `Makefile.PL' (in the `INC' and the `LIBS'
        section).

    (c) your version of GLPK is unsupported. Try to compile and pray.

    (d) your system GLPK is not compiled to position-independent
        code. Recompile with `-fPIC'.


COPYRIGHT AND LICENCE

Copyright (C) 2004-2007 Gabor Retvari. All rights reserved.  This program is
free software; you can redistribute and/or modify it under the same terms as
Perl itself.

Consult the GLPK documentation for copyright information on the GLPK library.



Download Math::GLPK::Solve

Back