1 unstable release
0.1.0 | Jun 5, 2024 |
---|
#35 in #discrete-event
1MB
16K
SLoC
Welcome to MortalSim, a discreet event simulation library for biological systems. It aims to provide a layered, highly modular engine for realistic, scalable simulations of living entities powered by research-based physiological models.
Motivation
Existing physiological simulation solutions are very complex, computationally expensive, and/or difficult to understand and modify.
There is need for an adaptable software solution to provide efficient determination of overall, high-level physiological state which can make good use of existing, clinically verified models.
Goals
- Provide validated physiological events at the organism level
- Support parallel organism simulations in real time with minimal impact to computing resources
- Modular architecture - relatively easy integration and customization
- Support combinations of widely varying model approaches
- Make model addition / removal as easy as possible
Potential Uses
- Epidemiological research & simulation
- Medical / Military training software
- Personalized health insights
- Gaming
- ...
How?
MortalSim operates under the principle that, like ogres and onions, all living organisms can be modeled as a set of biological layers. These layers provide a unique framework within which each component can communicate and interact with other simulation components.
MortalSim currently has the following layers:
- Core
Event
subscription & dispatch.
- Circulation
- Closed circulatory system definition.
- Blood substance interactions with
BloodStore
s.
- Digestion
- Ingestion, handoff, and elimination.
Consumable
substance interactions.
- Nervous
- Nervous system tree definition
- Nerve-bound
Event
signaling
Discrete Event Simulation
Mortalsim is centered around discrete Event
s.
At the top level, the progression of events
provides the target simulation output, whether
that's concious level, heart rate, or any other
vital sign.
Key physiological events are provided by the core
MortalSim framework, but individual components can
define their own custom Event
s as well.
This was selected for the following reasons:
- Simple
- Meets the target focus of high-level overall state
- Event driven states are easily understood and implemented
- Fast
- Requires minimal computational resources
- Built to be parallelizable from the ground up
- Flexible
- Loose coupling between modules
- Easy manipulation of system inputs and outputs
Roadmap
Core Functionality
Base
- Event Trait & Framework
- Substances Enums
- Substance Stores
- Time Manager
- Sim Component Traits & Framework
- Sim Component Registry
- Layer Manager Traits & Framework
Core Layer
- Core Initializer & Connector
- Core Layer Logic
Circulation Layer
- Blood Vessel Traits & Framework
- Circulation Initializer & Connector
- Circulation Layer Logic
Digestion Layer
- Consumable Traits & Framework
- Digestion Initializer & Connector
- Digestion Layer Logic
Nervous Layer
- Nerve Traits & Framework
- Nerve Signal Traits & Framework
- Nervous Initializer & Connector
- Nervous Layer Logic
Sim
- Layer Processor
- Sim & Organism Traits & Framework
- Sample Sim
Basic Modules
- Human Sim
- Simple Blood Flow
- Cardiovascular Hemodynamics Component (IN PROGRESS)
- Respiration Component
- Brain Consciousness Component
- Kidney Component
- Liver Component
- Digestion Component(s)
- BMR Component
- Acute Injury Component(s)
- Chronic Illness Component(s)
- Musculoskeletal Components
Module Development Tools
- Math routines crate
- SBML to MortalSim component tool (IN PROGRESS)
- Test Harness for Core Components
- Test Harness for Circulation Components
- Test Harness for Digestion Components
- Test Harness for Nervous Components
Language Support
- Python Bindings
- JavaScript Bindings
- C++ Bindings
- Java Bindings
Dependencies
~6MB
~116K SLoC