<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><font face="Calibri,sans-serif" size="3" style="font-size:12pt;" color="#000000">Dear Thomas,</font><div><font face="Calibri,sans-serif" size="3" style="font-size:12pt;" color="#000000"><br></font></div><div><div>I checked again my code, and still not figure out where the problem is, to be more clear, during the column generation, Scip found the optimal solution of the restricted master problem, which is optimal for the master problem, when I look for dual values to compute the reduced cost they are all zero, and I get negative reduced cost allowing SCIP to generate more variables.</div><div>I took these short examples as ILP, which is one step "when it founds optimal solution" during column generation, I have attached in this mail the source code of this ILP and the pricer.</div></div><div><font face="Calibri,sans-serif" color="#000000"><div><br></div><div><i>Minimize</i></div><div><i> Obj: -1 x0 -2 x1</i></div><div><i>Subject to</i></div><div><i> c0: +1 x1 = +1</i></div><div><i> c1: +1 x0 = +1</i></div><div><i> c2: +1 x0 = +1</i></div><div><i> c3: +1 x0 +1 x1 = +2</i></div><div><i>Bounds</i></div><div><i> 0 <= x0 <= 1</i></div><div><i> 0 <= x1 <= 1</i></div><div><i>Binaries</i></div><div><i> x0 x1</i></div><div><i>End</i></div><div><br></div><div>I checked the dual values using cplex by providing this example, and it gives the following duals </div><div>obj: -3</div><div>  x0 = 1</div><div>  x1 = 1</div><div>Duals : -2 -1 0 0</div><div><br></div><div>but when i get the dual values during the pricing process, i found this as a result </div><div><br></div><div><div>obj: -3</div><div>x0: 1</div><div>x1: 1</div><div>_____________________________________________________</div><div>DUAL values : </div><div>Pi[i]= -0, -0, -0, -0, </div><div>_____________________________________________________</div></div><div><br></div><div>I check if i used transformed constraint by using SCIPconsIsTransformed(), and it returns true.</div><div>So, why i'm not getting the correct values of dual variables ?</div><div><br></div><div>Sorry for the long mail, and thanks for any explanations </div><div><br></div><div>A. Ouali     </div><div> </div></font></div><div><br><br><div>> Date: Fri, 17 Oct 2014 08:33:31 +0200<br>> Subject: Re: [Scip] Getting duals values of best solution<br>> From: schlechte@zib.de<br>> To: oualiaek@hotmail.fr<br>> CC: rodolfo.carvajal@gmail.com; scip@zib.de<br>> <br>> Dear Abdelkader,<br>> <br>> have a look at<br>> <br>> http://scip.zib.de/doc/examples/Binpacking/<br>> <br>> and in particular<br>> <br>> http://scip.zib.de/doc/examples/Binpacking/pricer__binpacking_8c_source.shtml<br>> <br>> Good luck.<br>> Thomas<br>> <br>> <br>> > Hi Rodolfo,<br>> > Thank's for reply.<br>> > But when applying pricing, we use dual values to get the reduced cost,in<br>> > my case, i don't get the correct values of dual variables.The earlier<br>> > example is one iteration of column generation, at these stepscip found the<br>> > optimal solution of the master problem, so no need to generate new<br>> > columns,the problem is that the value of dual variable are all zero, which<br>> > is not correct, and scipcontinue to generate new columns.<br>> > So how we can get dual variables in pricing if scip don't provide dual<br>> > information ?<br>> > Best regards<br>> > A. Ouali<br>> ><br>> ><br>> > Date: Thu, 16 Oct 2014 18:17:20 -0300<br>> > Subject: Re: [Scip] Getting duals values of best solution<br>> > From: rodolfo.carvajal@gmail.com<br>> > To: oualiaek@hotmail.fr<br>> ><br>> > Hi Abdelkader,<br>> ><br>> > If you solve your MIP as a SCIP problem, you don't get dual information<br>> > (see the SCIP FAQ http://scip.zib.de/#faq).<br>> ><br>> > You can use the LP interface (lpi/lpi.h) to interact with the LP solver<br>> > and get the duals.<br>> > Hope this helps,<br>> ><br>> > Rodolfo<br>> > On Oct 16, 2014 5:49 PM, "Abdelkader Ouali" <oualiaek@hotmail.fr> wrote:<br>> ><br>> ><br>> ><br>> > Dear scip users,<br>> > I have a short example of ILP, and i want to know how to get dual values<br>> > of optimal solution,when i use cplex, it give me the correct value of dual<br>> > variables,but when using scip the dual values is all zero, knowing that i<br>> > set the pointers of constraint to the transformedones, in attachment you<br>> > will find source code containing the example and how i do to get the dual<br>> > values.<br>> > I want to know what is wrong in this code ?<br>> > Best regards<br>> > A. Ouali<br>> ><br>> > _______________________________________________<br>> ><br>> > Scip mailing list<br>> ><br>> > Scip@zib.de<br>> ><br>> > http://listserv.zib.de/mailman/listinfo/scip<br>> ><br>> ><br>> >                                            _______________________________________________<br>> > Scip mailing list<br>> > Scip@zib.de<br>> > http://listserv.zib.de/mailman/listinfo/scip<br>> ><br>> <br>> <br>> <br>> _____________________________________________<br>> <br>> Dr. Thomas Schlechte<br>> Zuse Institute Berlin<br>> Takustrasse 7, D-14195 Berlin-Dahlem, Germany<br>> phone: +49-30 841 85 317<br>> fax: +49-30 841 85 269<br>> url: http://www.zib.de/schlechte<br>> e-mail: schlechte@zib.de<br>> _____________________________________________<br>> <br></div></div>                                        </div></body>
</html>