Issue 124115

Summary: Solver does not identify a linear model as infeasible
Product: Calc Reporter: tavert
Component: programmingAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Normal    
Priority: P3 CC: elish, issues, tavert, tkralphs
Version: 4.0.1   
Target Milestone: ---   
Hardware: PC   
OS: All   
Issue Type: DEFECT Latest Confirmation in: 4.1.0-dev
Developer Difficulty: ---
Attachments:
Description Flags
spreadsheet that replicates the problem
none
screenshot of spreadsheet none

Description tavert 2014-01-26 14:04:17 UTC
Created attachment 82400 [details]
spreadsheet that replicates the problem

The linear programming Solver is giving nonsense results for some infeasible problems. An attached example is:

Min A2 = 10 + 0.03 * B2 + 0.5625 * C2
s.t. B2 >= 0
     C2 >= 0
     D2 = 1.5 * B2 - 9.81 * A2 >= 0
     E2 = A2 - 4 * (A2 - 0.5 * C2) >= 0

In OpenOffice 3.3.0 or 3.2.1, the Solver recognizes this problem as infeasible. However in 4.0.1, it is reporting success with B2 = 0, C2 = 96, D2 = -627.84, E2 = 0. This violates the D2 constraint, so should not have been reported as a successful solution.

I don't know when https://issues.apache.org/ooo/show_bug.cgi?id=118160 went into a release, but my guess is this problem is related to having changed the linear solver. As it happens I am a contributor to several COIN-OR projects, I'm quite familiar with those solvers so if the LP as sent from Calc to CoinMP looks correct I can help look into what's happening on the solver side.
Comment 1 Edwin Sharp 2014-01-26 14:52:06 UTC
A2=3908 with
AOO410m1(Build:9750)  -  Rev. 1557669
2014-01-14_04:11:13 - Rev. 1557927
Debian
Gnumeric 1.12.9 gives error.
Comment 2 Edwin Sharp 2014-01-26 14:57:45 UTC
Created attachment 82401 [details]
screenshot of spreadsheet
Comment 3 tavert 2014-01-26 15:15:21 UTC
I also get the same A2 = 3908.69 "solution" when I enter B2 >= 0 and C2 >= 0 as separate constraints. The A2 = 64, B2 = 0, C2 = 96 result was from selecting the "Assume variables as non-negative" option, with the only explicit constraints on D2 >= 0 and E2 >= 0.