After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 64017 - solver ignores constraints
solver ignores constraints
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: Analytics
git master
Other Linux
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2001-11-08 01:28 UTC by Andreas J. Guelzow
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Andreas J. Guelzow 2001-11-08 01:28:57 UTC
If we open the file samples/solver/afiro.mps 
select the solver and ask to solve the problem (with the pre-entered
constraints) the found optimal solution does not satisfy the constraints!

If we enter the constraints new (use area comparison such as AH11:AH12 =
AJ11:AH12) and select solving a corect solution is found.

NOte: in the code the constraints are loades in to sheet.solver_parameters
when the file is loaded. When the solver is opened these constraints are
translated, on okay they are translated back into sheet.solver_parameters
and then used. THe problem also occurs if the translation is disabled, i.e
it shouldn't be a translation problem.
Comment 1 Andreas J. Guelzow 2002-01-30 20:10:06 UTC
This doesn't seem to have anything to do with mps. Reentering the same
constraints in the same form has the same faulty result.

jacksonje@health.missouri.edu has submitted a much simpler example to
the gnumeric list:

Solver Settings----
Set Target Cell: D6
Equal To: Max
By Changing Cells: B3:C3
Assume Linear Model: selected but grayed out
Assume Non-negative: selected
Subject to the Constraints: D8:D10 <= E8:E10

Spreadsheet-------------------
D6: =sumproduct(B3:C3, B4:C4)
B3: 0    C3:  0    
B4:  7   C4:  4
B8:  20  C8:  4    D8:  =sumproduct($B$3:$C$3, B8:C8)    E8:  8000
B9:  8   C9:  5    D9:  =sumproduct($B$3:$C$3, B9:C9)    E9:  10000
B10: 4   C10: 4    D10: =sumproduct($B$3:$C$3, B10:C10)  E10: 4000

After running solver---------------
B3:  4.38e+08  C3: 1e+282
D6:  4e+282
D8:  4e+282
D9:  5e+282
D10: 4e+282

D8:D10 is definitely much greater than the 8000,10000, and 4000 defined =

Comment 2 Andreas J. Guelzow 2002-03-06 21:22:30 UTC
We seem to be getting closer thanks to Jukka-Pekka the second example
now yields correct answers and the first example is now close. We
overshoot the constraints by up to 5e-15. 
Comment 3 Morten Welinder 2002-04-18 18:26:08 UTC
This appears to be fixed now.