Solvella

Solver

Prefer pictures? See the Solver step-by-step guide, including how to read the reports.

Solver finds the values of several cells that make one cell as big or as small as possible, or equal to a value, while keeping other cells within limits. If you've used Excel's Solver, the dialog will look familiar.

Setting up a model

  1. Set Objective: the cell to optimise, e.g. total profit in D10.
  2. To: Max, Min, or Value Of a number.
  3. By Changing Variable Cells: the cells Solver may change, e.g. B4:C4. Separate several ranges with commas.
  4. Subject to the Constraints: fill in the cell reference, the relation and the limit, then press Add. The relation can be <=, =, >=, int (whole numbers) or bin (0 or 1). A range on the left can be compared against a range of the same size, or a single number.
  5. Leave Make Unconstrained Variables Non-Negative ticked unless your variables can go below zero.
  6. Pick a method, tick the reports you want, press Solve.

Save model stores the whole setup in the spreadsheet (one model per sheet), so it's filled in next time you open the dialog. Anyone the spreadsheet is shared with will see it too.

Which method

MethodUse it when
Simplex LPThe objective and every constraint are sums of variable cells times constants: no products of variables, no IF, MAX, powers and so on. This is exact and fast, and is the only method that gives a full sensitivity report with ranges. Before solving, it checks the model really is linear, and tells you if it isn't.
GRG Nonlinear (Pro)The model is smooth but not linear: curve fitting, portfolio variance, pricing with demand curves. It finds a local optimum, so a different starting point can give a different answer. Set Multistart runs above 0 to try several random starts and keep the best.

Integer and binary constraints work with Simplex LP (Pro). Integer optimality % lets it stop once an answer is proven to be within that percent of the best possible, which can save a lot of time on big integer models. 0 means "find the true best".

Not supported yet: integer constraints with GRG Nonlinear, the Evolutionary method and the dif (all different) constraint.

Reports

Reports go on a new sheet, laid out like Excel's.

  • Answer report: objective and variable cells before and after, and each constraint's final value, whether it's binding, and the slack.
  • Sensitivity report (Pro). For Simplex LP: final values, reduced costs, objective coefficients with allowable increase and decrease, and constraints with shadow prices and allowable ranges. For GRG Nonlinear: final values, reduced gradients and Lagrange multipliers.

What the messages mean

MessageMeaning
Solver found a solution. All Constraints and optimality conditions are satisfied.Done. For Simplex LP this is the true best. For GRG it's a local best.
Solver has converged to the current solution. All Constraints are satisfied.GRG stopped making progress but everything's within limits. The answer is probably fine; try another start to be sure.
Solver could not find a feasible solution.No values satisfy all the constraints together. Look for a constraint pointing the wrong way.
The Objective Cell values do not converge.It can be made as large (or small) as you like. Usually a missing limit.
The linearity conditions required by this LP Solver are not satisfied.Switch to GRG Nonlinear, or rewrite the formulas.
Solver stopped at the time or iteration limit. The best solution found is shown.The best answer so far is kept. Raise Max time, simplify the model, or set an integer optimality %.

After solving, Restore Original Values puts the variable cells back.