[Scip] How to find quickly a SCIP_ROW from a LP?

nikolaj@crt.umontreal.ca nikolaj at crt.umontreal.ca
Fri Oct 8 17:04:53 MEST 2010


Hello everybody,

In my branch, price and cut, I would like to update the dual at each node
of the search tree. The primal is different at each node (the core LP
stays the same but there are added constraints (cuts) and branching
constraints), so I need to know what it looks like to be able to update
(or not?).

Probably, there is a common way to do this in SCIP but I didn't find any
code doing this. For the moment, what I do is to retrieve the added cuts
one by one and update the dual accordingly. In doing so, I'm using
internals of SCIP. It's bad, I know, but how can I do this differently?

For the moment, I use

SCIP_ROW** rows;
int nrows;
SCIP_CALL_EXC( SCIPgetLPRowsData(scip, &rows, &nrows) );

to get the rows of the primal at each search node.

To recognize an added row (cut or branching constraint) to the core LP, I 
use

SCIProwGetName(SCIP_ROW * row)

but then I have to work on the name of the row to find it back and this is
way too slow. I've seen that there is an unique index for each row. Can I
use this index to retrieve the row?

Is this index really unique to each row?
This index is declared as an int, does this mean that the size of the LP
is quite restricted? What happens with LP with more than INT_MAX rows?

I would like to add that I don't know at compile time what cuts will be
used (this can be switch on and off at run time).

Any thoughts appreciated.

Have a nice day,

Nikolaj

PS: To update the dual, I need to know the type of the row to know how to
update the dual accordingly. A very ugly (but effective?) hack would be to
add a "type field" in the SCIP_ROW structure and a corresponding accessor..
Any thoughts?





More information about the Scip mailing list