Supply Chain Lab Supply Chain Optimisation Studio Lab Home
Optimisation & Network Design

Supply Chain Optimisation Studio

Two classic decision models solved live as you change the data - container loading and supplier–order assignment. Watch the objective substitute your numbers, see which constraints bind, compare greedy against the true optimum, and trace how the answer moves: sensitivity analysis by hand.

How to use it

Interactive studio

Objective function · live Maximise cargo value

Each term is vi xi. Highlighted terms are in the optimal plan; grey terms have xi = 0. The line below substitutes the solver’s decision back into the formula.

Try these experiments

  1. Break the greedy rule. Set capacity to 10t and watch the “Greedy vs optimal” card - can you find inputs where greedy loses?
  2. Find the binding moment. Increase capacity one tonne at a time. When does slack appear and why does marginal value hit $0k?
  3. Displace Machinery. Raise Electronics’ value until Machinery leaves the container. What ratio triggers the flip?
Optimal value Z* - thousand dollars
Capacity used - -
Resource slack - tonnes unused
Value of +1 tonne - shadow-price intuition

Optimal container plan -

-

The trailer is drawn to scale: one slot = one tonne of capacity C, and every cargo block spans exactly its weight wi. Change any input and the load, the slack and the “left on the dock” queue redraw instantly - what the optimiser rejects is as informative as what it loads.

Decision variables & data editorxi = units loaded

- -
-
-
-

Selecting an item edits its data - it does not force it into the container. The solver alone decides what gets loaded. Your selection is highlighted everywhere: red on its tile, an amber underline on its objective term, a marked bar in the ranking, and a thick outline on its blocks in the truck. To get a selected item loaded, make it worth loading: raise vi, cut wi, or grow the container.

Value density vi/wi - the greedy ranking

Greedy loads items in this order until the container is full. It is fast and intuitive - and, because units are indivisible, sometimes wrong. The card below checks it against the exact optimum on every change.

Greedy heuristic vs exact optimum-

Greedy (best ratio first)-
-
Exact optimum (dynamic programming)-
-

-

Constraint classification · liveFeasible

A constraint is binding when it holds with equality at the optimum - it is the bottleneck. Binding rows are flagged with a red edge; relax them and Z* can improve.

Sensitivity: optimal value Z* as capacity C variesclick a point to jump there

The curve is a staircase: value only jumps when one more tonne lets a whole new unit fit - the integer effect. Flat segments mean the extra tonne is worthless (marginal value $0k). The red marker is your current capacity; steps get smaller as availability qi runs out (diminishing returns).

The two models

Container loading (bounded integer knapsack)

Max Z = ∑i vi xi s.t. ∑i wi xi ≤ C 0 ≤ xi ≤ qi, xi ∈ ℤ≥0

Solved exactly by dynamic programming over capacity. Value per tonne is a useful heuristic, but the integer constraint means the greedy ranking is not always optimal - the studio checks this on every change.

Supplier–order assignment

Min Z = ∑i ∑j cij xij s.t. ∑i xij = 1 ∀ j (demand covered) ∑j xij ≤ 1 ∀ i (one order per supplier) xij ∈ {0, 1}

A 3×3 assignment problem, solved here by enumerating all permutations - shown live in the explorer. At scale this is the Hungarian algorithm; the LP relaxation is integral, so binary variables come for free.

About this tool

The concept

Two classic combinatorial models. Container loading is a knapsack: choose indivisible cargo to maximise value inside a weight capacity. Supplier assignment is the assignment problem: match orders to suppliers at least total cost with each order placed once.

How it works

Edit the data and both models re-solve instantly. The studio shows the objective with your numbers substituted, marks which constraints bind, and runs a greedy heuristic beside the exact optimum so you can see when intuition fails.

Winning strategy

Look for the gap between greedy and optimal, then explain it: it appears when a high-ratio item blocks a better combination or when the cheapest supplier for one order is needed elsewhere. Sensitivity comes from changing one number at a time.