commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Neidhart (JIRA)" <>
Subject [jira] [Commented] (MATH-828) Not expected UnboundedSolutionException
Date Thu, 19 Jul 2012 19:19:36 GMT


Thomas Neidhart commented on MATH-828:

Hi Alexey,

I have looked at your updated test case, and my observation is as follows:

You create lots of constraints (L >= 0) that are unnecessary as the solver is already configured
to restrict variables to non-negative values.

I also think you use the objective function in a wrong way. It is defined as:

c1*x1 + ... cn*xn + d

so at index 0 you have the coefficient for the first variable, .... and the last index is
for the constant term. Now you use something called theta, which you put on index 0 which
is wrong imho.

If I remove all the unnecessary constraints, and move the theta variable to the end of the
objective function vector, the tests run through successfully.

> Not expected UnboundedSolutionException
> ---------------------------------------
>                 Key: MATH-828
>                 URL:
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.0
>         Environment: Intel Core i5-2300 Windows XP SP3
>            Reporter: Alexey Slepov
>              Labels: linear, math, programming
>             Fix For: 3.0
>         Attachments:,,,
> SimplexSolver throws UnboundedSolutionException when trying to solve minimization linear
programming problem. The number of exception thrown depends on the number of variables.
> In order to see that behavior of SimplexSolver first try to run JUnit test setting a
final variable ENTITIES_COUNT = 2 and that will give almost good result and then set it to
15 and you'll get a massive of unbounded exceptions.
> First iteration is runned with predefined set of input data with which the Solver gives
back an appropriate result.
> The problem itself is well tested by it's authors (mathematicians who I believe know
what they developed) using Matlab 10 with no unbounded solutions on the same rules of creatnig
random variables values.
> What is strange to me is the dependence of the number of UnboundedSolutionException exceptions
on the number of variables in the problem.
> The problem is formulated as
> min(1*t + 0*L) (for every r-th subject)
> s.t.
> -q(r) + QL >= 0
> x(r)t - XL >= 0
> L >= 0
> where 
> r = 1..R, 
> L = {l(1), l(2), ..., l(R)} (vector of R rows and 1 column),
> Q - coefficients matrix MxR
> X - coefficients matrix NxR 

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message