[Coin-discuss] Var&Cut index

Laszlo Ladanyi ladanyi at us.ibm.com
Thu Jun 16 16:13:32 EDT 2005


Hi Peter,

On Mon, 13 Jun 2005, Heesu Hwang wrote:

> Hello,
> 
> I have two questions.
> 1) Is there any reason that Var index starts from 1 and Cut index from 0?
> For example,
>  for(i=0; i<vars.size(); i++)
>    cout << vars[i]->bcpind() << " ";
>  => 1 2 3 4 ...
>  for(i=0; i<cuts.size(); i++)
>    cout << cuts[i]->bcpind() << " ";
>  => 0 1 2 3 ...
> 

This is strange... both should start from 0, I think. I'll look into it, but
it might take a while as I'm leaving for a trip in 3 hours (and still have
some packing to do...)

> 2)The index of algorithmic vars is negative, is that correct?
> with 5 core cuts and 2 algo cuts.
> For example
>  for(i=0; i<cuts.size(); i++)
>    cout << cuts[i]->bcpind() << " ";
>  => 0 1 2 3 4 -5 -6

Not quite... To avoid sending cuts (vars) multiple times from the LP process
to the TM a cut has a negative index until it is sent to the TM (it's possible
that a cut is never sent to the TM if it is kicked out before the node is
finished). When it is sent to the TM then its index is flipped from -i to i-1,
hence the negative index is transformed to a nonnegative one.

> 
> Thanks,
> 
> Peter.

--Laci




More information about the Coin-discuss mailing list