GNOME Bugzilla – Bug 64017
solver ignores constraints
Last modified: 2004-12-22 21:47:04 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.
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 =
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.
This appears to be fixed now.