On Wed, 27 Nov 2019, Daniel Jour wrote:
Hi, I have a problem whose bounds are values which need (really) a lot of precision. Much more than double can offer. I've handled these values so far with GNU MPFR, which can AFAIK convert to GNU GMP types which are (?) internally used by GLPK if it's built with support for that.
You are barking up a very large tree. My first thought is to try to reformulate the problem to remove the need for such precision.
Looking through the source I see that the functions to set bounds as well as the structures (for example struct GLPROW) use double. Thus I guess I'd need to change that at least ...
It means the variables have to be GMP types, otherwise the precision of the bound is meaningless.
Given I have no knowledge (yet?) about the internal complexities of GLPK ... how hard do you estimate it to be to change GLPK to allow bounds set from GMP numbers?
GLPK already includes an exact solver. Not surprisingly, it is slow. IIRC its input is required to be ordinary doubles, so getting the desired bounds would require some effort, e,g,: xUpHi=... xUpLo=... x<=xUpHi+xUpLo The usally method for using it is to run the inexact LP solver first and use that result to start the exact solver. -- Michael [email protected] "Sorry but your password must contain an uppercase letter, a number, a haiku, a gang sign, a heiroglyph, and the blood of a virgin." -- someeecards
