A simple and configurable multithreaded elevator simulation written in pure C++.
The system simulates how an elevator reacts to incoming signals from various floors and processes them accordingly.
- The elevator accepts input from multiple floors.
- Floor count is flexible – can be changed by modifying a single constant in the source code.
- Each signal is processed by a dedicated thread.
- Simulates concurrent requests from different floors.
- Handles requests sequentially, depending on elevator position and direction.
- Basic protection is included against thread collisions (race conditions are rare, but possible).
- Accepts user input from the console
- Works with:
- Integers (
int
) – for floor numbers - Characters (
char
) – for user choices or signals
- Possible error: submitting a non-integer when a floor number is expected (e.g., char instead of int)
- Rare thread overlapping issues may occur (thread safety is handled to a basic level)
- User input validation is minimal – designed for demonstration/testing purposes
- Language: C++
- Multithreading:
std::thread
,mutex
- Input/Output: Standard console I/O
A short demo GIF showcasing how the elevator simulation runs will appear here.