1

I noticed that OpenSolver and Solver tend to give different solutions. For example, in the example file provided by this website, OpenSolver gives an answer of X=0 and Y=60, whereas Solver's is X=10 and Y=45. Any idea why is this so? Which one should I trust?

(edit) The file is essentially modeling the problem below:

Maximize: 30X+20Y

Subject to:
5X+2Y <= 140
3X+2Y <= 120
X,Y >= 0

will
  • 121
  • 5
  • Questions should be self containing, please include core description of the example so that people can reproduce it without downloading the file. – Máté Juhász Oct 25 '17 at 09:21

2 Answers2

1

Linear equation systems like your one may have multiple solutions.

Both types of solver uses kinds of approximation algorithms to find a solution, not analytic methods to solve your equations, this means:

  • in case of multiple optimal output, selection of them depends on initial parameters too (starting Excel's solver with x=0, y=0 will stay there, won't change to 10, 45)
  • These algorithms can be implemented differently, they may find different results

Which one should I trust?

Always check the output, if both are within criteria and results the same final output, then both can be correct.


If you want to get a definite answer, you need to use a proper tool, e.g. Wolfram Alpha:

enter image description here

Máté Juhász
  • 21,403
  • 6
  • 54
  • 73
0

Both of these Excel solutions satisfy the constraints, and have the same objective value, and so both are correct.

Andrew
  • 1
  • 1
    This reads like a comment on the existing answer rather than an answer in its own right. It would be better to explain *why* both solutions are correct rather than that they just are. See the existing answer for an example of how this should be written. – Mokubai Mar 01 '18 at 07:43