Details

Bug

Status: Closed

Critical

Resolution: Incomplete

2.1

None

Windows XP commons Math 2.0 jre 1.6
Description
I received a email which introduces URL "https://svn.apache.org/repos/asf/commons/proper/math/trunk".
I downloaded Source Files in Package "org\apache\commons\math\optimization\linear"
and compiled these files(make a new commonsmath2.?.jar = Simplex Patch Version)
Lastly I tested a fixed Simplex module, But didn't get a feasible solution.
Exception Message is as follow

org.apache.commons.math.optimization.linear.NoFeasibleSolutionException: no feasible solution
at org.apache.commons.math.optimization.linear.SimplexSolver.solvePhase1(SimplexSolver.java:166)
at org.apache.commons.math.optimization.linear.SimplexSolver.doOptimize(SimplexSolver.java:176)
at org.apache.commons.math.optimization.linear.AbstractLinearOptimizer.optimize(AbstractLinearOptimizer.java:106)
at SimplexSolverTest.test111(SimplexSolverTest.java:711)
at SimplexSolverTest.main(SimplexSolverTest.java:730

Test Data is as follow

double[] ob =
;
double[] c1 =
;
double[] c2 =
;
double[] c3 =
;
double[] c4 =
;
double[] c5 = {51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,48.9,45.6,52.5,55.5,56.4,50.7,47.4,54.6,58.8,53.4,51.9,50.4,51.9,51.9,46.2,59.4,45.9,53.4,45,49.8,52.8,54,58.8,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
double[] c6 = {51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,51.6,48.9,45.6,52.5,55.5,56.4,50.7,47.4,54.6,58.8,53.4,51.9,50.4,51.9,51.9,46.2,59.4,45.9,53.4,45,49.8,52.8,54,58.8,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
double[] c7 = {6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
double[] c8 = {6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
double[] c9 =
;
double[] c10 =
;
double[] c11 = {9,21,21,21,21,21,21,21,21,21,21,21,21,21,9,9,9,9,9,21,21,21,9,9,9,9,9,21,21,9,9,9,21,9,9,21,21,9,9,9,21,21,21,21,21,21,21,21,21,21,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0};
double[] c12 = {9,21,21,21,21,21,21,21,21,21,21,21,21,21,9,9,9,9,9,21,21,21,9,9,9,9,9,21,21,9,9,9,21,9,9,21,21,9,9,9,21,21,21,21,21,21,21,21,21,21,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0};
double[] c13 = {6,6,6,6,6,6,6,6,6,6,6,6,6,6,24,24,24,24,24,6,6,6,24,6,6,24,24,6,6,24,24,24,6,24,6,6,6,6,6,24,6,6,6,6,6,6,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0};
double[] c14 = {6,6,6,6,6,6,6,6,6,6,6,6,6,6,24,24,24,24,24,6,6,6,24,6,6,24,24,6,6,24,24,24,6,24,6,6,6,6,6,24,6,6,6,6,6,6,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0};
double[] c15 = {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,27,27,3,3,3,3,3,3,3,3,3,3,3,3,27,27,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0};
double[] c16 = {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,27,27,3,3,3,3,3,3,3,3,3,3,3,3,27,27,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0};
double[] c17 = {21,9,9,9,9,9,9,9,9,9,9,9,9,21,9,9,21,21,9,9,9,9,21,21,21,9,9,9,9,9,9,9,9,9,21,21,21,21,9,9,9,9,9,9,9,9,9,9,9,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0};
double[] c18 = {21,9,9,9,9,9,9,9,9,9,9,9,9,21,9,9,21,21,9,9,9,9,21,21,21,9,9,9,9,9,9,9,9,9,21,21,21,21,9,9,9,9,9,9,9,9,9,9,9,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0};
double[] c19 =
;
double[] c20 =
;
double[] c21 =
;
double[] c22 =
;
double[] c23 = {76826208,43611660,74004048,42438492,17867172,80188740,91871496,60051624,17172732,13634892,27214548,90841296,36519888,28455000,92140536,18199872,96423492,70070832,30735576,95032776,62785896,86295444,85244784,101893896,69367140,81389052,17004600,73590684,53010564,99406704,65926212,58020588,85495344,74795820,73299000,89716200,48211212,116007900,93256404,113641308,119211360,30296640,79729068,54674916,103942596,13225236,90491784,51673896,112110768,42156984,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
double[] c24 =
;
double[] c25 =
;
double[] c26 =
;
double[] c27 =
;
double[] c28 =
;
double[] c29 =
;
double[] c30 =
;
double[] c31 =
;
double[] c32 =
;
double[] c33 =
;
double[] c34 =
;
double[] c35 =
;
double[] c36 =
;
double[] c37 =
;
double[] c38 =
;
double[] c39 =
;
double[] c40 =
;
double[] c41 =
;
double[] c42 =
;
double[] c43 =
;
double[] c44 =
;
double[] c45 =
;
double[] c46 =
;
double[] c47 =
;
double[] c48 =
;
double[] c49 =
;
double[] c50 =
;
double[] c51 =
;
double[] c52 =
;
double[] c53 =
;
double[] c54 =
;
double[] c55 =
;
double[] c56 =
;
double[] c57 =
;
double[] c58 =
;
double[] c59 =
;
double[] c60 =
;
double[] c61 =
;
double[] c62 =
;
double[] c63 =
;
double[] c64 =
;
double[] c65 =
;
double[] c66 =
;
double[] c67 =
;
double[] c68 =
;
double[] c69 =
;
double[] c70 =
;
double[] c71 =
;
double[] c72 =
;
double[] c73 =
;
LinearObjectiveFunction f = new LinearObjectiveFunction(ob, 0 );
Collection<LinearConstraint> constraints = new ArrayList<LinearConstraint>();
constraints.add(new LinearConstraint(c1 , Relationship.GEQ,3000000000.0d));
constraints.add(new LinearConstraint(c2 , Relationship.LEQ,3000000000.0d));
constraints.add(new LinearConstraint(c3 , Relationship.LEQ,1200.0d));
constraints.add(new LinearConstraint(c4 , Relationship.GEQ,1200.0d));
constraints.add(new LinearConstraint(c5 , Relationship.LEQ,0.0d));
constraints.add(new LinearConstraint(c6 , Relationship.GEQ,0.0d));
constraints.add(new LinearConstraint(c7 , Relationship.LEQ,0.0d));
constraints.add(new LinearConstraint(c8 , Relationship.GEQ,0.0d));
constraints.add(new LinearConstraint(c9 , Relationship.LEQ,0.0d));
constraints.add(new LinearConstraint(c10, Relationship.GEQ,0.0d));
constraints.add(new LinearConstraint(c11, Relationship.LEQ,0.0d));
constraints.add(new LinearConstraint(c12, Relationship.GEQ,0.0d));
constraints.add(new LinearConstraint(c13, Relationship.LEQ,0.0d));
constraints.add(new LinearConstraint(c14, Relationship.GEQ,0.0d));
constraints.add(new LinearConstraint(c15, Relationship.LEQ,0.0d));
constraints.add(new LinearConstraint(c16, Relationship.GEQ,0.0d));
constraints.add(new LinearConstraint(c17, Relationship.LEQ,0.0d));
constraints.add(new LinearConstraint(c18, Relationship.GEQ,0.0d));
constraints.add(new LinearConstraint(c19, Relationship.LEQ,0.0d));
constraints.add(new LinearConstraint(c20, Relationship.GEQ,0.0d));
constraints.add(new LinearConstraint(c21, Relationship.LEQ,0.0d));
constraints.add(new LinearConstraint(c22, Relationship.GEQ,0.0d));
constraints.add(new LinearConstraint(c23, Relationship.GEQ,0.0d));
constraints.add(new LinearConstraint(c24, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c25, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c26, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c27, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c28, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c29, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c30, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c31, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c32, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c33, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c34, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c35, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c36, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c37, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c38, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c39, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c40, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c41, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c42, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c43, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c44, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c45, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c46, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c47, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c48, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c49, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c50, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c51, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c52, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c53, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c54, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c55, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c56, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c57, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c58, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c59, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c60, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c61, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c62, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c63, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c64, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c65, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c66, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c67, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c68, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c69, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c70, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c71, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c72, Relationship.GEQ,1.0d));
constraints.add(new LinearConstraint(c73, Relationship.GEQ,1.0d));
try {
SimplexSolver solver = new SimplexSolver();
RealPointValuePair solution = solver.optimize(f, constraints, GoalType.MINIMIZE, false);
double[] p = solution.getPoint();
for(int i=0; i < p.length; i++)
{ System.out.println(p[i]); }}catch(Exception e)
{ e.printStackTrace(); }
for reference, I need to use a few hundred contraints(The data presented is part of the required data)