[Scip] How to access a subscip in ObjPricer::scip_redcost?
Sebastian Ruther
sebastian.ruther at uon.edu.au
Wed Dec 22 15:18:43 MET 2010
Hey,
I implemented a pricerdata in which i store the pointer to the subscip. However, I get assertion errors when I want to use this pointer later on. Don't think your way would be much different but I'll try it tomorrow.
Merry Christmas to you as well! I heard it's white Christmas this year in Germany.
Sebastian
________________________________________
From: Timo Berthold [berthold at zib.de]
Sent: 22 December 2010 22:05
To: scip at zib.de
Cc: Sebastian Ruther
Subject: Re: [Scip] How to access a subscip in ObjPricer::scip_redcost?
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