ML & Data Science

Sprint Task Allocation

Optimization

MSc Data Science · Machine Learning coursework · Coventry University

Who should do which sprint task? An exact solver and an evolutionary algorithm go head to head on minimising total effort without overloading anyone.

Role
Data Scientist
Year
2025
Focus
Optimization
Stack
6 technologies
  • PuLP (MIP)
  • CBC solver
  • DEAP (GA)
  • Python
  • NumPy
  • Pandas
  • 28 h

    MIP total cost (proven optimal)

  • 37 h

    GA total cost (feasible)

  • 32.1%

    GA optimality gap

  • 2.2×

    MIP faster (0.13 s vs 0.28 s)

  • 1.00

    MIP workload std dev (GA 5.97)

  • 65,536

    Possible assignments

Sprint assignment is a Generalized Assignment Problem (GAP). Every task goes to exactly one engineer, engineers take different hours for the same task, each has a capacity, and total effort should be as low as possible. GAP is NP-hard, so exact methods slow down quickly as teams and backlogs grow.

The problem is written as a binary integer program: x_ij = 1 if engineer i takes task j. Minimise Σ c_ij·x_ij subject to each task being assigned exactly once (Σ_i x_ij = 1) and each engineer staying within capacity (Σ_j c_ij·x_ij ≤ C_i).

The instance has 4 engineers with capacities of 31, 28, 37, and 39 hours (135 in total) and 8 tasks costing 3 to 10 hours each, with 4^8 = 65,536 possible assignments. The greedy lower bound is 28 hours against roughly 50 for an average assignment, so the choice of engineer really matters. Task_1, for example, takes 3 hours for Engineer_2 but 10 for Engineer_4.

Mixed-Integer Programming (PuLP with the COIN-OR CBC solver) found the proven optimum of 28 hours in 0.13 s. The Genetic Algorithm (DEAP) found a feasible 37-hour plan in 0.28 s, a 32.1% optimality gap. MIP also balanced work far better, with a workload standard deviation of 1.00 against 5.97.

Approach

  1. 01

    Data

    Synthetic but realistic: 4 engineers, 8 tasks, capacities [31, 28, 37, 39] h, and a 4×8 cost matrix of 3–10 h.

  2. 02

    Explore

    Engineer efficiency (inverse average cost), task difficulty (average cost), and a greedy check that gives a 28 h bound.

  3. 03

    Formulate

    Binary x_ij, minimise Σ c_ij·x_ij, with one engineer per task and capacity limits.

  4. 04

    Exact: MIP

    PuLP + CBC

    Branch-and-cut with a 300 s limit. Returns a certified optimum.

  5. 05

    Heuristic: GA

    DEAP

    Integer chromosome, tournament selection (size 3), uniform crossover, random-reassignment mutation, and greedy repair.

  6. 06

    Compare

    Cost, optimality gap, solve time, feasibility, workload fairness, and scalability on larger synthetic instances.

From the project notebooks: the data, each method's solution, and the head-to-head comparison. Tap any figure to zoom.

  1. Fig. 01 · Data

    The cost matrix

    Hours for each engineer on each task. The wide spread (3 to 10 hours for the same task) is what makes assignment matter.

  2. Fig. 02 · Data

    Capacity and skill

    Capacities range from 28 to 39 hours, averaging 33.8. Each engineer's cost spread shows where they're fast and where they're slow.

  3. Fig. 03 · Genetic Algorithm

    GA convergence

    The GA settles on a 37-hour solution early and the population's average fitness flattens within the first 20 generations. It converged to a local optimum, not the global one.

  4. Fig. 04 · Genetic Algorithm

    GA solution

    Feasible but lopsided: Engineer_2 gets no tasks while two engineers take three each.

  5. Fig. 05 · Mixed-Integer Programming

    MIP assignment

    The optimal plan gives every engineer exactly two tasks, each matched to their strengths.

  6. Fig. 06 · Mixed-Integer Programming

    MIP solution

    Even workloads, low utilisation, and plenty of remaining capacity. The 28-hour total matches the greedy lower bound.

  7. Fig. 07 · Comparison

    Cost and fairness

    MIP is 9 hours (32.1%) cheaper and much fairer, with lower maximum utilisation and workload variance.

  8. Fig. 08 · Comparison

    Solve time

    On a problem this small, the MIP solver is 2.2× faster because it prunes the search tree efficiently.

  9. Fig. 09 · Scalability

    Scaling up

    On larger synthetic instances (up to 6 engineers × 15 tasks), MIP stayed fast while the GA's gap widened. MIP's worst case is still exponential, so a GA becomes the practical choice only for very large or real-time problems.

  • Chromosome

    An integer list of length n. Gene j is the engineer assigned to task j, e.g. [1, 0, 3, 2, …].

  • Fitness

    −(total cost + P · Σ capacity overrun), with penalty weight P = 1000, since DEAP maximises fitness.

  • Operators

    Tournament selection (size 3), uniform crossover at 50% per gene, and random-reassignment mutation.

  • Greedy repair

    After crossover and mutation, tasks on overloaded engineers move to the next-best engineer with spare capacity.

  • Hyperparameters

    final run

    Population 100, 200 generations, crossover 0.8, mutation 0.2.

  • MIP solver

    CBC

    COIN-OR Branch and Cut, the open-source default in PuLP, with a 300 s time limit.

Total cost (hours)

Lower is better

  • MIP (optimal)28.0
  • Genetic Algorithm37.0

Workload standard deviation

Lower is fairer

  • MIP (optimal)1.00
  • Genetic Algorithm5.97
  • GA strengths: scales well, handles non-linear or multi-objective goals, and finds good solutions quickly.
  • GA weaknesses: no optimality guarantee, sensitive to hyperparameters, and results vary between runs.
  • MIP strengths: finds the global optimum with a certificate, and is deterministic.
  • MIP weaknesses: worst-case exponential time, and less flexible for non-linear constraints or objectives.
  • Martello & Toth (1990): GAP as a generalisation of the knapsack problem, its NP-hardness, and branch-and-bound.
  • Cohen et al. (2006): modern MIP solvers handle moderate GAP instances to optimality.
  • Díaz & Fernández (2001): Tabu Search reaches within 1–5% of optimal on large instances, much faster.
  • Holland (1992): the selection, crossover, and mutation operators behind the GA.
  • Gutjahr et al. (2016): optimisation under effort uncertainty cut sprint failures by 15–20%.
  • Pentico (2007): survey of exact vs heuristic methods. No single method wins everywhere.
  • Small to medium teams (under ~500 variables): use MIP. Optimality is reachable in seconds.
  • Large-scale enterprise planning or real-time re-planning: use the GA for speed and scalability.
  • Business impact: data-driven allocation can cut required engineering hours by 15–20%, makes sprints more predictable, and, with fairness objectives, helps prevent burnout.
  • Costs are fixed estimates. Real effort is uncertain, which calls for stochastic or robust optimisation.
  • Tasks are independent. Precedence constraints (task A before task B) could be added as linear constraints.
  • Single objective (cost). Real teams also care about fairness, skill growth, and priority.
  • Hybrid GA-MIP: use the GA's solution as a warm start for the MIP solver on larger problems.
  • Multi-objective optimisation: a weighted fitness for cost, workload variance, and other metrics, or goal programming in the MIP.
  • Other metaheuristics, such as Simulated Annealing and Tabu Search, to escape local optima.