I was having the same problem.  I&#39;m very grateful too for your anwser, Laszlo (to Mohamad too for raising the question!). I was not able to fix my code yet but at least I have some hints :-)<br><br>If I understood it well, the problem comes from adding &quot;bound&quot; constraints (0 &lt;= x_i &lt;= 1)  since eventually one of those became non-basic and bounded to 1 with a non-negative dual and Bcp (Osi?) was not returning it in the dual price vector because it concerned the upper bound? Is my understanding good?<br>
<br>To complement this thread just say that the behavior I was observing was that cplex command line and glpsol (glpk&#39;s counterpart) were returning non-zero duals whereas Bcp (Osi?) was returning 0. <br><br>Thanks,<br>
<br>Dani.<br><br><div class="gmail_quote">On Fri, Apr 17, 2009 at 10:35 PM, mohamad reisi <span dir="ltr">&lt;<a href="mailto:mohamad.reisi@in.iut.ac.ir">mohamad.reisi@in.iut.ac.ir</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Dear Laci,<br>
<br>
You are right. I have set the upper bound of variables to DBL_MAX, then this problem solved. Nw it is ok.<br>
Thanks a lot.<br>
<div class="im"><br>
Mohamad.<br>
----- Original Message -----<br>
From: Laszlo Ladanyi &lt;<a href="mailto:ladanyi@us.ibm.com">ladanyi@us.ibm.com</a>&gt;<br>
To: mohamad reisi &lt;<a href="mailto:mohamad.reisi@in.iut.ac.ir">mohamad.reisi@in.iut.ac.ir</a>&gt;<br>
Cc: <a href="mailto:bcp@list.coin-or.org">bcp@list.coin-or.org</a><br>
</div><div><div></div><div class="h5">Sent: Fri, 17 Apr 2009 23:15:57 +0330 (IRST)<br>
Subject: Re: [BCP] Dual ray is wrong!<br>
<br>
Hi Mohamad,<br>
<br>
Then I&#39;m almost sure that my explanation below is the correct one.<br>
Check if you have any variables out of basis at their upper bound. Add<br>
together their reduced costs and see if that is the difference.<br>
<br>
--Laci<br>
<br>
On Fri, 17 Apr 2009, mohamad reisi wrote:<br>
<br>
&gt; Dear Laci,<br>
&gt;<br>
&gt; I am using binary variables. The problem is that sum of the all dual<br>
&gt; value must be equal to primal objecctive solution in optimality. But<br>
&gt; in my case, these values are not equal, and somtimes have a large<br>
&gt; difference.<br>
&gt;<br>
&gt; Mohamad.<br>
&gt;<br>
&gt; ----- Original Message -----<br>
&gt; From: Laszlo Ladanyi &lt;<a href="mailto:ladanyi@us.ibm.com">ladanyi@us.ibm.com</a>&gt;<br>
&gt; To: mohamad reisi &lt;<a href="mailto:mohamad.reisi@in.iut.ac.ir">mohamad.reisi@in.iut.ac.ir</a>&gt;<br>
&gt; Cc: <a href="mailto:bcp@list.coin-or.org">bcp@list.coin-or.org</a><br>
&gt; Sent: Fri, 17 Apr 2009 23:06:30 +0330 (IRST)<br>
&gt; Subject: Re: [BCP] Dual ray is wrong!<br>
&gt;<br>
&gt; Hi Mohamad,<br>
&gt;<br>
&gt; Well, I need more information... Wrong in what sense? The negative of<br>
&gt; what you expected? Or you keep regenerating the same column because<br>
&gt; the duals do not change?<br>
&gt;<br>
&gt; One common mistake in column generation schemes is that the newly<br>
&gt; generated variables have a non-zero bound that can actually be<br>
&gt; attained (like 0&lt;=x&lt;=1). If in the optimal solution of an LP<br>
&gt; relaxation any such variable is out of basis at its upper bound then<br>
&gt; you may have a nonzero dual value that corresponds to the upper bound<br>
&gt; constraint (in this case the dual value is the reduced cost of the<br>
&gt; variable) and this dual value is not in the returned dual ray. Since<br>
&gt; usually for every generated variable there is a clique constraint that<br>
&gt; contains that variable the clique constraint will implicitly enforce<br>
&gt; the upper bound thus it&#39;s much better to just say 0&lt;=x.<br>
&gt;<br>
&gt; --Laci<br>
&gt;<br>
&gt; On Fri, 17 Apr 2009, mohamad reisi wrote:<br>
&gt;<br>
&gt;&gt; Dear Laci,<br>
&gt;&gt;<br>
&gt;&gt; As you said, I am doing column generation.<br>
&gt;&gt; I transefered my code to version 1.1.3. it seems that the dual value are a little better. But they are wrong yet. It is so strange for me! What can I do?<br>
&gt;&gt;<br>
&gt;&gt; Mohamad.<br>
&gt;&gt; ----- Original Message -----<br>
&gt;&gt; From: Laszlo Ladanyi &lt;<a href="mailto:ladanyi@us.ibm.com">ladanyi@us.ibm.com</a>&gt;<br>
&gt;&gt; To: mohamad reisi &lt;<a href="mailto:mohamad.reisi@in.iut.ac.ir">mohamad.reisi@in.iut.ac.ir</a>&gt;<br>
&gt;&gt; Cc: <a href="mailto:bcp@list.coin-or.org">bcp@list.coin-or.org</a><br>
&gt;&gt; Sent: Fri, 17 Apr 2009 16:12:37 +0330 (IRST)<br>
&gt;&gt; Subject: Re: [BCP] Dual ray is wrong!<br>
&gt;&gt;<br>
&gt;&gt; Hi Mohamad,<br>
&gt;&gt;<br>
&gt;&gt; The cvs version is rather old... There has been relatively little<br>
&gt;&gt; change in the interfacesince then, but a fair amount under the hood,<br>
&gt;&gt; and especially clp/OsiClp has changed a lot. If you could port your<br>
&gt;&gt; code to version 1.1.3 and let us know if you still experience<br>
&gt;&gt; problems, that would be great. (Since you get the dual rays, I assume<br>
&gt;&gt; you are doung column generation. versions 1.2.x still have some column<br>
&gt;&gt; generation related bugs, that&#39;s why I suggested 1.1.3.)<br>
&gt;&gt;<br>
&gt;&gt; Thanks,<br>
&gt;&gt; --Laci<br>
&gt;&gt;<br>
&gt;&gt; On Fri, 17 Apr 2009, mohamad reisi wrote:<br>
&gt;&gt;<br>
&gt;&gt;&gt; Dear all,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I have developed an example in Bcp-cvs2006 package, nased on AAP example.<br>
&gt;&gt;&gt; But in this example the dual ray and sum of them are wrong. (by using clp)<br>
&gt;&gt;&gt; I want to know that this problem is because of Bcp-CVS package or not?<br>
&gt;&gt;&gt; I have checked every thing but it seems that my codes are right!<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Thanks.<br>
&gt;&gt;&gt; Mohamad Reisi.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; BCP mailing list<br>
&gt;&gt;&gt; <a href="mailto:BCP@list.coin-or.org">BCP@list.coin-or.org</a><br>
&gt;&gt;&gt; <a href="http://list.coin-or.org/mailman/listinfo/bcp" target="_blank">http://list.coin-or.org/mailman/listinfo/bcp</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
<br>
<br>
_______________________________________________<br>
BCP mailing list<br>
<a href="mailto:BCP@list.coin-or.org">BCP@list.coin-or.org</a><br>
<a href="http://list.coin-or.org/mailman/listinfo/bcp" target="_blank">http://list.coin-or.org/mailman/listinfo/bcp</a><br>
</div></div></blockquote></div><br>