1 of 21

Public Transit Math

Math Climate Day 2024 | Matthew Greenberg | University of Calgary

2 of 21

Public transportation gets people where they’re going while emitting far fewer climate-warming greenhouse gases than private cars. The reason is simple efficiency: while cars usually carry just one or two people at a time, a bus can carry 50 or more, and a train in a large city may carry thousands.� �Since transportation creates more than a fifth of the world’s greenhouse gas emissions, shifting people from cars to public transit can do a lot to lower our impact on the climate. But people will only choose public transportation when it is their most convenient option for getting around.”

3 of 21

Calgary transit in 2023:

  • 90 million rides
  • 3000 employees including 2000 operators
  • 1000 buses and 200 light rail vehicles
  • 6000 stops on 150 routes
  • Operating budget $280 million (municipal)
  • Capital budget $440 million (provincial and federal)

Public transit is complex and expensive!

4 of 21

Math: Strike the optimal balance

  • Service planning and network design (data-driven modeling)�coverage, ridership, service goals, frequencies
  • Timetabling and vehicle scheduling (optimization)�meet-ups, fueling/charging, depots�
  • Crew scheduling (optimization)�labor rules

Service

Cost

5 of 21

6 of 21

Scheduling terminology

  • Vehicle block: a bus trip beginning and ending at its depot
  • Relief point: a point along a vehicle block where a driver change can occur; vehicle blocks may share relief points
  • Task: an “atomic” portion of a vehicle block between two consecutive relief points; must be covered by a single driver
  • Workpiece: a sequence of consecutive tasks performed by a single driver along a single vehicle block
  • Duty: a plausible sequence of workpieces, alternating with breaks, to be performed by a single driver

6

7 of 21

Timetabling and vehicle scheduling

7

8 of 21

Crew scheduling

8

9 of 21

Valid duties and labor rules

  • Valid duties must conform to labor rules, typically encoded in a collective agreement between the drivers’ union and the transit company. These agreements may regulate, e.g.:
    • min/max length of a workpiece
    • min/max length of a break
    • max number of workpieces in a duty
    • min/max worked time in a duty
    • max spread of a duty (time elapsed from clock-in to clock-out)

10 of 21

The Crew Scheduling Problem

  •  

11 of 21

Enumeration?

  • If we could enumerate all valid duties, then we could just pass the CSP to a solver like CPLEX or Gurobi.
  • Unfortunately, the number of valid duties is enormous even for moderately sized transit networks. The enumeration is intractable.
  • Instead, we pursue an approach in which we generate new valid duties as we need them.

12 of 21

The Master and Restricted Master Problems

  •  

13 of 21

Column (duty) generation

  •  

14 of 21

Solving the subproblem

  •  

15 of 21

 

 

16 of 21

Reduced costs and shortest paths

  •  

17 of 21

Resource-constrained shortest paths

  •  

18 of 21

Encode labor rules as resource maps

Labor rule

Resource function

19 of 21

Solving the Master Problem

  •  

20 of 21

Integrality

  •  

21 of 21

That’s all for today!

  • Want to know more? Go work for GIRO! They’re always hiring.
  • Thanks!
  • Questions?