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

Stefan Heinz heinz at zib.de
Tue Oct 12 00:05:40 MEST 2010


Hi Nikolaj,

since the SCIP 2.0.0 release SCIP has two new events.

type_event.h:
 #define SCIP_EVENTTYPE_ROWADDEDLP     0x08000000 /**< a row has been
added to the LP */
#define SCIP_EVENTTYPE_ROWDELETEDLP   0x10000000 /**< a row has been
removed from the LP */

You can use these events to detect if row was added or deleted from the LP.

Best Stefan

> 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?
>
>
>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip
>



More information about the Scip mailing list