[SCIP] How to add priced variable to a row?

Matheus Ota matheusota at gmail.com
Tue Jun 5 02:05:15 CEST 2018


Hi All,

I'm sorry for asking again, but I'm not able to find the answer on the
internet. I'm implementing a Branch-Cut-and-Price algorithm. The Constraint
Handler creates rows and adds them using SCIPaddCut. Then, when a new
variable is generated during column generation, it should be inserted in
the rows created by the Constraint Handler. The problem is that I'm getting
a segmentation fault when doing this.

What I'm doing is calling a "pricing" routine on the PRICERFARKAS and
PRICERREDCOST methods. This pricing routing tries to adds to the row using
the following piece of code:

SCIP_CALL(SCIPaddVarToRow(scip, row, var, coef));

I also already made sure that when creating the rows they are set to
modifiable = true

Should I use some kind of "getTransformedRow" before calling the addVar?

The following is my code for SCIP_CONS, instead of SCIP_ROWS, and it works
fine:

SCIP_CONS *transfCons;
SCIPgetTransformedCons(scip, cons, &transfCons);
SCIP_CALL(SCIPaddCoefLinear(scip, transfCons, var, coef));

Do anyone have some tips here?

Thanks,
Matheus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20180604/e4f1e4e4/attachment.html>


More information about the Scip mailing list