Give Calc Solver Whole-Number and Capacity Constraints Before Trusting Its Answer
A spreadsheet optimiser can produce an unusable answer when the model permits things the real task forbids. A quantity of two-and-a-half sealed boxes may satisfy an equation, but it cannot be packed as two-and-a-half intact boxes. Define the allowed quantities before judging the result.
Use a separate model copy for the exercise. Identify the output being optimised, the cells Solver may change, and every operational limit. Keep ordinary calculated totals outside the changing-cell range.
Express the limits in the model
Consider fictional parcels of two types. Each small parcel occupies two shelf units and each large parcel occupies three. The shelf holds seven units, and the aim is to maximise the number of parcels. The decision cells are the counts of small and large parcels; separate formulas calculate total parcels and occupied shelf units.
Open Tools, Solver. Select the total-parcels formula as the target, choose a maximum, and identify the two count cells as the variables. Add constraints for nonnegative counts, integer counts, and occupied shelf units no greater than seven.
LibreOffice supports several conditions for the same variable. Its Integer operator restricts a quantity to whole numbers; Binary restricts a decision to zero or one. Binary would be appropriate for an individual yes-or-no selection, not a general stock count.
Choose an available solver algorithm appropriate to the model. Record that choice and the constraints with the workbook rather than relying on a screenshot of the final number alone.
Check feasibility independently
For this small example, three small parcels fit and four do not. Two small plus one large also fit. A result of three parcels is therefore plausible, but the composition need not be unique.
Read every returned count and recompute occupied space. Check the constraints individually before accepting the result. If the model reports no suitable solution, examine conflicting limits and cell references rather than deleting constraints merely to obtain an answer.
For a larger real model, have its assumptions reviewed by someone who understands the work. A successful solver message concerns the supplied mathematical problem. It cannot detect an omitted staffing rule, an unavailable item or a mislabelled unit that never appeared in the constraints.
Reference: LibreOffice documentation.