Bug 159484

Summary: CoinMP Linear Solver finds solution to infeasible model
Product: LibreOffice Reporter: Patrick Jansky <patrick.jansky>
Component: CalcAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: normal CC: rafael.palma.lima
Priority: medium    
Version: 7.6.4.1 release   
Hardware: All   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 113360    
Attachments: Example file showing the incorrect behavior

Description Patrick Jansky 2024-01-31 17:44:11 UTC
Description:
I tried to use the solver on the following model:
1*x1 + 2*x2 <= 6
1*x1 + 2*x2 >= 8
optimize for maximum of x1 + x2

The LibreOffice Linear Solver correctly identifies the model as infeasible, the LibreOffice CoinMP Linear Solver falsely finds the optimum x1=0 x2=3 which violates the second inequality. I would like upload the document, but I can't seem to figure out how to attach a file. 

Steps to Reproduce:
1. Create the following model:
1*x1 + 2*x2 <= 6
1*x1 + 2*x2 >= 8
optimize for maximum of x1 + x2

2. Use the solve with the LO Linear Solver -> model is infeasible (correct)
3. Use the solve with the LO CoinMP Linear Solver -> x1=0; x2=3 (incorrect)

Actual Results:
LO Linear Solver: model is infeasible (correct)
LO CoinMP Linear Solver: x1=0; x2=3 (incorrect)

Expected Results:
Both solvers should recognize the model as infeasible


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.6.4.1 (X86_64) / LibreOffice Community
Build ID: e19e193f88cd6c0525a17fb7a176ed8e6a3e2aa1
CPU threads: 8; OS: Linux 6.6; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Flatpak
Calc: threaded
Comment 1 Patrick Jansky 2024-01-31 17:50:47 UTC
Created attachment 192299 [details]
Example file showing the incorrect behavior

An example file with the model
Comment 2 Rafael Lima 2024-01-31 19:23:41 UTC
I can confirm the issue.

When using lpsolve (LibreOffice Linear Solver) I get a message saying that the model is infeasible (which is expected).

However, with CoinMP I get a solution to the model:

X1 = 26666650000
X2 -13333324997
Z = 13333325003

Tested with

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 379968864c42f4bd99d874a4ce1949dd6eed45b8
CPU threads: 16; OS: Linux 6.5; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Calc: CL threaded
Comment 3 Patrick Jansky 2024-02-01 08:52:09 UTC
I just got the 24.02 update and tested it again. I now also get 
X1 = 26666650000
X2 -13333324997
Z = 13333325003

Version: 24.2.0.3 (X86_64) / LibreOffice Community
Build ID: da48488a73ddd66ea24cf16bbc4f7b9c08e9bea1
CPU threads: 8; OS: Linux 6.6; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Flatpak
Calc: threaded