[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-glpk] Re: rounding MIP obj values
From: |
Andrew Makhorin |
Subject: |
[Help-glpk] Re: rounding MIP obj values |
Date: |
Sat, 22 Nov 2003 06:44:42 +0300 |
>In the function record_solution(), I was wondering if there is any harm
>in including the following code:
>
> double obj = tree->curr->lp_obj;
> if (tree->int_obj)
> { double temp = floor(obj+ 0.5);
> if (fabs(obj - temp) <= tree->tol_int)
> obj = temp;
> else
> obj = ceil(obj);
> }
> tree->best[0] = obj;
This is ok.
>That is, we round the lp objective value before storing it. This is the same
>type of rounding that occurs in the is_better() routine.
BTW, if you need doing that to enumerate integer feasible solutions,
rounding the global bound is not critical.