Gnumeric · Optimization · Advanced
Solve a Two-Product Optimization Problem in Gnumeric
Build a small linear programming model in Gnumeric Solver with two products, capacity constraints and a checkable optimal profit.
Official documentation reviewed; native application verification pending · Updated 10 October 2026 · Editorial standards
Gnumeric includes a linear programming Solver for choosing decision variables subject to constraints. This exercise uses intentionally small numbers so you can verify the optimum without trusting a black-box result.
The business problem
You make two products, X and Y. Each unit of X earns 30; each unit of Y earns 20. Two machines limit production:
- Machine A:
2X + Y ≤ 100 - Machine B:
X + 2Y ≤ 80 - Non-negativity:
X ≥ 0,Y ≥ 0
Maximize profit: 30X + 20Y.
Construct the worksheet
| Cell | Value or formula | Purpose |
|---|---|---|
B2 |
0 |
Units of X (decision variable) |
C2 |
0 |
Units of Y (decision variable) |
B4 |
=30*B2+20*C2 |
Profit to maximize |
B5 |
=2*B2+C2 |
Machine A usage; cap 100 |
B6 |
=B2+2*C2 |
Machine B usage; cap 80 |
Set up the Gnumeric Solver
- Open Tools → Solver, as described in the Gnumeric manual.
- Choose objective
B4, set the direction to maximize, and select variable cellsB2:C2. - Add
B5 ≤ 100andB6 ≤ 80, plus nonnegative bounds on B2 and C2. - Choose an appropriate linear model/solver method in your installation; availability of specific solvers or plug-ins can vary.
- Solve and compare the proposed optimum to the independent check below.
Independently verify the optimum
At the intersection of the binding constraints:
2X + Y = 100
X + 2Y = 80
Solving gives X = 40, Y = 20. Profit is 30×40 + 20×20 = 1,600. Both machine usages equal their limits. By comparison, making only X gives X≤50 and profit≤1,500; making only Y gives Y≤40 and profit≤800. These extreme points confirm the unique optimum of this small two-variable linear model.
If your answer differs, confirm you entered both machine limits, nonnegative variables, and the maximize direction.
Boundaries and cautions
This is a continuous linear model. If units must be whole numbers, add an integer constraint and check the solver’s integer-programming support. The chosen optimum happens to be integral, but other datasets may not be.
Related: Gnumeric Goal Seek adjusts only one cell to reach a formula target.
Verification: The candidate optimum was independently checked with a separate vertex enumeration. The Solver interface and algorithm availability await native verification.
Official documentation: Software manual or vendor release notes. This article is part of a staged content batch; confirm the interface and output in the stated software before public deployment.