[Scip] Getting duals solution in MIP solving

Vivek Periaraj vivek.periaraj at gmail.com
Sun Mar 10 07:29:05 MET 2013


Hello Gerald,

Thanks. I have added check for whether the constraint is transformed or not.

Also, presolve has identified the following constraint types in my model:

 158021 constraints of type <varbound>
     16 constraints of type <knapsack>
   2075 constraints of type <setppc>
   6206 constraints of type <linear>
     47 constraints of type <logicor>

Does that mean I have to use corresponding APIs for each type for getting duals?

Regards,
Vivek.


----- Original Message ----- 

From: "Gerald Gamrath" <gamrath at zib.de> 
To: "Vivek Periaraj" <vivek.periaraj at gmail.com> 
Cc: scip at zib.de 
Sent: Sunday, March 10, 2013 3:57:46 AM 
Subject: Re: [Scip] Getting duals solution in MIP solving 

Dear Vivek, 

you do not need to call SCIPtransformProb() yourself, that is done 
automatically when you start the solving process by calling SCIPsolve(). 
The transformation results in a copy of the original problem, which is 
used during the (pre)solving process, for example when constraints are 
removed, bounds are changed, etc. 

Therefore, you need to work with the transformed constraints in the 
PRICERREDCOST callback. I guess, you still work with the original 
constraints, you can check that by calling SCIPconsIsTransformed() on 
the constraints. If they are not transformed yet, you can get the 
corresponding transformed one by calling SCIPgetTransformedCons() or 
SCIPgetTransformedConss() for getting the transformed constraints for an 
array of constraints. See 
http://scip.zib.de/doc/html/scip_8h.shtml#ac783997fa88d9b38b4bb7cfc0c101e95 
http://scip.zib.de/doc/html/scip_8h.shtml#a11bfa7463e407dab949f3ac77e2e051b 

Best, 
Gerald 

Am 09.03.2013 18:30, schrieb Vivek Periaraj: 
> Hi List, 
> 
> I am trying to implement a pricer but I am unable to get any dual solutions from the problem object. The following are the steps I did: 
> 
> 1) I loaded default plugins 
> 2) I loaded a lp file into SCIP problem object using SCIPreadProb() 
> 3) I initialize and activate the pricer. 
> 4) I invoke SCIPsolve() 
> 
> In the PRICERREDCOST callback, I call SCIPgetDualsolLinear() and all the duals turn out to be zeros. I tried several problems and same is the case. 
> 
> I tried SCIPtransformProb() but still duals were zeros. 
> 
> Am I missing any step? Do I have to enable/disable any other plugins? Using soplex and cpx as the LP solver exhibit the same problem. 
> 
> Regards, 
> Vivek. 
> 
> 
> _______________________________________________ 
> Scip mailing list 
> Scip at zib.de 
> http://listserv.zib.de/mailman/listinfo/scip 


More information about the Scip mailing list