Insight

Which rules can bend?

Every optimization model draws a line between what must be true and what would be preferable. That distinction shapes every answer.

A workforce planner has two requirements: every operating shift must have a qualified supervisor, and employees should receive their preferred days off when possible. The two sentences sound similar in a planning meeting. They have very different mathematical meanings.

One determines which schedules are valid. The other helps distinguish better schedules from merely acceptable ones.

An optimization constraint is a rule that a proposed solution must satisfy. If a truck can carry at most ten tonnes, the loaded weight cannot exceed ten tonnes. If a machine cannot process two jobs at once, their processing intervals cannot overlap. If a regulation requires a rest period between shifts, the roster must respect it.

Together, constraints define the feasible region: all decisions that comply with the model. The solver searches within that region for a good value of the objective.

Physical limits and business commitments

Some rules come from physics. A container has a volume. A battery has a capacity. A component must be manufactured before assembly begins. Others are commitments the organization chooses to enforce, such as promised delivery windows, staffing standards or minimum service coverage.

Both may be hard constraints if neither can be breached in an acceptable plan. Calling a rule hard describes how the model treats it, not whether the rule originated in nature or in a policy meeting.

A requirement can also have degrees of flexibility. A preferred shift pattern may be changed with consent. A delivery window may permit a late arrival at a known cost. A production target may be aspirational rather than contractual. Such preferences are often modeled through scores or explicit violation variables rather than absolute restrictions.

The real question behind a penalty

Suppose a company wants to discourage late deliveries. One approach is to allow lateness but attach a cost to every minute. A ten-minute delay might then cost twice as much in the objective as a five-minute delay. That is an intentional policy, not a mathematical fact.

Other policies behave differently. The first late minute may incur a fixed service penalty. Delays past an hour may be much worse. A critical medical delivery may never be allowed to arrive late at all. Each interpretation changes which solutions look attractive.

A soft requirement is useful when a violation is genuinely possible and its consequences can be represented or compared. It does not make every business rule negotiable. Choosing an excessively small penalty for a safety condition would simply write the wrong business policy into the mathematics.

When a model has no valid answer

Hard constraints can conflict. Perhaps there are not enough qualified workers to cover every shift under the requested rules. A solver reporting that no feasible schedule exists can be telling the organization something important: its requirements cannot all be satisfied with the available resources.

The response is not automatically to weaken the rules. It may be to add capacity, revise a deadline, change a discretionary policy or inspect the data. Sometimes a carefully controlled relaxation analysis helps reveal which constraints are creating the conflict and what an alternative would cost. The original policy still needs to be respected when the result is used.

The most productive modeling discussion often begins with four words: must, cannot, prefer, avoid. Turning them into precise rules is one of the main ways optimization makes operational decisions clearer.