[Scip] How to access a subscip in ObjPricer::scip_redcost?

Timo Berthold berthold at zib.de
Wed Dec 22 12:05:17 MET 2010


Hi Sebastian.

In C, you would put this into the private data struct SCIP_PricerData. In C++, 
however, you can just define a SCIP* subscip as global object variables.

Also see the doxygen HowTo for private data in pricers:
http://scip.zib.de/doc/html/PRICER.html#PRICER_DATA
and compare lines 122-131 of examples/VRP/src/priver_vrp.h
which is written in C++

Merry Xmas to downunder,
Timo


Am Mittwoch 22 Dezember 2010, 07:33:09 schrieb Sebastian Ruther:
>   Hello,
> 
> I'm implementing a Branch-and-Price algorithm. In the examples the
> variables are always generated by the subscip which is generated in the
> ObjPricer::scip_redcost call. However, I don't want to generate the
> subscip problem in every iteration so I generate my subscip in
> ObjPricer::initsol by calling
> SCIP*      subscip = NULL;
> SCIP_CALL( SCIPcreate(&subscip) );
> SCIP_CALL( SCIPincludeDefaultPlugins(subscip) );
> SCIP_CALL( SCIPcreateProb(subscip, PricingNameBuf.str().c_str(), 0, 0,
> 0, 0, 0, 0, 0) );
> 
> How do I access the SCIP* subscip in the ObjPricer::scip_redcost
> function? The parameter list only gives me the SCIP* scip which refers
> to the master problem.
> 
> Thanks
> Sebastian
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip



More information about the Scip mailing list