On Mon, Aug 11, 2008 at 11:32 PM, Vijay Patil <[EMAIL PROTECTED]> wrote: > In one of application using GLPK, I am facing a problem because of not being > able to represent irrational numbers/values correctly (as obj. func. > coeff.). > Actually these values are dual values and are obtained from glpk itself. > Since they are approximated there is a problem (loss of information). > > If you have some experience/expertize dealing with irrational numbers or > knowledge of floating point representation, you might be interested in > having a look at the problem. > > http://code.google.com/p/cspsol/issues/detail?id=1#c2 > > Any workarounds to deal with this problem? > > Thanks > -- > Vijay Patil >
Just to close this thread, above mentioned issue in 'cspsol' was caused because of not using multiple integer optimal solutions for the unbounded knapsack problem. This issue has been fixed by replacing glp_intopt with a simple dynamic programming (DP) algorithm to solve the knapsack problem. The algorithm generates all optimal integer solutions, which is what required. In this particular case there is no problem in GLPK function glp_intopt (related to round off error). It gives correct results for following MIP. It is just that cspsol required all optimal integer solutions so glp_intopt was unsuitable. -------------------------------------------------------------- \* Problem: SubProb *\ Maximize obj: + 0.333333333333333 x_1 + 0.166666666666667 x_2 Subject To PatternWidthConstraint: + 1000 x_2 + 2000 x_1 <= 6000 Generals x_1 x_2 End -------------------------------------------------------------- Thanks Xypron for additional inputs. For more details: http://cspsol.googlecode.com/svn/trunk/ReleaseNotes.txt http://code.google.com/p/cspsol/downloads/list -- Vijay Patil _______________________________________________ Help-glpk mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-glpk
