This PR contains all the changes for the new 1.1 release. The description below can also serve as a basis for the new release announcement. Jupyter notebook files and test models of the new event implementation are available here.
Note: The readthedocs documentation will only be updated (rebuilt) once the actual version is released.
PySCeS Release 1.1.0
We are pleased to announce a new minor release (version 1.1.0) of the Python Simulator for Cellular Systems: PySCeS (https://pysces.github.io/). This is the first release in the 1.1 series.
What's new?
The most significant new feature in Version 1.1 is a major upgrade in the way PySCeS handles events in simulations. The definition of events follows the framework described in the SBML Level 3 Version 2 specification, thus making the event handling SBML-compliant. Specifically, event persistence (for events with a delay) is now handled correctly, and simultaneous events can be executed according to their assigned priorities.
The new event specification in the PySCeS input file reads:
To achive this, three new optional keyword arguments have been added as a comma-separated list to the event specification. The general syntax for these arguments is <attribute>=<value>. The keywords are:
delay (float): specifies a delay between when the trigger is fired (and the assignments are evaluated) and the eventual assignment to the model. If this keyword is not specified, a value of 0.0 is assumed.
priority (integer or None): specifies a priority for events that trigger at the same simulation time. Events with a higher priority are executed before those with a lower priority, while events without a priority (None) are executed in random positions in the sequence. If this keyword is not specified, a value of None is assumed.
persistent (boolean): is only relevant to events with a delay, where the situation may occur that the trigger condition no longer holds by the time the delay in the simulation has passed. The persistent attribute specifies how to deal with this situation: if True, the event executes nevertheless; if False, the event does not execute if the trigger condition is no longer valid. If the keyword is not specified, a default of True is assumed.
The following event illustrates the use of a delay of ten time units with a non-persistent trigger and a priority of 3:
A new setting has been added to the settings dictionary of the PysMod class with the following default: mod.__settings__["cvode_access_solver"] = True
This specifies if the Assimulo solver object is available from within the PysMod instance to make low-level changes to the integration algorithm. The current default emulates previous behaviour, but the setting can be changed to False, which facilitates serialization of the PysMod class in e.g. parallel computations. Previously, the attached Assimulo solver object would prevent serialization. Thanks @c-barry
Documentation has been updated to reflect the changes to the event syntax.
Various bug fixes, including dealing with deprecations for Numpy 1.24.x compatibility.
This PR contains all the changes for the new 1.1 release. The description below can also serve as a basis for the new release announcement. Jupyter notebook files and test models of the new event implementation are available here.
Note: The readthedocs documentation will only be updated (rebuilt) once the actual version is released.
PySCeS Release 1.1.0
We are pleased to announce a new minor release (version 1.1.0) of the Python Simulator for Cellular Systems: PySCeS (https://pysces.github.io/). This is the first release in the 1.1 series.
What's new?
The most significant new feature in Version 1.1 is a major upgrade in the way PySCeS handles events in simulations. The definition of events follows the framework described in the SBML Level 3 Version 2 specification, thus making the event handling SBML-compliant. Specifically, event persistence (for events with a delay) is now handled correctly, and simultaneous events can be executed according to their assigned priorities.
The new event specification in the PySCeS input file reads:
To achive this, three new optional keyword arguments have been added as a comma-separated list to the event specification. The general syntax for these arguments is
<attribute>=<value>
. The keywords are:0.0
is assumed.None
) are executed in random positions in the sequence. If this keyword is not specified, a value ofNone
is assumed.True
, the event executes nevertheless; ifFalse
, the event does not execute if the trigger condition is no longer valid. If the keyword is not specified, a default ofTrue
is assumed.The following event illustrates the use of a delay of ten time units with a non-persistent trigger and a priority of 3:
The legacy event syntax is still supported.
Other changes
PysMod
class with the following default:mod.__settings__["cvode_access_solver"] = True
This specifies if the Assimulo solver object is available from within thePysMod
instance to make low-level changes to the integration algorithm. The current default emulates previous behaviour, but the setting can be changed toFalse
, which facilitates serialization of thePysMod
class in e.g. parallel computations. Previously, the attached Assimulo solver object would prevent serialization. Thanks @c-barryREADME: https://github.com/PySCeS/pysces/blob/master/README.md
DOCUMENTATION: https://pyscesdocs.readthedocs.io/en/latest/
© Brett Olivier and Johann Rohwer, January 2023.