Repository navigation
Release notes for sbmlsim 0.8.5
A patch release of the integrator: every state gets an absolute tolerance of its own, a model which does not read the time is integrated in local time, and every setting of the integrator reaches roadrunner. Together they remove the CVODE warning "t + h = t" after late doses and resets, which models with tiny compartments hit.
Breaking changes
- A float
absolute_toleranceis the tolerance of every state (#254). roadrunner scaled the single value by the smallest initial volume of the model, so1e-6in a model with a volume of1e-12was about1e-18. The same float is now the tolerance of every kind of state, i.e. looser in such a model. This also holds for settings stored by 0.8.4 and earlier, e.g. with a fit: a report of a stored fit integrates with other tolerances than the fit did. - The default
absolute_toleranceofFitSettingsis1e-10instead of1e-6, the one ofSimulatorSerial(#254). RoadrunnerSBMLModel.set_integrator_settings(**kwargs)is a method of the model (#254). It was a static method which took the roadrunner instance. A setting the integrator does not have raises aValueError; before, it was dropped with a debug message.set_default_settingsand_tolerance_volume_factor, which nothing called, are removed.
Features
-
An absolute tolerance per state (#254). sbmlsim sets the tolerance of every state from its kind (
sbmlsim.model.tolerances):amount: a species withhasOnlySubstanceUnits=true.concentration: any other species. The tolerance is multiplied by the reference volume of its compartment, i.e. its initial volume, raised to1e-6times the largest volume of the model when it is degenerate (logged once per model).other: a state of a rate rule.
absolute_toleranceofSimulatorSerialandFitSettingsis a float or anAbsoluteTolerancewith one value per kind and overrides by id.RoadrunnerSBMLModel.tolerances()lists the tolerance of every state; the console of a fit shows the tolerance per kind, and the report of a fit the tolerance of every state. -
Restarts in local time (#254). A model which does not read the time is integrated from the time 0 of roadrunner in every segment between two changes, and its output is shifted back to the absolute time. The first step of CVODE after a late change is then never below the resolution of the time. A model reads the time if a rule, kinetic law, initial assignment, function definition or event reads the csymbol
timeordelay, or if an event has a delay (ModelSymbols.time_dependent); such a model keeps the absolute time. -
FitSettings.initial_time_stepsets the first step of the integrator of the simulations of a fit (#254). It is the remedy for "t + h = t" in a model which reads the time.
Fixes
- Every setting of the integrator reaches roadrunner (#254). Only
variable_step_size,stiff,absolute_toleranceandrelative_tolerancewere passed on, e.g.initial_time_stepwas dropped. The settings ofSimulatorSerial.set_integrator_settingsare kept for every model set later; before, the nextset_model, which an experiment calls for every task, applied the settings of the constructor again. - A compartment without a size is not selected by default (#254). A membrane whose area the model does not use was recorded as a variable which is
NaNat every time. Chen_MSB2009of the PEtab benchmark collection integrates; with one scaled tolerance CVODE stalled withCV_TOO_MUCH_WORK(#254).
Examples
- The HCTZ example evaluates its Hill functions for a slightly negative concentration as for 0,
power(max(hctz, 0 mM), gamma)(#254).
Documentation
docs/simulation.md,docs/models.mdanddocs/fitting.mddescribe the tolerances per state and the local time (#254).