<br><font size=2 face="sans-serif">Antonio,</font>
<br>
<br><font size=2 face="sans-serif">I merged OsiSimplexInterface with the
base class because it had originally been designed as a way for people
to build their own simplex algorithms but instead was being used to achieve
fairly basic computations such as obtaining a row of the tableau. &nbsp;In
my work (and that of others) I found it more natural to be able to ask
a solver whether it could do certain tasks. &nbsp;So I would agree with
your suggested method of extending the base class (and being able to ask
a solver whether it can handle a quadratic objective). &nbsp;I would think
that a quadratic objective was no more specialized than integer variables
which were of course in from day one due to the history of OsiSolverInterface.</font>
<br>
<br><font size=2 face="sans-serif">When (if :-)) the new design is implemented
then quadratic can be implemented in a clean abstract way but for now I
would vote for extending OsiSolverInterface.</font>
<br>
<br><font size=2 face="sans-serif">As for changing coefficients, &nbsp;I
agree that it would be useful but it might be some work for the maintainers
of some interfaces. &nbsp;As a compromise we might add a &quot;replaceMatrix&quot;
method which would just check dimensions of new matrix are same as those
of existing model. &nbsp;This should be easy to implement as it should
just be a subset of loadProblem. &nbsp;Then the base implementation of
&quot;modifyCoefficient&quot; would be - get CoinPackedMatrix from model,
use CoinPackedmatrix-&gt;modifyCoefficient(), replaceMatrix. &nbsp;This
could of course be extended to more general methods working on CoinPackedMatrix.
&nbsp;Obviously individual solvers could then implement more efficient
methods.</font>
<br>
<br><font size=2 face="sans-serif">John Forrest</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Antonio Frangioni &lt;frangio@di.unipi.it&gt;</b>
</font>
<br><font size=1 face="sans-serif">Sent by: coin-discuss-bounces@list.coin-or.org</font>
<p><font size=1 face="sans-serif">12/14/2005 09:16 AM</font>
<table border>
<tr valign=top>
<td bgcolor=white>
<div align=center><font size=1 face="sans-serif">Please respond to<br>
Discussions about open source software for Operations Research &nbsp; &nbsp;
&nbsp; &nbsp;</font></div></table>
<br>
<td width=59%>
<table width=100%>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td valign=top><font size=1 face="sans-serif">Discussions about open source
software for Operations Research &lt;coin-discuss@list.coin-or.org&gt;</font>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td valign=top>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td valign=top><font size=1 face="sans-serif">[Coin-discuss] Quadratic
costs in OSI: update [+other thing]</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2><tt>We *could* be about to try coming up with a proposal
to add handling &nbsp;<br>
of quadratic<br>
costs in the OSISolver interface. However, reviewing the discussion &nbsp;<br>
and the current<br>
status of OSISolver I think I have to ask the question again.<br>
<br>
The question was:<br>
<br>
&gt;&gt; is it OK for everybody that *every* OSISolver is, in general,
a QP &nbsp;<br>
&gt;&gt; solver, except<br>
&gt;&gt; that some may refuse to implement the QP-specific methods throwing
&nbsp;<br>
&gt;&gt; an exception?<br>
&gt;&gt; Or a cleaner but more cumbersome solution where a OSIQPSolver
&nbsp;<br>
&gt;&gt; deriving (??) from<br>
&gt;&gt; OSISolver is required? In the latter case, what should be the
&nbsp;<br>
&gt;&gt; actual inheritance<br>
&gt;&gt; diagram? I'm thinking e.g. to how OsiSimplexInterface enters the
&nbsp;<br>
&gt;&gt; picture (since<br>
&gt;&gt; QP-simplex is also in the cards ...).<br>
<br>
And the authoritative answer I got was:<br>
<br>
&gt; Separation of QP functionality from the current OSI is a Good Thing.<br>
&gt;<br>
&gt; It seems like the natural hierarchy is to extend the &nbsp;<br>
&gt; OsiSolverInterface base class<br>
&gt; with OsiQpSolverInterface, which adds base-class versions of calls
&nbsp;<br>
&gt; necessary to support<br>
&gt; QP (not simplex-specific ones though--see later). &nbsp;Then &nbsp;<br>
&gt; OsiXxxQpSolverInterface would be<br>
&gt; derived from OsiXxxSolverInterface and OsiQpSolverInterface. &nbsp;You
&nbsp;<br>
&gt; could derive<br>
&gt; OsiQpSimplexInterface from OsiSimplexInterface and a solver that &nbsp;<br>
&gt; supports QP simplex<br>
&gt; would be derived from that as well.<br>
<br>
Now, this is neat from the OOP viewpoint, and I can swallow the pill. &nbsp;<br>
However, the<br>
latest versions of OSISolver have gone in the exact contrary &nbsp;<br>
direction by killing<br>
OsiSimplexInterface as a separate class and having it &quot;gobbled up&quot;
by &nbsp;<br>
the base class.<br>
Or am I missing something?<br>
<br>
Because the expected number of methods in OsiQpSolverInterface is &nbsp;<br>
quite low, is it<br>
really worth to pay the price of a new class, virtual inheritance and &nbsp;<br>
all the rest?<br>
The advantage of adding methods to the base class is that one &nbsp;<br>
provides them with<br>
&quot;void&quot; (but not pure vitual) implementations and none of the
sub- <br>
projects need to<br>
touch a line of their code unless they can and want implement the new &nbsp;<br>
stuff.<br>
<br>
Opinions?<br>
<br>
Another thing: I stumbled upon the fact that OsiSolverInterface does &nbsp;<br>
not allow the<br>
user to change coefficients (other than costs/RHSs) individually. I &nbsp;<br>
need to change<br>
rows of the system: I could delete them and re-add them changed, but &nbsp;<br>
then I had to<br>
add a dictionary to account for the shuffled row names, which I can &nbsp;<br>
spare otherwise.<br>
Taking into account that:<br>
<br>
- this is just deleting a row/column and adding one, except giving &nbsp;<br>
the new one<br>
 &nbsp; the name of the old one;<br>
- every solver I looked to actually has some ChangeCoefficient() &nbsp;<br>
method anyway;<br>
<br>
wouldn't it be reasonable to have this feature added? YAIITWL (Yet &nbsp;<br>
Another Item<br>
In The Whish List ...)<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
Regards<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
Antonio<br>
<br>
<br>
<br>
Antonio Frangioni &nbsp; &nbsp;- &nbsp; &nbsp;Associate Professor &nbsp;
&nbsp;- &nbsp; &nbsp;Università di Pisa<br>
Dipartimento di Informatica - Largo B. Pontecorvo, 3 - 56127 Pisa, Italy<br>
Ph: +39 050 2212789, Fax: +39 050 2212726, Web: www.di.unipi.it/~frangio<br>
<br>
<br>
_______________________________________________<br>
Coin-discuss mailing list<br>
Coin-discuss@list.coin-or.org<br>
http://list.coin-or.org/mailman/listinfo/coin-discuss<br>
</tt></font>
<br>