Skip to main content

What does this project do? Why is this project useful? How do I get started? Where can I get more help, if I need it?

The framework is in pre-alpha development and components are lightly tested, if at all - use of the framework is at the users risk. Any feedback or suggestions for improvement is welcome (either create an issue or start a discussion.

Implemented Features

Core:

  • Model created and validated from a list of user defined classes, a function that returns a list of Build.Locations and a function that returns a list of Build.Rules.
  • Validation that rules can be triggered, locations are matched to rules have the constants and the user defined classes that are required by the rule (i.e. used in either the propensity function), the propensity function evaluates to a number when the
  • Save the model locations, classes, rules and matched rules to json file.
  • Load the model locations, classes and matched rules from the created json file for simulation.
  • Simulate upto a time point subject to a maximum iteration threshold.

Rules:

  • "Metarule" definition allows the creation of multiple matched rules - as long as the target in the rule matches the type of the location. At the moment a location can match in different target slots across different matchings but only one slot in a matching.
  • Rules allow for multiple locations and the propensities and stoichiometry supports multi-location rules
  • Sympy propensity functions using user defined compartments, user defined constants attached to a location (prefixed with loc_) and model state values (currently just time based, prefixed with model_).
  • Stoichiometry allowing user defined compartments to change (currently just by a constant value).
  • Note: the rules may not precisely satisfy the Gillespie algorithm, it is upto the user to ensure it does at the moment (or just hope).

RuleTemplates:

  • SingleLocationRule: Provides a wrapper to simplify the creation of a rule based on a single location.
  • SingleLocationProductionRule: Provides a wrapper to simplify the creation of a rule at a single location where any number of reactants form any number of products (i.e. a production rule).
  • TransportRule: Provides a wrapper to simplify the creation of a rule where a single compartment moves from a single location to another.
  • ExitEntranceRule: Provides a wrapper to simplify the creation of a rule where an amount of a single compartment leaves or enters (depending on the positive or negative transport_amount) the system, at a given location.

Locations:

  • Define per location constants and per location initial values.

Classes:

  • Define the name, unit and an optional (unused) description of the class.

RuleChain:

  • Compute the compartment values that will change given a rule and the locations (index set from rule matching) that trigger it - used to work out which propensities to update.

Solvers:

  • Generic solver interface - extend from this to create own solvers.
  • Classic Gillespie algorithm with propensity caching (only update the value of the propensity when the underlying symbol value changes.
  • A default behaviour to execute when no rules have any propensity (either step or exit). Step is useful for seasonal models.

Trajectory:

  • Store the values of all user defined compartments, partitioned by location - stores a data point before and after a change in value only.
  • Basic matplotlib plot of values at a location.

Known issues:

  • Model state variables don't trigger a recomputation of propensities when propensity_caching = True.
  • Executing simulate twice leads to an error, reinitialising the solver before second execution fixes it for now!

Metadata

Release files for pyRBM 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyRBM 0.0.3
File Size Uploaded
pyrbm-0.0.3.tar.gz 42.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyRBM 0.0.3
File Interpreter ABI Platform
pyrbm-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 83.1 kB

Release files / pyrbm-0.0.3.tar.gz

Download URL pyrbm-0.0.3.tar.gz
Size 42.8 kB
Tags Source
SHA-256 checksum
How to use checksums
dca9ab8aef58849165d902f6d6960e5489e921f5316b304310eae58dac99e6dc
BLAKE2b-256 checksum
How to use checksums
05697a4b5ed7e0f5966d768a1104a64c07fda9ce375d4b80667595a4075a367f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.6

Release files / pyrbm-0.0.3-py3-none-any.whl

Download URL pyrbm-0.0.3-py3-none-any.whl
Size 40.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
85f7c8bfa1f0f7202506fba5dffceae5897a9bc8abf061b5441d1b827ba9cea5
BLAKE2b-256 checksum
How to use checksums
0f5edaa862575c5d2ddb733dae8415b6492f8e16bf4eebe9fdd2ffab34c0fe6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.6

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page