Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0
-
None
-
None
-
Java 1.6.0_13 on Windows XP 32-bit
Description
SimplexTableau throws a NullPointerException when no solution can be found instead of a NoFeasibleSolutionException
Here is the code that causes the NullPointerException:
LinearObjectiveFunction f = new LinearObjectiveFunction(new double[]
{ 1, 5 }, 0 );
Collection<LinearConstraint> constraints = new ArrayList<LinearConstraint>();
constraints.add(new LinearConstraint(new double[]
, Relationship.GEQ, -1.0));
RealPointValuePair solution = new SimplexSolver().optimize(f, constraints, GoalType.MINIMIZE, true);
Note: Tested both with Apache Commons Math 2.0 release and SVN trunk