Skip to main content

Real-time anesthesia and physiology simulator for medical education

Project description

AnaSim

Real-time anesthesia and physiology simulation for medical education.

CI Python 3.10+ License: MIT

AnaSim Induction Window

[!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 ke0 than 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

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

anasim_simulator-1.0.tar.gz (176.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

anasim_simulator-1.0-py3-none-any.whl (154.9 kB view details)

Uploaded Python 3

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

Hashes for anasim_simulator-1.0.tar.gz
Algorithm Hash digest
SHA256 21dba89853c08ea973271720b77689bdfe163ae73c9de52185c03539340b2b00
MD5 2defbc596525b7850a928ad2179704fc
BLAKE2b-256 c6821f84ec84bead1d2527fe372f3e81ddff7f4fa3c19dd0bd5ef36062fa4763

See more details on using hashes here.

Provenance

The following attestation bundles were made for anasim_simulator-1.0.tar.gz:

Publisher: publish.yml on robchiral/AnaSim

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for anasim_simulator-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 135bcf3cd6dcfa0e8567f1583bc298a8d26053c330978c3fac5ac7fcd734c01b
MD5 f0eda1628316175b7cd04646a7defc10
BLAKE2b-256 dcff99a5e4a3ce586936d06dbe9a0dfdb431875f06cc149ef9c587d143060685

See more details on using hashes here.

Provenance

The following attestation bundles were made for anasim_simulator-1.0-py3-none-any.whl:

Publisher: publish.yml on robchiral/AnaSim

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page