[Scip] Adding rows to cutpool

Stefan Heinz heinz at zib.de
Thu Mar 29 02:51:17 MEST 2012


Hi,

The creation of your cut is not correct. The SCIP_COL* array is *not* an 
array of indices. You should use the method SCIPvarGetCol()

http://scip.zib.de/doc/html/pub__var_8h.html#a75111eed912d3f76ec076b787f7a0b12

to get for a variable to corresponding column. To add your cut into the 
cut pool of SCIP  you should use the method SCIPaddPoolCut()


http://scip.zib.de/doc/html/scip_8h.html#a14b5af5c0722ae6284b2a2d2eb0b3d5b

Best Stefan


On 03/27/2012 06:46 PM, sheetal murkute wrote:
> Hello,
>
> I want to add rows to cutpool.
> For this, I have written the code mentioned below:
>
> cutval = (double *) malloc((3) * sizeof(double *));
> SCIP_CUTPOOL * cutpool;
> SCIP_ROW * newrow;
> SCIP_COL * cutind;
> namebuf.str("");
> namebuf<<"row_"<<k;
> cutind[0] = 22 ; cutind[1] = 34;   ( 22 and 34 are column numbers with
> nonzero values, there are total 2 non-zero coefficients in a row)
>
> SCIPcreateRow(scip,&newrow, namebuf.str().c_str(), 2,&cutind, cutval,
> -SCIPinfinity(scip), 0, FALSE,FALSE,FALSE);
> SCIPaddRowCutpool(scip, cutpool, newrow);
>
> *I am getting error saying:*
>
> /home/sxm4946/SCIP/ziboptsuite-2.1.1/scip-2.1.1/src/scip/scip/type_lp.h:73:
> error: forward declaration of âstruct SCIP_Colâ
> scipmcfv2.cpp:308: error: invalid use of incomplete type âstruct SCIP_Colâ
>
>
> Can you please help me with this?
>
>
>
>
>
>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip



More information about the Scip mailing list