Bug 80847 - Other: Solver does not allow "not equal to" operator limiting condition
Summary: Other: Solver does not allow "not equal to" operator limiting condition
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.4.2 release
Hardware: All Linux (All)
: lowest enhancement
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks: Solver
  Show dependency treegraph
 
Reported: 2014-07-03 11:24 UTC by crysman
Modified: 2022-01-19 12:36 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description crysman 2014-07-03 11:24:39 UTC
Problem description: 
It only allows you to select:
- less or equal
- equal
- more or equal
- "Integer"
- "Binary"
(see the attached screenshot)

Is there some problem with allowing "not equal"? I would need this condition in my task sheet :(

Steps to reproduce:
Menu -> Tools -> Solver ...> Limiting conditions

I reported this on launchpad:
https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1336763
, but they redirected me here, so here I am :)  
Operating System: Linux (Other)
Version: 4.2.4.2 release
Comment 1 Todor Balabanov 2019-05-01 22:02:36 UTC
Non-linear solvers are pretty complicated and that is why the interface is simplified. Not equal condition can be implemented in the model with the usage of IF and NOT functions. Yes, it requires a little bit more efforts in building of the model, but the final goal can be achieved.
Comment 2 Rafael Lima 2022-01-19 12:36:49 UTC
> Is there some problem with allowing "not equal"? I would need this condition
> in my task sheet :(

Linear and non-linear solvers only work with "=", "<=" and ">=" operators. The explanation is a bit complicated, but it comes from the standard representation of mathematical programming models.

For instance, Excel solver, OpenSolver for Excel and professional solvers as Gurobi only accept constraints of "=", "<=" and ">=" types.

Mathematically you can approximate "<>" constraints adapting your model using the explanation in [1] given by Kuifje, but you'd have first to estimate M. So it is not trivial.

[1] https://math.stackexchange.com/questions/37075/how-can-not-equals-be-expressed-as-an-inequality-for-a-linear-programming-model/1517850

Closing this as NOTABUG.