[Coin-discuss] add a column at particular index

Matthew Saltzman mjs at clemson.edu
Fri Jun 5 15:47:19 EDT 2009


On Fri, 2009-06-05 at 15:13 -0400, Matthew Galati wrote:
> Is there an OSI method for adding a column at a particular index? That
> is, I want to add a column as the i-th column and shift all other
> columns to the right.

I don't think most (or any) optimizers that OSI supports include that
functionality.  CPLEX doesn't, for example.  It would be quite expensive
in general, and implementing it in OSI if it's not built into the solver
lib is pretty horrendous--it involves unloading the problem, copying the
problem or at least doing overlapping-memory moves of the data for the
columns to the right of the insertion point, then reloading the problem
in the solver.

You're much better off just indirectly indexing columns through a vector
that keeps them in the order you want.  (If I were to implement it in
OSI, that's how I would do it.)  But for that, you are on your own.

		Matt

-- 
                Matthew Saltzman

Clemson University Math Sciences
mjs AT clemson DOT edu
http://www.math.clemson.edu/~mjs




More information about the Coin-discuss mailing list