Question

I'm trying to solve instances like the following with lp-solve

/* Objective function */
min: +x;

/* Constraints */
+2046853249 x +2046853248 y +c = 0;
+1954481150 x +1954481149 y +c = 0;
R3: +x >= 1;

/* Variable bounds */
-10000 <= x <= 10000;
-10000 <= y <= 10000;
-10000 <= c <= 10000;

/* Integer definitions */
int x,y,c;

This doesn't appear to be a difficult instance, but lp-solve fails to solve it. My understanding of the lp-solve documentation is that the solver actually starts to solve the instance as a regular lp and then fixes problems w.r.t. to the integer definition. In this case, the lp-solution should be correct.

Could someone please give me some insights why this doesn't work? In particular, is there a "trick" to solve instances like this quickly?

Was it helpful?

Solution

I've had a chat with some developers of lp_solve. The reason for the problem is apparently that lp_solve uses variables of type double internally and they don't provide enough accuracy for dealing with integers that big.

It looks that it is just not possible to solve systems like that using lp_solve. If you encounter a similar problem like me, you will probably search for another tool.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top