[Top][All Lists]

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

[Help-glpk] Precison Question?

From: steven su
Subject: [Help-glpk] Precison Question?
Date: Wed, 28 Jul 2010 15:25:12 +0800

Hello, I have implemented a solver using two-staged simplex method.
And the element type of coefficient matrix can be double and rational, e.g:
        the rational version:
                //lineq is a (2*3) matrix.
                MATRIX<RATIONAL> lineq( //means linear inequalities
                        3, 2, 6  //means 3x1 + 3x2 <= 6                         
                        -3, 2, 0  //means -3x1 + 2x2 <= 0                       
                max: x1 + x2

        the double version:
                MATRIX<double> lineq(
                        3.0, 2.0, 6.0  //means 3.0x1 + 2.0x2 <= 6.0             
                        -3.0, 2.0, 0.0
                max: x1 + x2

The solver works well when the element type of 'lineq' was rational.
But If the element type is double, there are always cumulative error
when 'lineq' was growing up to (500*700) or more,
and that incurring to that the result is unbound.
So my question is how did you handle the cumulative error in GLPK?
Thanks in advance.

reply via email to

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