<div>&nbsp;</div>
<div>Hi John,</div>
<div>&nbsp;</div>
<div>Thanks for the response. I was using a different approach to get access to function&nbsp;available in OsiCbcSolverInterface class. I was writing MPS and creating an CbcModel object using the MPS file...</div>
<div>&nbsp;</div>
<div>For some reason the function call getModelPtr() which is obviously a much cleaner approach didn&#39;t work, since I could not compile my Flopcpp program if I access getModelPtr() function.</div>
<div>I get the following error</div>
<div>&nbsp;</div>
<div>error: &#39;class OsiSolverInterface&#39; has no member named &#39;getModelPtr&#39;</div>
<div><br>I know getModelPtr() is declared in &#39;class OsiCbcSolverInterface&#39; not in &#39;class OsiSolverInterface&#39;&nbsp; but I don&#39;t know how to tell it to my Flopcpp program. In fact from Flopcpp I can&#39;t even call Solver-&gt;branchAndBound() function directly.
</div>
<div><br>regards,</div>
<div>vishy</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div><span class="gmail_quote">On 5/16/07, <b class="gmail_sendername">John J Forrest</b> &lt;<a href="mailto:jjforre@us.ibm.com">jjforre@us.ibm.com</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Vishy,<br><br>OsiCbcSolverInterface is just like Osi...SolverInterface in many ways, so<br>those functions are returning values for the last continuous solve - not
<br>for branch and bound.<br><br>Look at Cbc specific public interfaces.&nbsp;&nbsp;So use -&gt;status() to see if search<br>completed.&nbsp;&nbsp;You may also need to use functions such as getModelPtr()-&gt;<br>isProvenOptimal() which ask questions of the underlying cbc solver.
<br><br>John Forrest<br><br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;Vishy Jeet&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;vishv.jeet@gmail<br>&nbsp;&nbsp;&nb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sp;&nbsp;&nbsp; appropriately!<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Please respond to<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Discussions about<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; open source<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;software for<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Operations<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Research
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;coin-discuss@lis<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://t.coin-or.org">t.coin-or.org</a>&gt;<br><br><br><br><br><br><br><br>Hi everyone,<br><br>I am using an MPS file which is located at the following location:
<br><a href="http://uts.cc.utexas.edu/~jeetv/MIPproblem.mps">http://uts.cc.utexas.edu/~jeetv/MIPproblem.mps</a>. (too big to be posted<br>here...)<br><br>When I am using the following code it returns the message isAbandoned
<br>regardless<br>whether branchAndBound() is called or not....but if I use Cbc solver<br>directly, it returns the primal infeasibility. Could you check if the<br>status functions (called in the code below) written OsiCbcSolverInterface()
<br>are working properly..<br><br>regards,<br>vishy<br><br>Code for solving the MPS file using Osi interface:<br><br>#include &lt;iostream.h&gt;<br>#include &quot;OsiCbcSolverInterface.hpp&quot;<br><br><br>int main() {<br>
MP_model my_knap(new OsiCbcSolverInterface);<br>int num_err = 0;<br>num_err = my_knap-&gt;readMps(&quot;MIPproblem&quot;);<br>if(num_err != 0)<br>cout &lt;&lt; &quot;errors reading MPS file\n&quot;;<br><br>my_knap-&gt;branchAndBound();)
<br><br><br>if( my_knap-&gt;isProvenPrimalInfeasible() == true)<br>&nbsp;&nbsp; cout &lt;&lt; &quot;primal infeasible\n&quot;;<br>&nbsp;&nbsp;if( my_knap-&gt;isProvenDualInfeasible() == true)<br>&nbsp;&nbsp; cout &lt;&lt; &quot;dual infeasible\n&quot;;
<br>if( my_knap-&gt;isAbandoned() == true)<br>&nbsp;&nbsp; cout &lt;&lt; &quot;isAbandoned\n&quot;;<br>if( my_knap-&gt;isProvenOptimal() == true)<br>&nbsp;&nbsp; cout &lt;&lt; &quot;isProvenOptimal\n&quot;;<br>&nbsp;&nbsp;if( my_knap-&gt;isDualObjectiveLimitReached() == true)
<br>&nbsp;&nbsp; cout &lt;&lt; &quot;isDualObjectiveLimitReached\n&quot;;<br>if( my_knap-&gt;isPrimalObjectiveLimitReached() == true)<br>&nbsp;&nbsp; cout &lt;&lt; &quot;isPrimalObjectiveLimitReached\n&quot;;<br>if( my_knap-&gt;isIterationLimitReached() == true)
<br>&nbsp;&nbsp; cout &lt;&lt; &quot;isIterationLimitReached\n&quot;;<br>}<br><br><br>executabe&nbsp;&nbsp;prints &quot;isAbandoned&quot;....<br><br><br><br>Code for solving the MPS file using Cbc directly:)<br><br>Using minimum.cpp in Cbc examples --aalong with the following test:
<br><br>33&nbsp;&nbsp; if (model.isProvenInfeasible () == true)<br>34&nbsp;&nbsp;&nbsp;&nbsp; cout&lt;&lt; &quot;YES&quot;&lt;&lt;endl;<br>35&nbsp;&nbsp; else<br>36&nbsp;&nbsp;&nbsp;&nbsp; cout&lt;&lt; &quot;NO&quot;&lt;&lt;endl;<br><br>executabe&nbsp;&nbsp;prints &quot;YES&quot;....<br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>--<br>Best Regards,<br>Vishv Jeet, Ph.D.,<br>Operations Research Scientist,<br>Gravitant Inc.,<br>(The Business Governance Company)<br><a href="http://www.gravitant.com">
http://www.gravitant.com</a>.<br>Austin, TX, USA.<br>Cell&nbsp;&nbsp;&nbsp;&nbsp;: 1-512-657-8678<br>Home : 1-512-788-5795<br>Work&nbsp;&nbsp;: 1-512-535-7399<br>_______________________<br>Youngest Music Meastro<br><a href="http://www.mayanksahu.net">
http://www.mayanksahu.net</a>. _______________________________________________<br>Coin-discuss mailing list<br><a href="mailto:Coin-discuss@list.coin-or.org">Coin-discuss@list.coin-or.org</a><br><a href="http://list.coin-or.org/mailman/listinfo/coin-discuss">
http://list.coin-or.org/mailman/listinfo/coin-discuss</a><br><br><br>_______________________________________________<br>Coin-discuss mailing list<br><a href="mailto:Coin-discuss@list.coin-or.org">Coin-discuss@list.coin-or.org
</a><br><a href="http://list.coin-or.org/mailman/listinfo/coin-discuss">http://list.coin-or.org/mailman/listinfo/coin-discuss</a><br></blockquote></div><br><br clear="all"><br>-- <br>Best Regards,<br>Vishv Jeet, Ph.D.,<br>
Operations Research Scientist,<br>Gravitant Inc.,<br>(The Business Governance Company)<br><a href="http://www.gravitant.com">http://www.gravitant.com</a><br>Austin, TX, USA.<br>Cell&nbsp;&nbsp;&nbsp;&nbsp;: 1-512-657-8678<br>Home : 1-512-788-5795
<br>Work&nbsp;&nbsp;: 1-512-535-7399 <br>_______________________<br>Youngest Music Meastro<br><a href="http://www.mayanksahu.net">http://www.mayanksahu.net</a>