Hi John,<div><br></div><div>The answer to your question is not very straightforward because of some inconsistency with how integer programs are handled by different Osi interfaces. From your description, I guess you are primarily focusing on OsiCbc, whose implementation has a few &quot;quirks.&quot; Someday, I hope to fix these, although a new version of Osi that would obviate the need for this is &quot;under development.&quot; In the meantime, I guess the short answer to your question is that yes, with Cbc, I believe you are correct, but this is not true for most other solvers. As far as I can recall, all other solvers support modification of the problem using the standard Osi problem modification methods. If you are after open source solvers, then this includes Glpk and SYMPHONY.</div>

<div><br></div><div>The question of what happens when you modify the problem and then call the branchAndBound() method again on the modified problem is another question. As far as I know, all solvers except SYMPHONY will simply resolve the new problem from scratch in this case, as warm starting methods for IP solvers are not very well developed. SYMPHONY does have a warm starting methodology that will attempt to solve the modified problem from a warm start in some cases, though your mileage will vary on whether this buys you anything. </div>

<div><br></div><div>I hope this clarifies some things. I&#39;ll be happy to work with you off-line, as it would be nice to have COIN working through Sage. By the way, I understand that Sage is built on Python, right? Have you take a look at PuLP and Pyomo, which are both extensions to Python that provide the ability to construct models and call COIN solvers. I guess it should be possible to embed this in Sage, though you wouldn&#39;t be able to pass Sage data structures directly into PuLP or Pyomo I suppose. I don&#39;t know much about Sage, but it&#39;s something to consider.</div>

<div><br></div><div>Cheers,</div><div><br></div><div>Ted<br><br><div class="gmail_quote">On Wed, Jan 11, 2012 at 5:28 PM, John Perry <span dir="ltr">&lt;<a href="mailto:John.Perry@usm.edu">John.Perry@usm.edu</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi<br>
<br>
Thanks to everyone who replied to my earlier messages. I have a followup question that should hopefully finish things for me.<br>
<br>
In the context* I&#39;m working on, I have to do the following:<br>
<br>
(1) set up a system of linear inequalities;<br>
(2) if not &quot;done&quot; (whatever &quot;done&quot; might mean),<br>
    (2a) solve the system; and<br>
    (2b) add linear inequalities to the system, perhaps after copying it;<br>
    (2c) retrieve solutions to evaluate &quot;done&quot;.<br>
<br>
At first I tried the following approach:<br>
(1) create si, an OsiSolverInterface;<br>
(2) create a model m with si;<br>
(3) if not &quot;done&quot;,<br>
    (3a) add linear inequalities to si, perhaps after copying it;<br>
    (3b) solve by calling m&#39;s branchAndBound();<br>
    (3c) retrieve solutions from si to evaluate &quot;done&quot;.<br>
<br>
This was problematic, for all kinds of reasons. By reading the examples carefully, I discovered that I had to retrieve the solutions from m, not from si. In addition, I can&#39;t add new inequalities to m&#39;s solver after it solves.<br>


<br>
So it seems that what I have to do is this:<br>
(1) create si, an OsiSolverInterfaace;<br>
(2) if not &quot;done&quot;,<br>
    (2a) add linear inequalities to si, perhaps after copying it;<br>
    (2b) create a model m with si;<br>
    (2c) solve by calling m&#39;s branchAndBound();<br>
    (2d) retrieve solutions from si to evaluate &quot;done&quot;.<br>
<br>
In short, a new model must be created whenever we want to add inequalities to a system.<br>
<br>
Is this correct, or am I missing something?<br>
<br>
Thanks in advance!<br>
john perry<br>
<br>
* The context is an interface between Coin and the Sage computer algebra system. This is  why the scenario depicted might look a little strange: it replicates how a Sage user might try to play around with a linear system. (Me, for example, but other people, too.)<br>


_______________________________________________<br>
Cbc mailing list<br>
<a href="mailto:Cbc@list.coin-or.org">Cbc@list.coin-or.org</a><br>
<a href="http://list.coin-or.org/mailman/listinfo/cbc" target="_blank">http://list.coin-or.org/mailman/listinfo/cbc</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Dr. Ted Ralphs<br>Associate Professor, Lehigh University<br>(610) 628-1280<br>ted &#39;at&#39; lehigh &#39;dot&#39; edu<br><a href="http://coral.ie.lehigh.edu/~ted" target="_blank">coral.ie.lehigh.edu/~ted</a><br>

<br>
</div>