Write every constraint in operational terms
Return to the Harbor scheduling file: routine jobs x use two hours and contribute 80 each; complex jobs y use three hours and contribute 150. Usable hours are twelve, demand ceilings are x≤4 and y≤3, and both counts are nonnegative integers. The objective is 80x+150y. A resource constraint and a demand ceiling answer different questions; increasing available hours does not manufacture additional customers.
Because only twenty possible pairs satisfy the two demand bounds before the hours test, the laboratory can enumerate them all. Reject any pair exceeding twelve hours, compute contribution for the remaining pairs and compare every feasible score. The unique optimum is x=3, y=2, using twelve hours and contributing 540. This direct method is practical for the small teaching case and provides a transparent independent check.
Larger real problems can require an appropriate solver, but the model still needs verified input units, bounds, objective signs and variable types. A maximization translated into minimization reverses objective coefficients; it does not reverse resource inequalities. Solver success means it solved its supplied problem under its algorithmic tolerances, not that the problem matches operations.
A fractional solution can be a bound rather than a plan
If jobs could be divided continuously, complex contribution per hour is fifty while routine contribution per hour is forty. Fill three complex jobs first, consuming nine hours, then use the remaining three hours for one and a half routine jobs. The continuous relaxation gives x=1.5, y=3 and contribution 570. Every integer-feasible schedule is feasible in that relaxation, so 570 is an upper bound on the integer optimum under these same constraints.
Rounding down produces x=1, y=3 and contribution 530, which is feasible but inferior to x=3, y=2 at 540. Rounding x upward to two while retaining three complex jobs uses thirteen hours and violates capacity. Rounding is therefore neither an optimality proof nor automatically feasible.
The relaxation gap is thirty in this file. It does not mean that a real half-job can be scheduled or that the firm has lost thirty through poor management. Indivisibility is part of the problem. If jobs can genuinely be split across periods, add completion, carryover and timing rules rather than simply deleting integrality.
Value the actual capacity increment
With thirteen usable hours and unchanged demand ceilings, x=2, y=3 gives contribution 610 and is the integer optimum. One extra hour therefore improves achievable contribution by seventy compared with the original 540. With fourteen hours, x=4, y=2 gives 620, so two extra hours improve the original by eighty. The second extra hour adds only ten relative to the thirteen-hour optimum.
These uneven increments arise from discrete job combinations. Multiplying one hour's seventy value by two would overstate the two-hour benefit. A continuous shadow price is a local statement within its validity range and may not price an integer capacity package correctly. Compare the actual feasible objectives for the package under consideration.
If the two-hour package costs ninety in new incremental expense, net contribution is 620-90=530, below the original 540. Reject it under this isolated objective. If the one-hour package costs fifty, net is 610-50=560, improving by twenty. Availability, service quality, timing and any legal working-hour constraints need actual evidence before a real schedule can be adopted; the fictional hours are not employment rules.
Sensitivity asks what would reverse the recommendation
Let complex-job contribution be c while other inputs remain fixed. Compare x=3, y=2 with x=1, y=3: their objectives are 240+2c and 80+3c. They tie at c=160. At c=150 the first is better; at c=170 the second gives 590 versus 580. Full feasible enumeration still checks whether a third schedule overtakes them under another value.
If a supposedly available twelve hours is reduced by travel, or callbacks change job duration, re-solve the complete model. A favorable coefficient adjustment cannot excuse an infeasible schedule. Uncertainty in demand ceilings may require scenarios or a recourse model instead of treating a forecast mean as a guaranteed bound.
Use the full current on-site investment and optimization methods for complete alternative comparisons and formulation; source links remain optional provenance. The standard-library laboratory needs no external solver. Optional exercises examine rounding, capacity packages and changed contributions. A decision memo should report the feasible plan, the baseline, the model boundary and the parameter that could change the action.
Worked example: Enumeration avoids misleading rounding
The continuous solution (1.5, 3) scores 570. Rounding down scores 530, rounding up violates hours, and complete integer enumeration finds (3, 2) scoring 540.
Worked example: Discrete capacity value is not a constant hourly quote
At capacities twelve, thirteen and fourteen, optimal scores are 540, 610 and 620. The first additional hour is worth seventy, the next ten; a two-hour package costing ninety leaves only 530.