AnaSim
AnaSim simulates adult anesthesia for education and research. It combines published pharmacology and cardiorespiratory models with a patient monitor and anesthesia machine interface.
Run AnaSim
Open robche.com/AnaSim in your browser.
For local use, install with Python 3.10 or later.
python3 -m venv .venv
source .venv/bin/activate
python -m pip install anasim-simulator
anasim
In Windows Command Prompt, use python in place of python3 and activate with
.venv\Scripts\activate.bat.
anasim opens the interface in your browser and works offline after installation.
Press Ctrl+C in the terminal to stop the server.
Choose a guided scenario or open simulation, then select Start simulation and Start. Use Apply to confirm setting changes.
Features
| Feature | Supported controls and measurements |
|---|---|
| Patient variation | Age, body size, renal and hepatic function, coronary disease, heart failure, COPD, obesity, and pregnancy with maternal positioning |
| Anesthesia | Propofol, remifentanil, fentanyl, hydromorphone, morphine, midazolam, etomidate, ketamine, lidocaine, sevoflurane, nitrous oxide, rocuronium, succinylcholine, and sugammadex |
| Cardiovascular drugs | Norepinephrine, epinephrine, phenylephrine, ephedrine, vasopressin, dobutamine, milrinone, esmolol, labetalol, atropine, and glycopyrrolate |
| Anesthesia machine | Facemask or tracheal tube, fresh gas flow, vaporizer, and bag-mask ventilation |
| Ventilation | Volume control (VCV), pressure control (PCV), pressure control with volume guarantee (PCV-VG), synchronized intermittent mandatory ventilation (SIMV), pressure support (PSV), and continuous positive airway pressure (CPAP) |
| Monitoring | ECG, pulse oximetry, arterial and noninvasive blood pressure, capnography, ventilation waveforms and loops, gas concentrations, bispectral index (BIS), train-of-four (TOF) and single-twitch monitoring, temperature, fluid balance, trends, and alarms |
| Fluids and events | Fluids and blood, surgical stimulation, airway obstruction, bronchospasm, laryngospasm, hemorrhage, anaphylaxis, sepsis, and arrhythmias |
| Guided scenarios | Total intravenous anesthesia (TIVA) and balanced induction, TIVA and inhalational emergence, hemorrhage, anaphylaxis, septic shock, and oxygen supply failure |
Drug delivery supports boluses, manual infusions, and plasma or effect-site TCI, depending on the drug.
Limits
AnaSim supports adults aged 18 to 70 years within the input limits. The architecture guide describes how the models represent patient conditions.
Headless use
Run a 60-second simulation and save a CSV recording.
anasim --mode headless --duration 60 --record
Documentation
| Task | Guide |
|---|---|
| Configure patients, run scripts, or interpret CSV | CLI and Python usage |
| Understand model behavior and assumptions | Architecture |
| Find the source studies | Model references |
| Compare model outputs with clinical recordings | VitalDB validation |
| Change the code and choose checks | Contributing |
| Review release changes | Changelog |
Citation and license
Cite using CITATION.cff.
AnaSim 1.6 and later use the proprietary, source-available AnaSim noncommercial license.
| Use | Terms |
|---|---|
| Individual use | Free |
| Noncommercial use at nonprofit or government institutions | Free |
| Commercial or other institutional use | Paid license |
Contact Robert Chen for paid licenses or written fee waivers. Sharing copies is allowed under the license terms.
Early AnaSim versions adapted code from Python Anesthesia Simulator, licensed under GPL-3.0. Those implementations have since been substantially rewritten. Third-party material retains its own terms.
Metadata
Release files for anasim-simulator 1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| anasim_simulator-1.7.tar.gz | 314.2 kB | With provenance | Details for anasim_simulator-1.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| anasim_simulator-1.7-py3-none-any.whl | Python 3 | none | any | Details for anasim_simulator-1.7-py3-none-any.whl |
Total release size: 554.3 kB
Release files / anasim_simulator-1.7.tar.gz
| Download URL | anasim_simulator-1.7.tar.gz |
|---|---|
| Size | 314.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8036c567f082497bca45517e8f075390ac43485d30f0fc7c9c9d92eb779e13fd
|
|
BLAKE2b-256 checksum How to use checksums |
3d54d01b7cc94bd89c53a6729d0b7a211c5dd5a9c209bfe76b689e649a52072e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.
Transparency logRelease files / anasim_simulator-1.7-py3-none-any.whl
| Download URL | anasim_simulator-1.7-py3-none-any.whl |
|---|---|
| Size | 240.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8846754353ca71e5990f6247bafbe93ead146832acf0a5ebacb3670bdab705c1
|
|
BLAKE2b-256 checksum How to use checksums |
9ab62e6d3dbc83cb99c7a23836b012c36ad8f4387b482eed72f5c6433e97c95a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.
Transparency logSecurity for anasim-simulator 1.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for anasim_simulator-1.7.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.