Bug 141196 - Non-linear solver ignores conditions
Summary: Non-linear solver ignores conditions
Status: NEEDINFO
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.4.6.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Solver
  Show dependency treegraph
 
Reported: 2021-03-23 11:52 UTC by piotr
Modified: 2022-05-13 11:05 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
File showing entered values in the spreadsheet. (10.25 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-03-23 11:52 UTC, piotr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description piotr 2021-03-23 11:52:33 UTC
Created attachment 170656 [details]
File showing entered values in the spreadsheet.

I created a very simple non-linear problem (file is attached). 

Having a few values
16
10
11
10
1
20
1

the goal is to maximize the sum of above values to the power of 2:
=SUMPRODUCT(B2:B8,B2:B8)

on the condition the sum of those values is not greater than 69 and these are non-negative integers. 

Linear solver can't do it. Both given NL solvers (Swarm Differential Evolution and Particle Swarm) ignore the condition and the solutions are very large 10^+18 values.
Comment 1 Jean-Baptiste Faure 2021-08-11 20:59:26 UTC
Not reproducible for me with LO 7.2.1.0+ built at home under Ubuntu 20.04 x86-64.

Non-linear solvers converge toward 69*69 = 4761 with one value set to almost 69 and the others set to almost zero.
Experimental swarm algorithm does not work on this case, but DEPS ans SCO evolutionary algorithms works well.

Best regards. JBF
Comment 2 Buovjaga 2022-05-13 11:05:09 UTC
Can you please give step by step instructions on what we should do with the file, so people with no experience with solvers can test it?

Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the steps.