OP System

Describe models of changing systems, including spatial interactions and random events.

OP System is a general-purpose model specification and compilation tool. It turns readable descriptions of partial differential equations (PDEs) with spatial or trait structure, nonlocal interactions, compartmental flows, ordinary differential equations (ODEs) and stochastic reaction networks into calculations for simulation. Researchers specify equations or transitions; the compiler produces NumPy and JAX evaluators and, within the documented qualified scopes, raw PyTorch evaluators. The model language is domain-independent rather than limited to epidemiological or public-health systems.

Public; package maturity: alpha; latest released version: v0.10.0 (final) on PyPI · v0.10.0 archive · all archived versions · Release documentation and executable examples

Named axes describe groups, space and traits. Model interfaces expose reactions, operators, named latent observables and time-varying parameters. OP Engine can use these interfaces for simulation; measurement-error and observation models belong in downstream analyses. Other numerical tools can consume the compiled calculations.

Numerical consumers choose spatial discretization and time or event integration. Validation checks expressions, shapes and interface contracts. Cross-axis constraints are recorded as metadata and do not filter state cells or transitions. Numerical accuracy and scientific adequacy need checks for the intended application.

Two-panel synthetic chemostat example comparing trajectories with an adaptive reference and showing final errors under NumPy, JAX and PyTorch at two precisions.
One compiled specification under NumPy, JAX and PyTorch. The same method performs the same arithmetic in each namespace, so the error against an adaptive reference is bit-identical across array libraries at each precision in this run. Synthetic model, assumed parameters.

What this figure supports and its limits · Computed spatial example, inputs and checks

Method diagram (SVG) · Vector PDF · All figure sources and downloads