Smarter Scheduling with
Graph-Based Optimisation

How we use network science to automatically build the best possible staff schedule - minimising cost while respecting everyone's availability and skills.

See How It Works
↓ Scroll to explore
CONCEPT

What is a Graph?

Not a bar chart or pie chart - a network of connected things.

Think of it like a map: Cities are nodes (dots), and the roads between them are edges (lines). A graph simply shows what connects to what.

In our world, the "cities" are people, days, jobs, and shifts. The "roads" represent relationships like "Alice is available on Monday" or "Bob is qualified for Bakery".

This simple structure lets a computer understand the rules of scheduling and find the best solution automatically.

Key Terms

Node (dot)A thing - a person, a day, a shift
Edge (line)A connection - "is available", "is qualified"
GraphThe whole picture of nodes + edges together
People
Places/Things
Connections
STEP 1

Representing Our Scheduling Problem

We turn synthetic workforce data into a graph the computer can reason about.

5
Employees
18
Shift Slots to Fill
3
Days (Mon-Wed)

Four Types of Nodes

E
EmployeesAlice, Bob, Carla, Dan, Eve - each with different pay rates and max hours
D
DaysMonday, Tuesday, Wednesday - the planning window
J
Jobs (Departments)Tills and Bakery - each needs specific skills
S
Shift Slots18 slots (3 days × 3 time periods × 2 departments) that need filling
The edges tell us the rules: "Alice IS AVAILABLE on Monday", "Bob IS QUALIFIED FOR Bakery". Only valid connections exist - impossible assignments are never even considered.
Employee
Day
Job
Shift Slot
STEP 2

Adding Weights - Teaching the Computer to Prefer

Each connection gets a "cost" number that tells the solver how good or bad that assignment would be.

Like choosing a route on a sat-nav: Each road has a "travel time". The sat-nav picks the route with the lowest total time. Our solver does the same - it picks the schedule with the lowest total cost.

What makes an assignment cheaper (preferred)?

FactorEffectWhy
Higher Skill↓ Lower costBetter-qualified people are rewarded
Lower Hourly Rate↓ Lower costCheaper labour is preferred (same quality)
Preferred Day↓ Lower costRespects employee preferences where possible
Understaffing↑↑↑ Huge costLeaving a shift empty is always the worst option
COST FORMULA
cost = hourly rate × 5 hours
       − skill bonus
       − preference bonus
Lower cost = the solver will prefer this assignment

Interactive: See How Costs Compare

Click on an edge to see its cost breakdown
STEP 3

The Optimiser - Finding the Best Schedule

A "minimum-cost flow" algorithm picks the combination of assignments with the lowest total cost.

Like water flowing downhill: Imagine pouring water into the top of a pipe network. The water naturally finds the cheapest path through the pipes. Our solver does exactly this - it "flows" assignments through the cheapest connections to fill every shift slot.

How the Flow Network Works

1
Source (supply)Injects one unit of "flow" for each shift that needs filling (18 total)
2
Employee nodesFlow is split - each person can only handle their max hours
3
Employee-Day nodesFurther splits enforce daily hour limits (e.g. max 10hrs/day)
4
Shift SlotsEach slot absorbs exactly 1 unit - it needs exactly one person
5
Sink (demand)Collects all flow - confirms every shift is covered
Safety Net - The Phantom Node

If no real employee can fill a slot, a "phantom" fills it at enormous cost. This flags genuine staffing gaps without crashing the system.

5
3
Slots: 18
Source/Sink
Employee
Employee-Day
Shift Slot
Phantom
OUTCOME

The Result - An Optimal Schedule

Every assignment is explainable. We can trace exactly why each person was chosen.

17/18
Shifts Filled by Real Staff
£1,095
Total Labour Cost
1
Staffing Gap Identified

Weekly Schedule

Why Each Person Was Chosen

Key Benefits

Instant Optimisation

Solves in milliseconds, even for large stores. No manual trial-and-error.

🔍
Full Explainability

Every decision has a traceable reason - no "black box" mystery.

🛡️
Constraint Respect

Never violates working hour limits, availability, or qualification rules.

1
2
3
4
5

From Data → Graph → Weights → Solver → Schedule

A robust, scalable, and transparent approach to workforce scheduling that reduces cost, respects constraints, and explains every decision.

Try the Interactive Dashboard →