scipopt / scip

SCIP - Solving Constraint Integer Programs
Other
366 stars 63 forks source link

About the rows returned by the function SCIPcolGetRows() #46

Closed SelinBayramoglu closed 2 weeks ago

SelinBayramoglu commented 1 year ago

Hello,

SCIPcolGetNLPNonz() returns the number of LP rows a column appears in and SCIPcolGetNNonz() (call this nnz) is the total number of rows a column appears in. SCIPcolGetRows() (call this total) returns an array of rows that a column appears in. In my tests I observed that the first nnz rows returned by this function are in the LP and the remaining (total - nnz) rows are not in the LP. I was wondering if this is always true. Similarly, can we say the first set of columns returned by the SCIProwGetCols() function are in the LP and the remaining ones are not?

Thank you!

antoniach commented 1 year ago

Hi Selin,

thank you for your patience!

Your observation is correct: SCIPcolGetRows() returns an array containing all the rows a column appears in and it is always sorted such that the first nnz entries give you the rows currently in the LP. This is also mentioned in the documentation of struct SCIP_Col (line 128-133 of struct_lp.h). Similarly, we have the same behavior for SCIProwGetCols() (mentioned in line 194-199 of struct_lp.h).

I hope this helps. Let me know if you have any other questions!

Best, Antonia