help-glpk
[Top][All Lists]
Advanced

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

[Help-glpk] Testing LPX* cols for non-integer bounds


From: Robbie Morrison
Subject: [Help-glpk] Testing LPX* cols for non-integer bounds
Date: Tue, 11 Oct 2005 06:49:25 +1300 (NZDT)
User-agent: SquirrelMail/1.4.2

Hi

One of the exit codes for lpx_integer(LPX*) is
LPX_E_FAULT.

The manual (p51) lists one cause for this as being
"some integer variable has non-integer lower or upper
bound".

I would like to test for this defect prior to calling
the solver.  And wish to know what threshold is used
to determine a "non-integer".  For instance, on my
current platform, the following test would accept
2.0 + 1.0e-016 and reject 2.0 + 1.0e-015.

   double ub = lpx_get_col_ub(lpxObject, col);
   if (ub == double(int(ub))) {}  // okay
   else                           // complain

What tolerance does GLPK use?  I suspect it might be
something more like 1.0e-008?

I am using GLPK 4.8 (manual dated January 2005).  The
system is  SVr5 UNIX on IA-32 hardware (Pentium III)
with an Edison Design Group (similar to Comeau) compiler
conforming to ISO C++ (1998).

In passing, I am currently writing a SolverInterface
class to sit between my simulation code and GLPK.
The approach shares some similarities with the IBM
OSI approach, but will, of course, be licensed under
GPL.  The interface also supports a suite of methods
that can be used to replace Numerical Recipes
simplex style statements.  If anyone is interested,
or has worked on a similar problem, feel free to
email me.

Many thanks to the GLPK development community and,
in particular, GLPK maintainer, Andrew Makhorin.

Robbie
---
Robbie Morrison
PhD student -- policy-oriented energy system simulation
Institute for Energy Engineering (IET)
Technical University of Berlin (TU-Berlin), Germany






reply via email to

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