All work

Project · Systems

Elevator Simulator

A distributed elevator control system in Java. The scheduler, every elevator and every floor run as separate nodes that talk over UDP, each one a state machine on its own threads. The scheduler gives each passenger request to whichever elevator can take it at the lowest cost, and moves requests off cars that get stuck or stop answering. I led the five-person team that built it at Carleton University.

Stack
Java 25 · JavaFX 27 · UDP sockets · JUnit 6 · Maven · SLF4J & Logback · Docker
Role
Project and team lead, team of five
Origin
SYSC 3303, Carleton University
Recording

Live demo

The live version runs the real Java nodes in a container and streams their state to your browser, including each node’s console output.

Checking the live server…

Automated tests, run on every push
110
Before a silent elevator is taken out of service
1 s
Passengers delivered in 20 stress runs
48 / 48

Architecture

How it works

  1. 01

    Separate nodes

    The scheduler, each elevator and each floor run as separate nodes. They talk to each other only through UDP messages.

  2. 02

    State machines

    Every node is a state machine running on its own threads.

  3. 03

    Timed requests

    Floor nodes replay a list of timed passenger requests, sending each one to the scheduler when its time comes.

  4. 04

    Dispatch by cost

    For each request, the scheduler asks every elevator at once what taking it would cost: the time to reach the pickup floor, plus the delay the extra stop adds for passengers it already has planned. The cheapest elevator gets the request.

When things go wrong

Faults it handles

An elevator gets stuck
The scheduler takes it out of service and moves its waiting requests to other cars.
An elevator stops answering
It gets the same treatment: out of service, with its waiting requests moved to other cars.
No elevator is available
Requests wait until an elevator can take them.