commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Neidhart <>
Subject Re: [Math] Limitations of the SimplexSolver class?
Date Tue, 09 Apr 2013 06:36:28 GMT
On 04/09/2013 08:23 AM, Alexander Sehlström wrote:
> Thomas,
> After writing the pice of code you were asking for I found the error; The max iteration
exception was thrown, but swallowed by some part of my code, hence not showing up. So by increasing
from maximum 100 to 1000 iterations the SimplexSolver returns a result.
> It is quite slow however and do not come near the computation time I need solving the
same problem in Matlab with linprog. Suggestions of other Apache Commons Math classes that
are solving the same type of problems as the SimplexSolver do are gratefully accepted.

Hi Alexander,

good that your example works. The reason its slow is most likely related
to your problem setup.

The SimplexSolver currently does not support lower/upper bounds for the
variables, thus you had to create separate constraints for each variable
as suggested before. This makes the calculation quite slow I guess, so
we should add direct support for such bounds (similar to matlab or octave).

This can be done with the original tableau (see

It would be nice to have your example as performance test, so you could
add a feature request to the issue tracker yourself.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message