<div> </div>
<div>Hi John,</div>
<div> </div>
<div>Thanks for the response. I was using a different approach to get access to function available in OsiCbcSolverInterface class. I was writing MPS and creating an CbcModel object using the MPS file...</div>
<div> </div>
<div>For some reason the function call getModelPtr() which is obviously a much cleaner approach didn't work, since I could not compile my Flopcpp program if I access getModelPtr() function.</div>
<div>I get the following error</div>
<div> </div>
<div>error: 'class OsiSolverInterface' has no member named 'getModelPtr'</div>
<div><br>I know getModelPtr() is declared in 'class OsiCbcSolverInterface' not in 'class OsiSolverInterface' but I don't know how to tell it to my Flopcpp program. In fact from Flopcpp I can't even call Solver->branchAndBound() function directly.
</div>
<div><br>regards,</div>
<div>vishy</div>
<div> </div>
<div> </div>
<div> </div>
<div><span class="gmail_quote">On 5/16/07, <b class="gmail_sendername">John J Forrest</b> <<a href="mailto:jjforre@us.ibm.com">jjforre@us.ibm.com</a>> 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. So use ->status() to see if search<br>completed. You may also need to use functions such as getModelPtr()-><br>isProvenOptimal() which ask questions of the underlying cbc solver.
<br><br>John Forrest<br><br><br><br> "Vishy Jeet"<br> <vishv.jeet@gmail<br> .com> To<br> Sent by:
<a href="mailto:coin-discuss@list.coin-or.org">coin-discuss@list.coin-or.org</a><br> coin-discuss-boun cc<br> <a href="mailto:ces@list.coin-or">ces@list.coin-or
</a>.<br> org Subject<br> [Coin-discuss] Osi interfaces do<br> not return MIP status<br>
05/14/07 05:47 PM appropriately!<br><br><br> Please respond to<br> Discussions about<br> open source<br> software for<br> Operations<br> Research
<br> <coin-discuss@lis<br> <a href="http://t.coin-or.org">t.coin-or.org</a>><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 <iostream.h><br>#include "OsiCbcSolverInterface.hpp"<br><br><br>int main() {<br>
MP_model my_knap(new OsiCbcSolverInterface);<br>int num_err = 0;<br>num_err = my_knap->readMps("MIPproblem");<br>if(num_err != 0)<br>cout << "errors reading MPS file\n";<br><br>my_knap->branchAndBound();)
<br><br><br>if( my_knap->isProvenPrimalInfeasible() == true)<br> cout << "primal infeasible\n";<br> if( my_knap->isProvenDualInfeasible() == true)<br> cout << "dual infeasible\n";
<br>if( my_knap->isAbandoned() == true)<br> cout << "isAbandoned\n";<br>if( my_knap->isProvenOptimal() == true)<br> cout << "isProvenOptimal\n";<br> if( my_knap->isDualObjectiveLimitReached() == true)
<br> cout << "isDualObjectiveLimitReached\n";<br>if( my_knap->isPrimalObjectiveLimitReached() == true)<br> cout << "isPrimalObjectiveLimitReached\n";<br>if( my_knap->isIterationLimitReached() == true)
<br> cout << "isIterationLimitReached\n";<br>}<br><br><br>executabe prints "isAbandoned"....<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 if (model.isProvenInfeasible () == true)<br>34 cout<< "YES"<<endl;<br>35 else<br>36 cout<< "NO"<<endl;<br><br>executabe prints "YES"....<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 : 1-512-657-8678<br>Home : 1-512-788-5795<br>Work : 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 : 1-512-657-8678<br>Home : 1-512-788-5795
<br>Work : 1-512-535-7399 <br>_______________________<br>Youngest Music Meastro<br><a href="http://www.mayanksahu.net">http://www.mayanksahu.net</a>