[Scip] Binpacking example

Gerald Gamrath gamrath at zib.de
Thu Mar 26 09:45:26 CET 2015


Dear Emily,

I'm not sure I understood you correctly. Normally, your constraint 
handler should provide some method SCIPcreateConsMyspecialcons(), in 
which you create consdata etc. and call SCIPcreateCons().

Anyway, I assume the full error message you get reads
"cannot create constraint <name> of type [conshdlrname] - constraint 
handler does not need constraints"?

In that case, just set the NEEDCONS flag to TRUE when creating your 
constraint handler.

Best,
Gerald



On 26.03.2015 04:04, Aao Du wrote:
> Also, I have been struggling with this error, so I was hoping you can 
> help me out there.
> In my branching rule, I am creating two branches and two consdatas and 
> therefore two constraints for each node. But, I am getting error while 
> calling SCIPcreatecons(scip, con, name, consdata, conshdlr,...). The 
> error is :
> ERROR: can not create constraint of type conshdlr
> ERROR <-8> in function call
>
> I have checked that consdata is created and the conshdlr is found 
> before calling this function. I dont know what else can cause this.
> I would be thankful for your help.
>
> Emily
>
> On Wed, Mar 25, 2015 at 12:49 PM, Aao Du <aaoduu at gmail.com 
> <mailto:aaoduu at gmail.com>> wrote:
>
>     Dear all,
>
>     I have just started using SCIP. I want to implement a B&P
>     algorithm in C++. I am looking at the Bin Packing example as
>     template. As I think I will need to have branching rule, pricer
>     and a conshdlr as well.
>     I am, however, confused with some point and cant figure out how it
>     works. I was hoping I can get help here.
>
>     First, I cant find where in the example the master problem is
>     being solved, i.e. I dont see SCIPsolve(scip) anywhere in the
>     code! I am totaly lost about it. I was expecting to use it as in
>     the VRP example after creating scip and including pricer(and in
>     this case branch rule and conshdlr).
>
>     Second, in the master problem, all the variables are given as
>     binary(not continuous) and then we are trying to get the dual
>     values of the master problem, isnt this wrong? I cant get how this
>     works.
>
>     Thanks in advance,
>
>     Emily
>
>
>
>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20150326/de0bd7b2/attachment.html>


More information about the Scip mailing list