When modeling complex, hierarchical, and time-dynamic systems, such as biological systems, good computational tools are essential. Current tools, while powerful, often lack comprehensive frameworks for modular model composition, hierarchical system building, and time-dependent input handling, particularly within the Python ecosystem. We present SUND (Simulation Using Nonlinear Dynamic models), a Python toolbox designed to address these challenges. SUND provides a unified framework for defining, combining, and simulating multi-level time-dynamic systems. The toolbox enables users to define models with interconnectable inputs and outputs, facilitating the construction of complex systems from simpler, reusable components. It supports time-dependent functions and piecewise constant inputs, enabling intuitive simulation of various experimental conditions such as multiple dosing schemes. We demonstrate the toolbox's capabilities through simulation of a multi-level human glucose-insulin system model, showcasing its flexibility in handling multiple temporal scales, and levels of biological detail. SUND is open-source, easily extensible, and available at PyPI (https://pypi.org/project/sund/) and at Gitlab (https://gitlab.liu.se/ISBgroup/projects/sund/).
- Paper ID: 2510.13932
- Title: SUND: simulation using nonlinear dynamic models - a toolbox for simulating multi-level, time-dynamic systems in a modular way
- Authors: Henrik Podéus, Gustav Magnusson, Sasan Keshmiri, Kajsa Tunedal, Nicolas Sundqvist, William Lövfors, Gunnar Cedersund
- Classification: q-bio.QM (Quantitative Methods)
- Publication Date: October 17, 2025 (arXiv preprint)
- Paper Link: https://arxiv.org/abs/2510.13932
This paper presents SUND (Simulation Using Nonlinear Dynamic models), a Python toolbox specifically designed for simulating multi-level, time-dynamic systems. SUND addresses current limitations in modular model composition, hierarchical system construction, and time-dependent input handling, particularly within the Python ecosystem. The toolbox provides a unified framework for defining, combining, and simulating multi-level time-dynamic systems, supporting model definitions with interconnectable inputs and outputs, and facilitating the construction of complex systems from simple reusable components. The toolbox supports time-dependent functions and piecewise constant inputs, enabling intuitive simulation of various experimental conditions.
Mathematical modeling of complex hierarchical time-dynamic systems (particularly biological systems) requires robust computational tools. Current tools, while powerful, have limitations in the following areas:
- Modular Model Composition: Lack of comprehensive frameworks supporting modular model construction
- Hierarchical System Construction: Difficulty in handling multi-level system architectures
- Time-Dependent Input Handling: Insufficient capability in handling time-varying inputs
- Python Ecosystem Support: Absence of comprehensive solutions in the Python environment
Biological systems are inherently time-dynamic and typically modeled using ordinary differential equations (ODEs) or differential-algebraic equations (DAEs). The complexity of these systems makes simulation implementation and associated model analysis challenging. While existing tools such as SciPy, AMICI, and CellML provide powerful functionality, no single tool simultaneously meets all requirements.
The authors identified the absence of tools in the Python ecosystem that simultaneously satisfy the following five requirements:
- Modular model composition with input/output connectivity
- Creation of multiple model instances in different containers
- Flexible specification of time-dependent inputs
- Direct definition of ODE/DAE equation systems
- Implementation as a free open-source Python package
- Development of the SUND Toolbox: The first comprehensive tool in the Python ecosystem simultaneously satisfying requirements for modular modeling, containerized instance management, and time-dependent input handling
- Implementation of Modular Design Architecture: Supports decomposition of complex flat models with hundreds of ODEs into manageable interconnected components
- Provision of Flexible Input/Output Connection System: Enables seamless integration of models with different naming conventions through mapping functionality
- Integration of Automatic Time Unit Conversion: Supports seamless combination of models across different time scales from nanoseconds to years
- Open-Source Release: MIT-licensed open-source tool available through PyPI and GitLab
SUND aims to provide a unified framework for defining, combining, and simulating multi-level time-dynamic systems. Inputs include ODE/DAE equation systems, time-dependent functions, and model parameters; outputs are time-series simulation results. Constraints include numerical stability and inter-module compatibility.
SUND employs object-oriented design combining Python and C++ components:
- Model Objects
- Contain mathematical formulas defined by users in text files or multi-line strings
- Use syntax similar to SBToolbox for model representation
- Compiled and installed as Python modules usable for simulations under various experimental conditions
- Support user-defined model inputs and outputs, enabling modular design
- Activity Objects
- Objects for generating model inputs
- Support time-dependent functions: piecewise constant, piecewise linear, cubic spline functions, and constants
- Support mapping between internal and external input/output names
- Facilitate combination of models with different naming conventions
- Simulation Objects
- Combine model and activity objects to create simulation instances
- Executable over different time intervals, supporting various time steps and numerical solver settings
- Generate model simulation results
- Python User Interface: Provides ease of use
- C++ Core Computation: Ensures efficient computation and direct interface with SUNDIALS solvers
- SUNDIALS Integration: Leverages the SUNDIALS numerical solver suite for solving ODE and DAE systems
- NumPy Support: For numerical operations
- Setuptools Compilation: For C++ compilation
- Modular Composition Capability
- Decomposition of complex flat models into manageable interconnected components
- Improves maintainability and promotes model reuse and collaborative development
- Intelligent Input/Output Mapping
- Enables seamless integration of models with different naming conventions
- Provides default input value mechanisms, enhancing system robustness
- Automatic Time Unit Conversion
- Supports different time scales spanning nanoseconds to years
- Components can specify independent time units with automatic conversion during simulation
- Containerized Model Management
- Supports allocation of model instances to different containers
- Facilitates model reuse and isolation
- Applicable to physiologically-based pharmacokinetic (PBPK) modeling
- Non-Smooth Input Handling
- Automatic numerical integration reinitialization at discontinuity points
- Reduces user burden in tracking discontinuities
The paper validates the toolbox capabilities through a comprehensive multi-level human glucose-insulin system model based on research by Herrgårdh et al., integrating components from research groups including Dalla Man, Hall, and Brännmark.
- Multiple Time Scales: From cellular processes (seconds to minutes) to physiological adaptation (days to years)
- Multiple Biological Levels: From cellular signaling to whole-body glucose regulation
- Modular Structure: Demonstrates decomposition of originally flat model structures into interconnected modular components
- Detailed examples provided in online documentation: https://isbgroup.eu/sund-toolbox/
- Includes executable demonstrations showing capability to handle models from different sources, varying complexity, and time scales
- Supports complex experimental protocol definition, such as dosing regimens, meal patterns, and other time-varying perturbations
The glucose-insulin system model successfully verified the following capabilities:
- Modular Composition: Successfully decomposed complex multi-level models into interconnected modular components
- Time Scale Handling: Effectively addressed multiple time scales across different biological levels
- Input/Output Connection: Achieved seamless data transfer between different submodules
- Containerized Management: Demonstrated effective management of model instances across different containers
- Numerical Stability: High-quality numerical solutions ensured through SUNDIALS solvers
- Computational Efficiency: Efficient computational performance provided by C++ core implementation
- User-Friendliness: Intuitive user experience provided by Python interface
The glucose-insulin system model shown in Figure 1B includes:
- Two plotted features across different time scales
- Outputs from different submodules
- Integration processes across multiple biological levels
The paper provides detailed comparison of multiple existing tools:
- SciPy: Provides fundamental numerical computation capabilities
- AMICI: Focuses on high-performance sensitivity analysis for large ODE models
- CellML: Standardized model description language
- SBToolbox: Systems biology toolbox for MATLAB platform
- COPASI: Complex pathway simulator
- CellDesigner: Biochemical network modeling tool
- Tellurium: Extensible Python modeling environment
SUND's main advantages over existing tools:
- Provides complete modular modeling solution within Python ecosystem
- Simultaneously satisfies five key requirements (modularity, containerization, time handling, direct ODE definition, open-source)
- Particularly suited for multi-scale biological modeling applications
SUND successfully fills the gap in modular simulation tools within the Python ecosystem, particularly suited for modeling complex time-dynamic systems, especially biological systems. The toolbox's modular design philosophy addresses important deficiencies in current Python simulation tools.
The authors honestly acknowledge SUND's limitations:
- Parameter Estimation Functionality: The toolbox does not provide internal parameter estimation or Hessian approximation algorithms
- Unit Conversion Limitations: Supports only automatic time unit conversion, not non-time unit conversion
- Graphical Interface Absence: Current version lacks graphical user interface
The paper outlines clear development directions:
- Extended Unit Conversion Capability: Support automatic conversion of more types of units
- Sensitivity Equation Solving: Integrate sensitivity equation solving methods for Hessian estimation
- Graphical User Interface: Develop graphical interface for model construction and visualization
- External Tool Integration: Better integration with external tools such as SciPy optimization modules
- High Practical Value: Addresses actual needs in biological modeling, filling an important gap in the Python ecosystem
- Reasonable Technical Design: Object-oriented design, Python/C++ hybrid architecture, and modular philosophy all reflect good software engineering practices
- Open-Source Contribution: MIT-licensed open-source release facilitates community development
- Comprehensive Documentation: Provides detailed online documentation and example code
- Sufficient Validation: Toolbox functionality verified through complex biological system models
- Limited Innovation: Primarily engineering implementation and integration innovation with limited algorithmic originality
- Incomplete Evaluation: Lacks quantitative performance comparison with other tools
- Limited Application Scope Verification: Validated through only one biological system case; application breadth requires further demonstration
- User Experience: Absence of graphical interface may limit usage by non-programming users
- Academic Value: Provides valuable tool for computational biology and systems modeling fields
- Practical Value: Directly applicable to drug development, physiological research, and other domains
- Community Contribution: Open-source nature facilitates user community formation and tool development
- Reproducibility: Complete code and documentation support research reproducibility
- Multi-Scale Biological Modeling: Particularly suited for modeling tasks requiring integration of different time scales and biological levels
- Drug Development: Supports PBPK modeling and dosing regimen optimization
- Systems Biology Research: Applicable to dynamic simulation of complex biological networks
- Educational Applications: Modular design facilitates teaching and learning
- Collaborative Research: Modular design and standardized interfaces facilitate team collaboration
The paper cites eight major related tools and frameworks and six biological modeling research works, reflecting the authors' comprehensive understanding of the field and thorough investigation of related work. Particularly noteworthy is the dependence on the SUNDIALS numerical solver suite and NumPy and other foundational tools, reflecting an innovative development approach based on mature technologies.
Overall Assessment: This is a high-quality tool paper addressing practical needs in biological modeling. While algorithmic innovation is limited, the engineering implementation value is substantial, with positive implications for tool development in this field. Open-source release and comprehensive documentation further enhance its practical value and impact.