Excel 2016 for Mac Solver horrible bug (example posted)

Anonymous
2016-09-15T02:47:48+00:00

Ok first of all I discovered that Microsoft does not want to know its products have bugs. There is no way to report an Excel bug. I'm aware of connect.microsoft.com but no Office or Excel channel exists there. The question "how do I report an Excel bug" is floating all over the internet with no answer.

Solver in Excel 2016 for Mac is completely broken. It sometimes says a linear program is infeasible while on a PC Solver finds the optimal solution in a blink of an eye. It sometimes says an optimal solution is found yet even some constraints are being violated. This has been happening since the preview version to the latest update today on 9/14. I have a file at hand that if solved in Excel for Mac, Solver says it's infeasible, yet on a PC it will happily solve the problem. Again Microsoft doesn't want to listen to complaints so I can't even post that file to this thread.

If anyone from MS is reading this, it's time to abandon the ship.

========

EDIT: ANYONE FROM MS READING THIS? DO YOUR JOB AND AT LEAST CONTACT ME! LOOK AT THE PROGRAM SOLVED CORRECTLY ON A PC YET INFEASIBLE OR OUTRIGHT WRONG ON A MAC! SHAME ON YOU FOR SHIPPING SUCH BUGGY SOFTWARE AND IGNORING BUG REPORTS!

https://www.dropbox.com/s/dsmfbxdk6lquk0u/FEMA.xlsx?dl=0

ON PC

ON MAC 1

ON MAC 2

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
Anonymous
2016-11-17T00:43:32+00:00

Good news! We fixed some issues with Solver to address reports of incorrect results that were being generated on Excel for Mac. The fix is available in build 15.28 (161025) or later. Please update your Office and let us know if you continue to encounter any issues.

Freya

Office Newsroom

Was this answer helpful?

7 people found this answer helpful.
0 comments No comments
Answer accepted by question author
Anonymous
2017-01-21T17:23:13+00:00

Yes, I used the Mac to arrive at the conclusion that your model does not have 1 optimal solution!

Notice that "Super  Gas" and "Crude 3" can slide along 0-500, and "Reg Gas" can slide along 3500-4000 (inversely, with changes to the other mix).   All at Optimal value of: 375,000

I am not an expert, so here are just my observations.

Solver for Windows has been around for a long time, and Solver for Mac is rather "new"

In Solver models, and Op research as well, it is never good programming practice to place functions on the Right-Hand-Side  (RHS)

Solver for Windows has improved a lot over the years.  The program use to give up very quickly at the first sign of confusion.  It's been a lot better the last 2 or so revisions.

As my guess, the reason for the Mac confusion is that Solver is using "Finite Differences" to calculate a derivative to make its best guess to the RHS.   When it uses the new values, the RHS has jumped and changed values.  It then repeats the process.  The RHS target is always moving.  It's a dog chasing it's tail.   Solver for Mac, my belief, is that there is not enough logic in the program yet to reduce the confusion.  It will quit easily, and just go back to its initial starting values by default.  (Your all 0's)

It was apparent to me how to fix your Mac Model.

You have 3 constraints <= 5000.   The 5000 is fixed, so we can leave that alone.

You have 7 other constraints entered using 2 constraints into Solver.

The 7th constraint is ok, but we will change that to be consistent.

The quickest solution for your model is to delete the 3 ">=" and 4 "<=" constraints.

Go ahead and keep your constraint area for readability, but we will not use it.

Make another column for constraints.   My preference is to use F(x) >= 0, so that's what I'll use here.

For your first 3 constraints, we will use the formulas you have, but make it:

= LHS - RHS

For the last 4, we will use

= RHS - LHS.

So now, we will enter just 1 constraint for all 7.

New 7 >= 0

Because the model is written slightly better, Mac Solver won't get confused and quit.

I quickly get the "other valid solution"

One "could argue" that the Mac solution is slightly better, although they are equal.

Mac is suggesting making 5 items instead of 6.

So, we are saving wear and tear of making a 6th item (super gas/ crude3)

There is also more man-power setting up a 6th manufacturing item.

You also may have higher shipping costs for shipping a 6th item at the low 500 volumn.

Perhaps save money by shipping 1 item at 4000 volumn.   Etc.

Just for education, your model looked good to test the "Math" differences based on the inefficient model.

You have 1 columns of Sumproduct(), and another column of using "SUM"

I might have removed all 14 cells, and  just used 7.  Here's how I would have written the 7 constraints.

It's basically the same math:

=SUMPRODUCT((B12:D12),(H4:J4)-10)

=SUMPRODUCT((B13:D13),(H4:J4)-8)

=SUMPRODUCT((B14:D14),(H4:J4)-6)

=SUMPRODUCT(B12:D12,1-(H5:J5))

=SUMPRODUCT(B13:D13,2-(H5:J5))

=SUMPRODUCT(B14:D14,1-(H5:J5))

=D28-B28

I would have used 1 constraint:

All7  >= 0

When I do it this way on the Windows version, I get the same solution as the Mac because the Excel math is a little different.

Anyway, I hope this helps.

= = = = =

HTH   :>)

