This simulator replicates the full user experience of the Tandem t:slim X2 insulin pump using C++ and the Qt framework. Designed to emulate core insulin delivery workflows, it includes a realistic user interface, data visualization, dynamic insulin profile controls, and Control-IQ automation. The purpose of the simulation is to train users, support safe testing of insulin pump features, and help developers understand how such systems operate without relying on physical medical devices.
Key functionalities include CRUD management of personal insulin profiles, manual bolus delivery (including quick and extended), real-time graphing of CGM (continuous glucose monitoring) data, and simulation of alerts such as battery low, insulin level low, and blood glucose anomalies. Each simulated action is logged for audit and diagnostic purposes.
Control-IQ, the automated insulin delivery system, uses live CGM feedback to decide if basal insulin should be paused, resumed, or adjusted. The UI allows users to visualize insulin on board (IOB), insulin fill levels, and battery status. A lock screen, startup sequence, and system error handling are also implemented, mirroring real-world safety operations.
From design to implementation, the simulation leverages state machines, sequence diagrams, and Qt's signal-slot mechanism to organize event-driven programming. Scenarios are testable with traceability mapped to specific use cases such as bolus override or delivery suspension due to low blood glucose. Events are logged and categorized, making this simulator not only educational but also ideal for usability testing and future AI integrations for predictive dosing.