[Osi] [Osi-devel] Changing row or matrix coefficients

Andrea Taverna a.tavs at libero.it
Sat Dec 11 12:44:47 EST 2010


Dear Osi developers,

the Osi interface seems to lack setters for row or matrix coefficients 
and, as a consequence, row coefficients must be specified when rows are 
added to the model, not after. Is there any plan for adding those 
methods in the next versions?
AFAIK Clp, Cbc, Gurobi, Cplex and Glpk already support that 
functionality, and others probably do too, so it shouldn't be hard to 
implement them in Osi.

In my limited experience I found the ability to specify 
matrix/row/column coefficients separately from (i.e. after) column/row 
addition quite useful because it allows to achieve separation of 
concerns. In particular, I can construct the "skeleton" of the problem, 
i.e. number of rows and columns, and map it to high-level concepts as 
families of variables/constraints, i.e. to each "family" object a set of 
row or column indexes, that I can use afterwards to easily handle the 
problem.
Without the setters mentioned above I could still build the mapping when 
the model gets constructed the first time, at the price of reducing 
modularity, but it would break as soon as I need to change a 
coefficient, having to delete the old row and add a new one with that 
value changed, and it would force me to have every coefficient known 
before building the model, an assumption that needs not to be true and 
that may prevent further modularization in the calling code.

best regards,

A.T.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/osi/attachments/20101211/0bbe60e3/attachment.html>


More information about the Osi mailing list