> 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?

Bounds of variables marked as integer must be exact integer numbers
with no tolerance, i.e. the condition bnd == floor(bnd) must be
satisfied, where bnd is a lower/upper bound.

However, to check if a node solution is integer feasible, other
criterion is used, namely, the current value of a variable is
considered as integral, if it differs from the nearest integer at most
by 1e-6 (this is *absolute* tolerance used by default).



_______________________________________________
Help-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to