octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch for GLPK 4.36+


From: Tommaso Balercia
Subject: Re: Patch for GLPK 4.36+
Date: Sat, 5 Mar 2011 13:56:09 +0100

And here's the patch in text format.

Apply with

patch -p1 <patch.glpk

from octave root.

Cheers,

Tommaso

On Sat, Mar 5, 2011 at 1:37 PM, Tommaso Balercia
<address@hidden> wrote:
> Dear All,
>
> please find attached a patch for Octave 3.4 to level up to the
> capabilities of GLPK 4.36+. Anything that can be done with MATLAB +
> GLPKMEX 2.10 can now be done with Octave too (indeed I fixed also some
> shortcomings that GLPKMEX 2.10 still has). The patch is just a tarball
> to extract in the root directory of sources. Two files will be
> replaced:
>
> src/DLD-FUNCTIONS/__glpk__.cc
> scripts/optimization/glpk.m
>
> All the new additions are document and add smoothly to the Tex
> documentation. I checked the behavior of the tool with some sets of
> binary problems and everything seems to work fine. Error conditions
> also exit gracefully. The interior point method works fine (this was
> broken in GLPKMEX 2.9). If you notice something not behaving properly,
> let me know by posting it on the mailing list (possibly adding the
> optimization problem too, so I can reproduce the problem here).
>
> One important remark: at least GLPK 4.36 (released in 2009) is needed
> to compile the CPP file successfully. At first, I coded this condition
> directly in __glpk__.cc, but, after some consideration, I would really
> recommend to fix this in configure.ac. Simply if the GLPK version is
> below 4.36, just disable it (the code still checks for HAVE_GLPK).
>
> I didn't venture into changing configure.ac myself, but the test to
> check this is straightforward
>
> // BEGIN TEST
>
> #include <glpk.h>
>
> int main()
> {
>  int result = 0;
>
>  if (GLP_MAJOR_VERSION < 4)
>  {
>  result = 1;
>  }
>  else
>  {
>  if(GLP_MINOR_VERSION < 36)
>  {
>   result = 1;
>  }
>  }
>
>  return result;
> }
>
> // END_TEST
>
> and can be easily performed with AC_RUN_IFELSE. If somebody could add
> this, I'd appreciate it.
>
> Kind regards,
>
> Tommaso
>

Attachment: patch.glpk
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]