Interactive optimizer
Assembly line balancing
A product is built from many small tasks, each taking some time and each with precedence constraints — some tasks can’t start until others finish. Those tasks have to be shared across an ordered line of workstations so that no station’s work exceeds the cycle time (the beat of the line). Pack them badly and you need extra stations and workers standing idle; pack them well and the line runs lean.
Here an artificial immune system searches for a good assignment: it clones and hypermutates the best candidate task-orderings each generation, keeping the ones that use fewer stations and spread the load more evenly. Raise or lower the cycle time and watch the number of stations and the line efficiency trade off; the outlined column is always the current bottleneck.
This interactive is a faithful re-design of the research, simplified for illustrative and teaching purposes. It conveys the idea and behaviour of the model — it is not the paper’s full method, data, or results.
Top: precedence graph, each node a task (its time) coloured by assigned station. Bottom: workstations filling with task-time blocks under the cycle-time limit (dashed); the outlined column is the current bottleneck. Raise or lower the cycle time and watch stations and efficiency trade off.
How the model works
Each candidate solution is a priority ordering of the tasks. A decoder walks that order, dropping each ready task (one whose predecessors are already placed) into the current workstation if it fits under the cycle time, and opening a new station the moment it doesn’t. Line efficiency is the total work divided by the number of stations times the cycle time — so fewer, fuller stations means a leaner line.
The immune optimizer treats good orderings as high-affinity antibodies: each generation it clones the best ones and hypermutates the clones (more mutation for weaker solutions), evaluates the offspring, and keeps the fittest — with a trickle of fresh random antibodies for diversity. Over generations the line balances itself, evening out station loads and shrinking the bottleneck. This mirrors the artificial-immune and bio-inspired methods in the papers below, applied to the type-E variant where both the cycle time and the number of stations are in play.
The research behind it
This demo is a teaching stand-in for a body of work on assembly-line balancing and bio-inspired optimization for manufacturing. The full methods, benchmarks, and results are in these papers.
See also the crowd-evacuation simulation and the full demo gallery.