Sub topic 11
Reading Solver results, messages, and reports
This chapter assumes you can already set up a Solver model with an objective cell, variable cells, and constraints. It also assumes you know the three solving methods by name: GRG Nonlinear, Simplex LP, and Evolutionary. Here you learn what to do after you click Solve: read the status message, decide whether to keep the answer, and use the reports to learn which constraints matter.
The running example
Every figure in this chapter comes from one product-mix model. It maximizes profit of 20 per unit of product x and 30 per unit of product y. Machine hours are limited to 100, with 2 hours per unit of x and 4 per unit of y. Total units are capped at 40.
| Item | Value |
|---|---|
| Optimal x | 30 |
| Optimal y | 10 |
| Profit | 900 |
| Machine hours used | 2(30) + 4(10) = 100 of 100 |
| Units made | 30 + 10 = 40 of 40 |
Both constraints are used up completely at the optimum. That fact drives most of what the reports show.
The Solver Results dialog
When Solver stops, it shows a dialog with a message and three choices:
- Keep Solver Solution writes the final variable values into your sheet.
- Restore Original Values puts back what you had before.
- Return to Solver Parameters Dialog lets you change settings and run again.
The dialog also lists the reports you can generate and has a Save Scenario button. Select the reports before you click OK, because Solver can only build them from the run it just finished.
Do not click Keep by reflex. Read the message first. Some messages mean the numbers on your sheet are not a solution at all.
Status messages and what to do
The message tells you why Solver stopped. It is not a grade on your model.
| Message (abridged) | What it means | What to do |
|---|---|---|
| Solver found a solution. All constraints and optimality conditions are satisfied. | A feasible point that meets the method's optimality test. | Keep it, then verify. |
| Solver has converged to the current solution. All constraints are satisfied. | GRG Nonlinear saw almost no change in the objective over the last several iterations. | Treat it as a probable local optimum. Rerun from another start. |
| Solver cannot improve the current solution. All constraints are satisfied. | Feasible, but Solver cannot make progress at the current precision. | Check scaling and precision. Try a different start. |
| Solver could not find a feasible solution. | No point met every constraint. | Look for conflicting constraints or an input that contradicts them. |
| The Set Objective Cell values do not converge. | The objective can improve without limit. | A constraint is missing, usually an upper bound. |
| The linearity conditions required by this LP Solver are not satisfied. | You chose Simplex LP, but the model is not linear. | Switch to GRG Nonlinear or fix the formula. |
| Solver encountered an error value in the objective cell or a constraint cell. | A formula returned #DIV/0!, #NUM!, or similar. | Fix the formula or bound the variable away from the bad region. |
| Stop chosen when the maximum iteration limit was reached. | Solver ran out of iterations or time. | Raise the limit or give a better starting point. |
Why "found a solution" and "converged" differ
With Simplex LP, "found a solution" is a proof. A linear problem has no local optima that are not also global, so the answer is the best one.
With GRG Nonlinear, the same message only says that a local optimality test was met. Solver may have settled in a valley that is not the lowest one. Treat a GRG result as a candidate until you test it.
A reading workflow
The diagram shows the order of checks.
The Answer Report
The Answer Report is the first report to read. It has three tables.
- Objective Cell shows the original value and the final value. For our model, profit goes from whatever your starting guess produced to 900.
- Variable Cells shows each variable's original and final value, and whether it was constrained to an integer.
- Constraints shows, for each constraint, the cell value, the formula, a status, and the slack.
The status is either Binding or Not Binding. A binding constraint holds with equality at the solution. Slack is the remaining room on a non-binding constraint.
| Constraint | Cell value | Status | Slack |
|---|---|---|---|
| Machine hours ≤ 100 | 100 | Binding | 0 |
| Total units ≤ 40 | 40 | Binding | 0 |
| x ≥ 0 | 30 | Not Binding | 30 |
| y ≥ 0 | 10 | Not Binding | 10 |
Use the table to ask whether the answer matches business sense. If a constraint you expected to limit the plan has large slack, it is not driving the result. If a variable sits exactly on a bound you added "just in case", that bound is making the decision.
The Sensitivity Report
The Sensitivity Report is available for models without integer constraints, and its columns depend on the method. For a linear model, it reports the following.
Variable cells:
- Reduced Cost is how much the objective changes per unit if you force a variable that is currently zero to enter the plan. Both variables here are positive, so the reduced cost is 0.
- Objective Coefficient is the current per-unit profit.
- Allowable Increase / Decrease is how far that coefficient can move before the optimal plan changes.
Constraints:
- Final Value is the amount used.
- Shadow Price is the change in the objective per extra unit of the constraint's right-hand side.
- Constraint R.H.S. is the limit.
- Allowable Increase / Decrease is how far the limit can move while the shadow price stays valid.
For our model, the numbers can be derived by hand, which makes them a good check:
| Constraint | Shadow price | Limit | Valid range of limit |
|---|---|---|---|
| Machine hours | 5 | 100 | 80 to 160 |
| Total units | 10 | 40 | 25 to 50 |
One extra machine hour is worth 5 of profit, up to 160 hours. One extra unit of capacity is worth 10, up to 50 units. A manager can use this to price overtime or a demand-cap increase.
The objective coefficient ranges follow from the same geometry. The profit of x can range from 15 to 30, and the profit of y from 20 to 40, without changing the optimal mix.
For GRG Nonlinear models, the report shows Reduced Gradient and Lagrange Multiplier instead. The Lagrange multiplier plays the role of the shadow price, but it is only a local estimate. It holds for very small changes.
The Limits Report
The Limits Report lists each variable's lowest and highest value that still keeps all constraints satisfied, with the other variables held at their final values. Like the Sensitivity Report, it is not offered when the model has integer constraints. It is most useful as a quick range of how much room each decision has. Treat it as a secondary report.
Verifying a result independently
Solver can return a result that is feasible but not best, or even a result produced by a modelling mistake. Before you rely on any answer, check it outside the Solver run.
- Recompute the objective by hand from the variable values.
- Substitute the values into every constraint.
- Rerun from a different starting point. For GRG, try two or three. Different answers mean the model has multiple local optima.
- Compare with a second tool.
This script reproduces the product-mix model with SciPy and prints the same quantities as the reports.
from scipy.optimize import linprog
c = [-20, -30] # maximize 20x + 30y by minimizing the negative
A_ub = [[2, 4], # machine hours per unit
[1, 1]] # units cap
b_ub = [100, 40]
res = linprog(c, A_ub=A_ub, b_ub=b_ub,
bounds=[(0, None), (0, None)], method="highs")
print("status:", res.status, res.message)
print("x, y:", res.x)
print("profit:", round(-res.fun, 6))
print("slack:", res.slack)
print("shadow prices:", [round(-m, 6) + 0.0 for m in res.ineqlin.marginals])You should see x = 30, y = 10, profit 900, zero slack on both constraints, and shadow prices of 5 and 10. If the Excel report and the script disagree, one model has a formula or constraint the other lacks.
Common reading mistakes
- Treating "converged" as "optimal". In GRG it only means progress stopped.
- Ignoring the Original Values. If Solver started from the final answer of a previous run, a poor start in the next run may be hidden.
- Trusting shadow prices out of range. Check the allowable increase and decrease first.
- Reading a binding constraint as a mistake. Binding constraints are normal. They are where the value sits.
- Skipping the check after changing assumptions. Solver's answer is only valid for the inputs on the sheet when it ran.
Exercise
In the product-mix model, the machine-hours shadow price is 5 and the allowable increase is 60 hours (limit 100). Your manager asks what an extra 30 machine hours is worth, and what an extra 90 hours is worth. What do you answer?
Show answer
An extra 30 hours stays inside the allowable increase, so it adds 30 × 5 = 150 to profit, taking it from 900 to 1050. An extra 90 hours exceeds the allowable increase of 60, so the shadow price of 5 no longer applies to all of it. You cannot say 450. You must change the limit to 190 and rerun Solver. (At 160 hours the plan changes, and beyond that the units cap alone limits profit.)
Exercise
Solver reports "Solver has converged to the current solution" on a nonlinear model. Name two checks you should perform before you keep the answer.
Show answer
First, rerun from at least one different starting point and compare the objective values, because GRG can stop at a local optimum. Second, substitute the variable values into every constraint and recompute the objective independently, for example with a script, to confirm the result is feasible and correct.
Exercise
Solver stops with "The Set Objective Cell values do not converge" when maximizing profit. What is the most likely cause, and what is the fix?
Show answer
The objective can increase without limit, which usually means a variable has no upper bound or a limiting constraint is missing. Add the constraint that reflects the real limit, such as capacity or demand, and rerun.