Skip to content

Multi-objective Optimization and Soft Constraints ​

Many decisions have more than one legitimate measure of quality. A delivery plan may reduce operating cost by arriving later; a production plan may protect service quality while using more capacity. Multi-objective optimization makes that policy explicit instead of hiding it in an unexplained scalar score.

This page uses a delivery-delay and operating-cost example to distinguish hard constraints from soft violations, weighted sums from lexicographic priorities, and business tolerances from numerical solver tolerances. The equations are solver-neutral; they do not prescribe a particular OSPF or backend API.

1. Hard rules, soft rules, and objective dimensions ​

Let X be the set defined by the hard rules. A hard rule is part of feasibility: a plan outside X is not a candidate, even if it would score well elsewhere. Examples include serving each order exactly once, respecting vehicle capacity, and obeying a legal working-time limit.

A soft rule is measured rather than required. If g(x)≤b is a soft upper bound, its non-negative violation is

v(x)=max{0,g(x)−b}.

For a soft lower bound g(x)≥b and a soft equality g(x)=b, use

v(x)=max{0,b−g(x)},v(x)=|g(x)−b|,

respectively. The unit of v is inherited from g: a delivery delay is measured in days or hours, while a budget violation is measured in dollars. A solver feasibility tolerance is not a business violation measure.

After the hard rules define X, an objective vector might be

f(x)=(f1(x),f2(x),…,fK(x)),

where each component has a direction, unit, and policy meaning. For minimization, x Pareto-dominates x′ when it is no worse in every component and strictly better in at least one. A weighted sum selects one point according to an exchange-rate policy; a lexicographic objective declares an order of importance.

2. Weighted sums and lexicographic order ​

2.1 Weighted sum ​

For minimization criteria with non-negative weights,

Fw(x)=∑k=1Kwkf¯k(x),

where f¯k should be dimensionless or explicitly converted to a common business unit. A useful normalization is

f¯k(x)=fk(x)−ℓkuk−ℓk,

using declared lower and upper reference values ℓk,uk with uk>ℓk. Handle constant criteria separately rather than dividing by zero. A weight is meaningful only relative to that normalization. Adding days + dollars without a conversion silently assigns an arbitrary exchange rate.

Weighted sums are useful when trade-offs are genuinely compensatory. They can also miss unsupported points of a non-convex Pareto frontier and can accept a large violation of one soft rule when another term has a sufficiently favorable weight.

2.2 Lexicographic objective ​

For two minimization criteria, lexicographic minimization of (f1,f2) means:

  1. find the smallest attainable f1;
  2. among solutions attaining that value, find the smallest f2.

The first criterion is not traded for an improvement in the second. This is appropriate when any one day of delay is more important than any permitted cost saving, or when a regulatory rule must be optimized before a secondary preference.

A single scalar can reproduce a lexicographic policy only when objective ranges and attainable resolution are known. If f1 has minimum separation δ1>0 and the possible variation of f2 is at most Δ2, choose:

M>Δ2δ1

and minimize Mf1+f2. Without a positive resolution or a finite secondary bound, a guessed large weight is not a proof of lexicographic behavior.

2.3 Tolerance around a priority level ​

Sometimes the first criterion may be relaxed slightly for a better second criterion. Let f1∗ be the proven optimum of the first level and let ε1 be a business tolerance in the same unit as f1. The second level may then be solved subject to

f1(x)≤f1∗+ε1

for minimization. This is a policy tolerance, not a floating-point feasibility tolerance. State whether it is absolute or relative, and keep its unit in the result evidence.

3. Worked example: delivery delay versus route cost ​

3.1 Business statement ​

A single vehicle delivers orders A and B in two consecutive one-day slots, 0 and 1. Order A is due at the beginning of day 0; order B is due at the beginning of day 1. The route that visits A first costs 10 USD, while the route that visits B first costs 2 USD. The due dates are soft: lateness is allowed but measured in days. Serving each order exactly once and using one slot per order are hard rules.

The deliberately small data set makes every candidate hand-checkable. It also illustrates why the choice between weighted and lexicographic policy is a business decision, not an algebraic afterthought.

3.2 Variables and hard constraints ​

Let

yAB,yBA∈{0,1}

indicate the chosen route order. Let dA,dB∈{0,1} be the delivery slots, where 0 is the first slot and 1 is the second. The hard route and slot rules are

yAB+yBA=1,dA+dB=1,dA=yBA,dB=yAB.

The last two equations connect the route choice to the slot assignment. They are not soft: a plan that delivers twice in one slot or does not serve an order is infeasible.

3.3 Soft violations, intermediates, and cost ​

Let the due slots be τA=0 and τB=1. In a general model, delay is

ℓi=max{0,di−τi}.

For the two-slot domains here this reduces exactly to

ℓA=dA,ℓB=0,qquadL=ℓA+ℓB.

Thus L is total delay in days. The route cost intermediate is

C=10yAB+2yBAUSD.

The two objective dimensions are (L,C), both minimized. With only lower bounds on delay, establish that the objective drives it to the positive-part value without other coupling preventing this, or define it using an exact function-graph formulation. Adding an upper bound alone does not establish equality to the positive part.

3.4 Enumerate and check every route ​

