help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-glpk] rounding MIP obj values


From: Erik Rantapaa
Subject: [Help-glpk] rounding MIP obj values
Date: Fri, 21 Nov 2003 16:03:27 -0800 (PST)

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;

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.

Thanks,

Erik Rantapaa


__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]