Thanks for the answers.<br><br><div class="gmail_quote">On Thu, Mar 4, 2010 at 1:31 AM, Pietro Belotti <span dir="ltr">&lt;<a href="mailto:belotti@lehigh.edu">belotti@lehigh.edu</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;">
Hi Bruno,<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Is there a way to store the variables&#39; values once a<br>
integer solution is found<br>
</blockquote></blockquote>
<br></div>
A cbc parameter, MaxNumSol, is defined as the number of feasible solution after which cbc stops (it is by default very large). However, in order to store the solutions I agree with Pete on what to do.<div class="im"><br>

<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

(or even stop the execution once a integer<br>
solution is found) ?<br>
</blockquote></blockquote>
<br></div>
Another way to stop a branch-and-bound at the *first* feasible solution found is to solve a modified problem where the objective function is 0, i.e., if your problem is min{f(x): g(x)&lt;=0} then the modified problem is min{0: g(x)&lt;= 0}. Since every feasible solution has value 0 and 0 is a lower bound, the branch-and-bound terminates immediately.<div class="im">
<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Are these values the ones from the best<br>
solution found?<br>
</blockquote></blockquote>
<br></div>
Yes, they are.<br>
<br>
Cheers,<br>
Pietro<br>
<br>
<br>
_________________________________________<br>
Pietro Belotti, Lehigh University<br>
Dept. of Industrial and Systems Engineering<br>
200 W Packer Ave, Bethlehem PA 18015.<br>
phone: 610-758-3865   fax: 610-758-4886<br>
email: <a href="mailto:belotti@lehigh.edu" target="_blank">belotti@lehigh.edu</a><br>
web:   <a href="http://www.lehigh.edu/%7Epib208" target="_blank">http://www.lehigh.edu/~pib208</a><div><div></div><div class="h5"><br>
<br>
<br>
On 03/03/2010, Pete Janes &lt;<a href="mailto:ppjanes@gmail.com" target="_blank">ppjanes@gmail.com</a>&gt; wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Bruno,<br>
<br>
I think you need to consult the Cbc manual.<br>
<br>
I have been trying to store a list of the best solution myself, and I<br>
believe it involves modifying the CBC source code, not the Couenne<br>
source code. Right now, I just trap the solution in<br>
<br>
void<br>
CbcModel::setBestSolution (CBC_Message how,<br>
                           double &amp; objectiveValue, const double *solutionIn,<br>
                           int fixVariables)<br>
<br>
In Cbc/CbcModel.cpp<br>
<br>
this routine is called whenever a solution is found. It then verifies<br>
whether the solution is feasible. The solution is &quot;const double<br>
*solutionIn&quot; and the associated objective value is &quot;double &amp;<br>
objectiveValue.&quot;<br>
<br>
Unfortunately this involves recompiling the source, I am not sure if<br>
there is a parameter you can pass to Cbc to do this automatically.<br>
<br>
Kind regards,<br>
<br>
Pete<br>
<br>
<br>
<br>
On Thu, Mar 4, 2010 at 10:37 AM, Bruno Conti Marini &lt;<a href="mailto:bcmarini@gmail.com" target="_blank">bcmarini@gmail.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br>
<br>
I am running Couenne with &quot;time_limit 7200&quot;. After that time limit expires I<br>
print the value of the variables. Are these values the ones from the best<br>
solution found ? Is there a way to store the variables&#39; values once a<br>
integer solution is found (or even stop the execution once a integer<br>
solution is found) ?<br>
<br>
I didn&#39;t find any mention of this on the &quot;Couenne User&#39;s Manual&quot; neither on<br>
the generated documentation (doxydoc).<br>
<br>
Thanks for your time.<br>
<br>
--<br>
Bruno Conti Marini<br>
M. Sc. Computer Science Student<br>
Institute of Computing, UNICAMP<br>
<a href="http://www.students.ic.unicamp.br/%7Era042272/" target="_blank">http://www.students.ic.unicamp.br/~ra042272/</a><br>
</blockquote></blockquote>
<br>
<br></div></div>
----------------------------------------------------------------<br>
This message was sent using IMP, the Internet Messaging Program.<br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>Bruno Conti Marini<br>M. Sc. Computer Science Student<br>Institute of Computing, UNICAMP<br><a href="http://www.students.ic.unicamp.br/~ra042272/">http://www.students.ic.unicamp.br/~ra042272/</a><br>