[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: [Help-glpk] stop simplex after certain precision for obj value was r

**From**: |
Andrew Makhorin |

**Subject**: |
Re: [Help-glpk] stop simplex after certain precision for obj value was reached? |

**Date**: |
Fri, 21 Nov 2008 19:04:28 +0300 |

>* I was wondering whether there's any way to stop the simplex solver from*
>* looking once a certain precision for the objective value (a float) has*
>* been reached...*
>* For instance, say we want to minimize a number between 0 and 1 and the*
>* optimal value is 0.5131231. Is there a way to tell glpsol to stop*
>* optimizing if the improvement would be less than, say, 0.001 ? In this*
>* case, 0.514 would be OK.*
>* I tried to do this by declaring the objective as an integer between 0 and*
>* 1000 and dividing it by 1000.0, but that transforms the problem to MIP and*
>* triggers the MIP solver and I still want it to be solved by simplex*
>* (--nomip doesn't work for this either, since it takes way too long to*
>* solve).*
Probably you mean the mip solver, not the simplex one.
If you are using glpsol, you can specify the option '--mipgap GAP',
where GAP is a relative mip gap tolerance. In your case GAP might be,
for example, 0.10 (that corresponds to 10%).
If you are using glpk api, see the reference manual for description
of parameters passed to glp_intopt.