Adding row constraints one at a time is slow because of the internal data
structures that simplex solvers use. In large LPs/IPs, the constraint
matrix is almost always sparse, and so allocating an entire dense matrix
doesn't make sense. Instead, a packed sparse matrix is used. Because of
the way
Helloo !!!
> I think this is right. Allocating & copying such a huge matrix repeatedly
> would be terrible. Perhaps we should introduce an API function to
> "add_constraints", which takes a list of lists, or a matrix? If a solver
> doesn't support such a thing, we could fall b
>
> And I guess it does not like to never know how many constraints there will
> be, and I fear that it does a lot of useless copies when you add a
> constraint (perhaps it copies the whole matrix just to add one line ?).
I think this is right. Allocating & copying such a huge matrix repeatedl