Real-time anesthesia and physiology simulator for medical education
Project description
AnaSim
Real-time anesthesia and physiology simulation for medical education.
[!WARNING] For educational use only
AnaSim is not a medical device. Do not use it for clinical care or patient-specific prediction.
Installation
AnaSim requires Python 3.10 or newer. Install the published package in a virtual environment:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install anasim-simulator
On Windows, activate the environment with .venv\Scripts\activate.
The package is distributed as anasim-simulator; the command and Python import
are anasim.
Quick start
Launch the interactive operating-room monitor:
anasim
Run a headless simulation:
anasim --mode headless --duration 10
See the CLI guide for configuration files, recording, and additional examples.
Features
- Cardiovascular and respiratory physiology responding to drugs, ventilation, fluids, and surgical stimulation
- PK/PD models for propofol, remifentanil, sevoflurane, rocuronium, and vasoactive agents
- VCV, PCV, PSV, CPAP, and manual bag-mask ventilation
- ECG, pulse oximetry, capnography, NIBP, and depth-of-anesthesia monitoring
- Guided induction, hemorrhage, anaphylaxis, septic shock, and emergence scenarios
- Headless execution and CSV recording for reproducible teaching exercises
Model scope and calibration
AnaSim uses published models where they behave coherently in the integrated simulation and documents calibrated deviations where literal parameters produce implausible managed intraoperative states. See the model references and deviations for citations and details.
Examples of calibration choices and deliberate deviations:
- hemodynamics uses plasma propofol/remifentanil concentrations in line with Su et al. 2023, while CNS depth, tolerance, BIS, and respiratory depression use effect-site concentrations
- rocuronium spontaneous recovery uses a faster runtime
ke0than pure literature modeling so recovery timing stays in the clinical range - maintenance startup adds visible norepinephrine support only when the selected anesthetic state would otherwise begin below MAP 65 mmHg
AnaSim currently accepts adult patients aged 18–70 years. The upper bound avoids unsupported extrapolation of the strongly age-dependent Su et al. hemodynamic term beyond the population used to develop and illustrate that model.
Development
git clone https://github.com/robchiral/AnaSim.git
cd AnaSim
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -e ".[dev]"
QT_QPA_PLATFORM=offscreen python -m pytest -q
See the contribution guide and changelog.
Initial TIVA implementations were derived from Python Anesthesia Simulator.
License
AnaSim is released under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file anasim_simulator-1.0.tar.gz.
File metadata
- Download URL: anasim_simulator-1.0.tar.gz
- Upload date:
- Size: 176.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21dba89853c08ea973271720b77689bdfe163ae73c9de52185c03539340b2b00
|
|
| MD5 |
2defbc596525b7850a928ad2179704fc
|
|
| BLAKE2b-256 |
c6821f84ec84bead1d2527fe372f3e81ddff7f4fa3c19dd0bd5ef36062fa4763
|
Provenance
The following attestation bundles were made for anasim_simulator-1.0.tar.gz:
Publisher:
publish.yml on robchiral/AnaSim
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anasim_simulator-1.0.tar.gz -
Subject digest:
21dba89853c08ea973271720b77689bdfe163ae73c9de52185c03539340b2b00 - Sigstore transparency entry: 2188599727
- Sigstore integration time:
-
Permalink:
robchiral/AnaSim@c3752e5babdca0d66d5df93ff484bc06a5c20cb6 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/robchiral
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c3752e5babdca0d66d5df93ff484bc06a5c20cb6 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file anasim_simulator-1.0-py3-none-any.whl.
File metadata
- Download URL: anasim_simulator-1.0-py3-none-any.whl
- Upload date:
- Size: 154.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
135bcf3cd6dcfa0e8567f1583bc298a8d26053c330978c3fac5ac7fcd734c01b
|
|
| MD5 |
f0eda1628316175b7cd04646a7defc10
|
|
| BLAKE2b-256 |
dcff99a5e4a3ce586936d06dbe9a0dfdb431875f06cc149ef9c587d143060685
|
Provenance
The following attestation bundles were made for anasim_simulator-1.0-py3-none-any.whl:
Publisher:
publish.yml on robchiral/AnaSim
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anasim_simulator-1.0-py3-none-any.whl -
Subject digest:
135bcf3cd6dcfa0e8567f1583bc298a8d26053c330978c3fac5ac7fcd734c01b - Sigstore transparency entry: 2188599756
- Sigstore integration time:
-
Permalink:
robchiral/AnaSim@c3752e5babdca0d66d5df93ff484bc06a5c20cb6 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/robchiral
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c3752e5babdca0d66d5df93ff484bc06a5c20cb6 -
Trigger Event:
workflow_dispatch
-
Statement type: