Tandem t:slim X2 Insulin Pump Simulator
CompletedA four-person C++/Qt course project that makes insulin-delivery workflows, glucose changes, and safety events visible in an educational desktop simulation.

The problem
An insulin-pump simulation needs more than a familiar interface: inputs, delivery state, glucose trends, alerts, and history must agree. Our COMP 3004 team built an interactive Qt application to explore those workflows. My focus was the dosing logic and automated-control path.
What I built
- Bolus calculation and confirmation. I designed BolusManager for carbohydrate and correction components, detailed previews, manual delivery, input validation, and configurable limits, then connected delivery to the body/glucose simulator.
- Glucose-driven control. I developed ControlSystem to respond to simulated CGM readings, adjust the insulin rate, handle glucose trends, and manage suspension and resumption with safety checks.
- Alerts and shared integration. I implemented insulin- and glucose-related alert definitions and helped connect control results to the interface and history. Extended-bolus integration was shared with Julien Larivière-Chartier; profiles, charts, battery/cartridge management, and persistence were team contributions.
Why I built it this way
- Separate a suggested dose from delivery. Calculation returns a breakdown for review before confirmation or override. Validation and limits belong in the domain component so interface actions follow the same rules.
- Treat suspension as a delivery state. Glucose control must respect whether delivery is available. Suspension stops adjustments; resumption checks the current conditions, including external battery and cartridge state, before delivery can continue.
- Connect components through Qt signals and slots. Readings, delivery decisions, alerts, chart updates, and history cooperate through events. Keeping responsibilities separate made it possible to integrate work across four contributors.
- Make long-running behavior observable. The team accelerated time to five simulated minutes per real second. Charts and recorded events make dosing intervals, glucose trends, and safety scenarios visible within a short demonstration.
What I learned
I practiced object-oriented domain design, event-driven Qt integration, and reasoning about state transitions. A calculation is only one part of a workflow: confirmation, invalid input, interruption, and recovery need equally clear behavior. Integrating shared components also taught me to make ownership and event contracts explicit.
Evidence & current limits
Four recorded walkthroughs cover profiles and automatic delivery, bolus behavior, battery shutdown, and cartridge alerts. The public repository contains documentation, UML diagrams, and demonstrations; the course implementation remains private. This is an educational simulation without clinical validation.
Watch the scenarios and explore the design
More project screens
Explore the interface. Select an image to view it at full size.


