[Coin-discuss] OSI design and cooperation with COIN

Luigi Poderico lupoderi at tiscalinet.it
Sun Jul 15 05:56:35 EDT 2001


Hi to J.P., Laci and everyone,

I have talked a lot with Antonio about different designs of OSI and the
possibility to cooperate with COIN community, reaching the following
statements:

*** OSI Design ***
The hierarchy of the OSI classes should be the following:

OsiSolverInterface
    OsiLpSolverInterface : public virtual OsiSolverInterface;
        OsiSimplexLpSolverInterface : public virtual OsiLpSolverInterface;
        OsiVolumeLpSolverInterface : public virtual OsiLpSolverInterface;
        OsiBarrierLpSolverInterface : public virtual OsiLpSolverInterface;
    OsiQpSolverInterface : public virtual OsiSolverInterface;
    OsiMipSolverInterface : public virtual OsiSolverInterface;

The class OsiSolverInterface should be contain all and only the methods
shared by all the others interfaces: basically methods for express linear
constraints.
The other classes add to OsiSolverInterface methods for linear programming,
quadratic programming, etc.
All the classes of the diagram are abstract having some virtual pure
methods, i.e. Solve() method.

Concrete classes close the diagram, eventually making some diamonds: i.e.
OsiOslSolverInterface close a big diamond deriving from
OsiSimplexLpSolverInterface, OsiBarrierLpSolverInterface,
OsiQpSolverInterface and OsiMipSolverInterface; OsiVolSolverInterface derive
from OsiVolumeLpSolverInterface; etc.

*** Cooperation with COIN community ***
The smallest step, in order to transform the actual OSI classes diagram (say
OSI version 1) in to the diagram above suggested (say OSI version 2), could
be to write the core of diagram paying attention to minimize the code
rewriting.

The core of diagram could be the following:

OsiSolverInterface
    OsiLpSolverInterface : public virtual OsiSolverInterface;
        OsiOslSolverInterface: public OsiLpSolverInterface;
        OsiCpxSolverInterface: public OsiLpSolverInterface;
        OsiVolSolverInterface: public OsiLpSolverInterface;
        OsiXprSolverInterface: public OsiLpSolverInterface;
    OsiQpSolverInterface : public virtual OsiSolverInterface;
        OsiCpxSolverInterface: public OsiQpSolverInterface;

Granting that the public interface offered by OsiSolverInterface (version 2)
+ OsiLpSolverInterface cover completely the public interface of
OsiSolverInterface (version 1), OsiVolSolverInterface and
OsiXprSolverInterface doesn't require any modification.
Only OsiOslSolverInterface and OsiCpxSolverInterface need some extensions in
order to (eventually) implement the QP facility of OsiQpSolverInterface.

Actually, we have checked that no methods are required in
OsiLpSolverInterface because the interface of OsiSolverInterface is enough,
but we think that when
OsiSimplexLpSolverInterface, OsiVolumeLpSolverInterface and
OsiBarrierLpSolverInterface will be implemented OsiLpSolverInterface will
contain some  shared methods , i.e. bool ReturnigBaseSolution(). This is the
reason why we left an empty class in the core diagram.

If you accomplish our ideas, we can wait the next release of OSI and
starting from it to write the core diagram, including OsiLpSolverInterface
and OsiQpSolverInterface, and extend OsiCpxSolverInterface (version 1).

Bye bye,
Luigi

^^^^^^^^^^^^^^^^^^^^^^^^^^

Poderico Luigi
Ind.: via Pesenti, 19 - 56124 Pisa
Tel.: +39 329 8151210
Fax. +39 1782261666
e-mail: lupoderi at tiscalinet.it




More information about the Coin-discuss mailing list