Dana

Was this answer helpful?

0 comments No comments

49 additional answers

Sort by: Oldest
  1. Anonymous
    2017-01-21T07:32:13+00:00

    Hi.  If I didn't make a mistake here, just to let you know:

    Solver for Windows:

    2666.666667 333.3333333 500
    2333.333333 4666.666667 3500
    0 0 0

    Solver for Mac with starting values of 0

    Same 375,000 and all constraints satisfied.

    2333.333333 1166.666667 0
    2666.666667 3833.333333 4000
    0 0 0

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2017-01-21T14:50:46+00:00

    Hi Dana,

    Thanks for the reply. I just had a number of other people solve this under Mac, and they are all getting zeros when starting with zeros (under Mac). Are you using Excel 2016 for Mac?

      Dan

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2017-01-25T03:49:36+00:00

    Hi Dana,

    Sorry about the slow reply. First off, thank you for spending time on this issue! As it turns out, you are right in that rewriting the LP to have constants in the right-hand side does return the optimal value. But this is not really a fix for the underlying problem, which is that Solver should really be returning the optimal value for an LP *irrespective of how the constraints are written*. In other words, as long as we're dealing with a linear program solver through Simplex, there should be no ambiguity about whether we're getting the optimal value... 

    I added some quick replies to your other comments below. But my main take-away from this experience -- and from having taught the first class today where a lot of students were running Solver in Excel 2016 for Mac -- is that it is *completely unreliable*. It is a real pity what Microsoft has chosen to do with Solver, and not just on Mac! There are actually serious bugs under the Windows version as well, dating back to the time when Frontline used to manage it, particularly around linearity testing and parsing nonlinear expressions (I can give you more details if you are curious). At this point, I will probably be recommending all my students to just directly install OpenSolver, since they need something more powerful for projects, anyway.

    Thanks again for spending time on this!

      Dan

    Yes, I used the Mac to arrive at the conclusion that your model does not have 1 optimal solution!

    Notice that "Super  Gas" and "Crude 3" can slide along 0-500, and "Reg Gas" can slide along 3500-4000 (inversely, with changes to the other mix).   All at Optimal value of: 375,000

    I am not an expert, so here are just my observations.

    Solver for Windows has been around for a long time, and Solver for Mac is rather "new"

    In Solver models, and Op research as well, it is never good programming practice to place functions on the Right-Hand-Side  (RHS)

    I very much agree with your comment from a "good practice" perspective. I actually also recommend my students to have the right-hand sides as parameters in the model, which makes it a bit easier to interpret sensitivity reports. But from the standpoint of solving the model, it should make absolutely zero difference how one writes the constraint -- everything on the left, everything on the right, some terms on the left and some on the right... Any serious parser would transform the problem into a standard form anyway before calling the Simplex algorithm, so this should be a non-issue. And that used to be a non-issue with older versions of Solver before Excel 2015/6 for Mac.

    Solver for Windows has improved a lot over the years.  The program use to give up very quickly at the first sign of confusion.  It's been a lot better the last 2 or so revisions.

    Pehaps... I have been using it for about 9 years now (primarily in teaching, never in research), and I have not noticed major improvements. But I could be mistaken, since I was not really pushing its limits in any way. But are you referring to using the Simplex algorithm or using GRG Nonlinear?  Again, there really shouldn't be much "confusion" with Simplex. If the problem is linear, you are guaranteed to have a global optimum, so a properly implemented Simplex routine should work just fine.

    As my guess, the reason for the Mac confusion is that Solver is using "Finite Differences" to calculate a derivative to make its best guess to the RHS.   When it uses the new values, the RHS has jumped and changed values.  It then repeats the process.  The RHS target is always moving.  It's a dog chasing it's tail.   Solver for Mac, my belief, is that there is not enough logic in the program yet to reduce the confusion.  It will quit easily, and just go back to its initial starting values by default.  (Your all 0's)

    Well, the Simplex algorithm does not actually rely on any finite differences (or derivatives...) The basic operations are essentially matrix multiplications and inversions, so I doubt that what you are saying is the root cause for the problems. But then again, I am also left guessing as to exactly what Microsoft (or Frontline for that matter) actually bothered to implement under the hood.

    It was apparent to me how to fix your Mac Model.

    You have 3 constraints <= 5000.   The 5000 is fixed, so we can leave that alone.

    You have 7 other constraints entered using 2 constraints into Solver.

    The 7th constraint is ok, but we will change that to be consistent.

    The quickest solution for your model is to delete the 3 ">=" and 4 "<=" constraints.

    Go ahead and keep your constraint area for readability, but we will not use it.

    Make another column for constraints.   My preference is to use F(x) >= 0, so that's what I'll use here.

    For your first 3 constraints, we will use the formulas you have, but make it:

    = LHS - RHS

    For the last 4, we will use

    = RHS - LHS.

    So now, we will enter just 1 constraint for all 7.

    New 7 >= 0

    Because the model is written slightly better, Mac Solver won't get confused and quit.

    I quickly get the "other valid solution"

    That was a nice guess / finding! I actually did not spend time trying to figure out how to make it work, simply because it *should have* worked in the first place...

    One "could argue" that the Mac solution is slightly better, although they are equal.

    Mac is suggesting making 5 items instead of 6.

    So, we are saving wear and tear of making a 6th item (super gas/ crude3)

    There is also more man-power setting up a 6th manufacturing item.

    You also may have higher shipping costs for shipping a 6th item at the low 500 volumn.

    Perhaps save money by shipping 1 item at 4000 volumn.   Etc.

    Just for education, your model looked good to test the "Math" differences based on the inefficient model.

    You have 1 columns of Sumproduct(), and another column of using "SUM"

    I might have removed all 14 cells, and  just used 7.  Here's how I would have written the 7 constraints.

    It's basically the same math:

    =SUMPRODUCT((B12:D12),(H4:J4)-10)

    =SUMPRODUCT((B13:D13),(H4:J4)-8)

    =SUMPRODUCT((B14:D14),(H4:J4)-6)

    =SUMPRODUCT(B12:D12,1-(H5:J5))

    =SUMPRODUCT(B13:D13,2-(H5:J5))

    =SUMPRODUCT(B14:D14,1-(H5:J5))

    =D28-B28

    I would have used 1 constraint:

    All7  >= 0

    When I do it this way on the Windows version, I get the same solution as the Mac because the Excel math is a little different.

    I think the problem is indeed degenerate, i.e., there are multiple optimal solutions. One could argue what constitutes a "better" formulation (fewer variables / constraints, etc etc), but the key problem here is that if Solver actually had a proper parser -- i.e., something that reads the model and reformulates the problem before passing it to the actual algorithm -- then none of these issues should exist. And certainly they should not exist for the kind of toy model that was implemented in that spreadsheet...

    Anyway, I hope this helps.

    = = = = =

    HTH   :>)

    Dana

    It does help. Thanks again.

    >> I am not an expert, so here are just my observations.

    >> Solver for Windows has been around for a long time, and Solver for Mac is rather "new"

    >> In Solver models, and Op research as well, it is never good programming practice to place functions on the Right-Hand-Side  (RHS)

    >> Solver for Windows has improved a lot over the years.  The program use to give up very quickly at the first sign of confusion.  It's been a lot better the last 2 or so revisions.

    >> As my guess, the reason for the Mac confusion is that Solver is using "Finite Differences" to calculate a derivative to make its best guess to the RHS.   When it uses the new values, the RHS has jumped and changed values.  It then repeats the process.  The RHS target is always moving.  It's a dog chasing it's tail.   Solver for Mac, my belief, is that there is not enough logic in the program yet to reduce the confusion.  It will quit easily, and just go back to its initial starting values by default.  (Your all 0's)

    >> It was apparent to me how to fix your Mac Model.

    >> One "could argue" that the Mac solution is slightly better, although they are equal [...]

    Was this answer helpful?

    0 comments No comments