[Coin-discuss] Access to dual variable corresponding to a newrow
ilustig at ilog.com
Thu Dec 6 05:56:28 EST 2001
When rows are deleted from CPLEX, the row indices are compressed. So, if
you currently have 6 rows in your problem, which are numbered 0,1,2,3,4,5,
and you delete rows 2 and 4, you will then have 4 rows in your problem,
numbered 0,1,2,3, where the new row 2 is the old row 3, and the new row 3
is the old row 5.
If deletion of a row causes a column to be empty, the column is not
deleted. It is still there, just without any nonzeros.
When rows are added to CPLEX, they are added to the end of the matrix.
The only reliable way to keep track of where your rows are is by assigning
names to the rows. Note, however, that the routine CPXgetrowindex() is not
efficient. In other words, CPLEX does not maintain an internal hash table
for the row names. (It's not worth the overhead) If you know that you are
going to use CPXgetrowindex() a lot, then you are best off building your
own hash table yourself.
At 15:07:58 -0500 (EST) 12/5/01 -0500, Laszlo Ladanyi <ladanyi at us.ibm.com>
>I doubt that that would be the case. It's much simpler to compress those
>columns the deleted row intersected (they'd have to maintain a list of holes
>separately for each column otherwise -- a nightmare) and append added rows to
>the end. Still, only cplex can answer the question. Anybody from ILOG on the
>list? could you give an answer?
>On Wed, 5 Dec 2001, Jonathan Eckstein wrote:
> > I think Mikhail is concerned that in CPLEX, the indices may not just be
> > added at the end, but may occupy "holes" left by previously deleted
> > rows. Perhaps that's not the case. Is it always true that when you
> > delete rows, the later rows get renumbered to fill the resulting gap?
> > -- Jonathan
More information about the Coin-discuss