help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Glpk Enhancement Request: Terminate on MIP gap tolerance


From: Andrew Makhorin
Subject: Re: [Help-glpk] Glpk Enhancement Request: Terminate on MIP gap tolerance
Date: Thu, 4 Oct 2007 16:12:18 +0400

> I've been using glpk for a couple days and so far I am very
> impressed. Could you tell me how difficult it would be to set a
> minimum mip gap tolerance in the same way the time limit flag is
> set? That would be very helpful. I'm sure I'm not the only one to
> desire this since it seems to be a common feature on many other MIP
> solvers.

On api level you can do that like follows:

void cb_func(glp_tree *tree, void *info)
{     if (glp_ios_reason(tree) == GLP_IBINGO)
      {  if (glp_ios_mip_gap(tree) < 0.10)
            glp_ios_terminate(tree);
      }
      . . .
}

int main(void)
{     glp_prob *mip;
      glp_iocp parm;
      . . .
      glp_init_iocp(&parm);
      parm.cb_func = cb_func;
      glp_intopt(mip, &parm);
      . . .
}





reply via email to

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