There are only two feasible route choices:

routeyAByBAdAdBℓAℓBL (days)C (dollars)
A→B100100010
B→A01101012

Both rows satisfy every hard constraint. The second row saves 8 USD but delays order A by one day.

3.5 Weighted policy ​

To make the units explicit, define the dimensionless scalar

F5(x)=5L1 day+1C1 USD.

The values are

F5(A→B)=5(0)+10=10,F5(B→A)=5(1)+2=7.

With this exchange-rate policy, the cost saving wins and the selected route is B→A. If delay receives weight 9 instead,

F9(A→B)=10,F9(B→A)=9+2=11,

so A→B wins. Neither weight is universally correct; each states how the business values one day relative to one dollar after unit conversion.

If several soft rules exist, the weighted form can include their violation measures, for example

Fw=wAℓA1 day+wBℓB1 day+wCC1 USD.

Keep a hard rule as a constraint defining X; only an explicitly authorized exception may be represented by a soft violation.

3.6 Lexicographic policy ​

Under lexicographic minimization of (L,C), the first level gives

L∗=0 days.

Only A→B attains that value, so the second level has no remaining choice and returns C=10 USD. The 8 USD saving cannot justify a one-day violation because cost is a lower-priority criterion.

For this finite example, lexicographic order can also be encoded with a single coefficient. Cost ranges from 2 USD to 10 USD, so its maximum difference is 8 USD. Since delay changes in whole days, M=9 is sufficient:

min9L+C.

The two values are 10 and 11, respectively. The derivation matters: merely choosing a large-looking coefficient without a cost bound and delay resolution does not establish the same policy.

3.7 Tolerance policy ​

Suppose the company accepts up to one day of total delay when that produces a cheaper route. First solve the primary level and obtain L∗=0. With a business tolerance εL=1 day, the second level is

minCs.t.L≤L∗+εL=1 day.

Both rows are allowed, and the result is B→A with C=2 USD. If εL=0 days, only A→B remains. A tolerance of 0.25 day also selects A→B here because the attainable delays are integral days.

The tolerance is not the same as a solver's numeric feasibility band. A report should say “accepted within one day of the best delay,” not merely “within tolerance.”

4. Organizing objective semantics in OSPF ​

An OSPF model can keep multi-objective policy explicit through conceptual roles:

  1. A domain context defines the delivery decisions and hard feasibility rules.
  2. A violation context derives non-negative, unit-bearing measures such as delay, rejected quantity, or overtime. These are semantic intermediates, not arbitrary residuals from an internal row.
  3. An objective context declares each objective's name, direction, unit, normalization reference, priority level, and business tolerance.
  4. A compilation boundary chooses a weighted objective, a staged lexicographic solve, or another supported representation while preserving the declared vector and policy.
  5. A result context records every objective component, each priority-level optimum or bound, the tolerances applied, and the final hard/soft status.

The compiler architecture page describes why objective policy should survive translation into a solver mechanism. Solving results explains why one scalar score is not enough evidence for a multi-objective result: users need the component values and the status of each level. Critical constraint analysis can then analyze a stated target for one objective while documenting whether other objective levels were fixed, preserved lexicographically, or allowed to trade off.

This organization is conceptual. It does not assume a particular current class, factory, or backend capability.

5. Common pitfalls ​

5.1 Adding quantities with incompatible units ​

The expression L+C has no natural meaning when L is in days and C is in dollars. Normalize each component or state a conversion such as “one day is valued at 9 USD.” Store the unit and scale alongside the objective definition.

5.2 Using weights as a substitute for a priority rule ​

A weight that works on today's data can fail after costs, capacities, or bounds change. If “never sacrifice service level” is the policy, use a lexicographic level or a proven dominance coefficient derived from bounds and resolution. Do not call a merely large coefficient lexicographic without that derivation.

5.3 Turning a hard rule into a penalty accidentally ​

An order that must be served, a safety limit, or a legal constraint belongs in X. Giving it a high penalty still permits violation when another term is sufficiently favorable. If controlled exceptions exist, model the exception explicitly and report it as a separate soft violation.

5.4 Leaving violation variables only lower-bounded ​

Rows such as ℓi≥di−τi and ℓi≥0 describe a lower envelope. They produce the intended violation only when the objective or another equality drives ℓi to its minimum. Otherwise the model may return an inflated violation and a misleading report.

5.5 Ignoring finite ranges when emulating priorities ​

The coefficient M for Mf1+f2 must dominate every possible change in f2 for one attainable improvement in f1. If the secondary objective is unbounded, or if a continuous primary objective has arbitrarily small improvements, a finite guessed M cannot prove lexicographic behavior.

5.6 Mixing business tolerance with numerical tolerance ​

A one-day acceptance band and a 10−8 feasibility tolerance answer different questions. Business tolerance changes the set of acceptable plans; numerical tolerance describes how a solver interprets a computed residual. Record them separately, with units and directions.

5.7 Reporting only the scalar score ​

Two plans can have the same weighted score but very different delay and cost. A result should include the objective vector, normalized components, weights or priority order, tolerances, and the hard-feasibility status. If a solve is not proven optimal at one level, say so instead of presenting the incumbent scalar as a certified policy optimum.