help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Modelling Advice Request - Project Tasks


From: Andrew Makhorin
Subject: Re: [Help-glpk] Modelling Advice Request - Project Tasks
Date: Sat, 23 Jan 2010 06:40:53 +0300

> I am really excited about it, now here is a row generation
> code example! I looked into the code, and there is a question
> concerning this block of code:

> void callback(glp_tree *T, void *info)
> {     xassert(info == info);
>       if (glp_ios_reason(T) == GLP_IROWGEN)
>       {  remove_inactive(T);
>          if (generate_rows() == 0)
>             remove_inactive(T);
>       }
>       return;
> }

> I don't quite understand the second remove_inactive(T) call:
> it seems to me the second remove_inactive(T) won't do anything, 
> or am I missing something? Could you explain it a little bit?

It is my carelessness. In an earlier version I removed inactive
rows only once when no new rows were generated, i.e. if generate_rows
returned 0. However, in the final version inactive rows are removed
every time before generating new rows, so the second call to
remove_inactive is not needed:

       if (glp_ios_reason(T) == GLP_IROWGEN)
       {  remove_inactive(T);
          generate_rows();
       }






reply via email to

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