Repository navigation
Release notes for sbmlsim 0.9.4
A patch release of fixes: the size of a compartment can be changed with a species of an assignment rule in it, which stopped every scan of the body weight of a model with such a species; a simulation of a loaded model no longer depends on the simulations which ran before it on the model, so a serial run, a pool and two runs give the same result, bitwise (but for the random order of simultaneous events of the same priority, see below): the model starts from its values as loaded and the events at the time 0 fire at 0 on every simulation, which the SBML Test Suite now checks for every case it passes by simulating it again on its loaded model (the same simulation, a simulation after a shorter one and one with a steady state); and the legend of a band has one entry per band, its area in its own colour.
Fixes
- A compartment with a species of an assignment rule in it can be changed (#300, #301). A compartment keeps the concentrations of its species (PEtab v2): the pre-initialization and a change at a time set the concentration of every concentration species in it again after the compartment, also of a species of an assignment rule, which roadrunner refuses to set (
Could not set value for NON conserved moiety floating species ..., it is defined by an assignment rule). A change of such a compartment, a scan of it and a scan of a parameter its initial assignment reads, e.g. the body weight, failed (0.8.4 to 0.9.3). A species of an assignment rule now follows its rule; every other species keeps its concentration (a concentration species) or its amount (an amount species) as before. In the HCTZ model of pkdb_models the specieshctzof the extracellular fluid is such a species in a compartment which follows the body weight, so every sensitivity analysis of the model failed at the reference point of its design. - An initialization which fails does not break the model (#300, #301). The next initialization of a model which was not simulated restores the values the last one replaced. A value was recorded before it was set, so a value which roadrunner refused to set was restored by every later initialization of the loaded model, which failed on it as well: every later point of a scan on the model failed, also a plain simulation. A value is now recorded once it is replaced.
parameters_ofleaves out the species of an assignment rule (#300, #301).sampling.parameters_of(model, species=True)listed them, and a design of all parameters and species stopped at the compile of its dimension, since a change cannot set such a species.- One legend entry per band, its area in its colour (#302, #301). The legend of a band had two entries, its median (or its upper boundary without a median, a thin line) and a grey area of its quantile range, e.g.
0-100 %, once per panel and range, whatever the colour of the band, so two bands of different colours could not be told apart in the legend. A band now has one entry, its area in its own colour, labelled<name> (<low>-<high> %), e.g.C (5-95 %); a band per point ofoverhas an entry per point,<name>, <point label> (<low>-<high> %), and a band with a colour bar one entry of its name in the middle colour of the colour map. matplotlib and plotly draw the same entries; the median has no entry, and its hover in plotly names it<name> median(#304). - A simulation starts from the model as loaded, also in the last bits (#303, #304). roadrunner's
resetAllevaluates the initial values of a model with the parameters current at the reset, i.e. with the values the simulation before set: the amount of a concentration species in a compartment whose initial assignment reads an assignment rule of the body weight missed the amount as loaded in the last bits (95.2875instead of95.28750000000002afterBW = 70.46). The first point of a loaded model starts from the model as loaded and every later one from such a reset, so a point of a scan depended on the points of its chunk, and a serial run, a pool and two runs of a pool differed (0.8.4 to 0.9.3): in the sensitivity analysis of the HCTZ model of pkdb_models up to2.6e-7between a point of a scan and the point alone, up to1.63e-5between two runs of a sampling and in every table of a Sobol analysis. A reset now sets every parameter, compartment and species amount which is not the variable of an assignment rule and differs from the model as loaded back to its value as loaded, which costs microseconds per simulation; the results of a point after another one change in the last bits, the first point of a model and a model whose reset restores it bitwise do not change. - The events at the time 0 fire on every simulation of a loaded model (#305, #306). roadrunner's reset queues the events which fire at the time 0 at the integration start time of the last
simulatecall, and a simulation of sbmlsim with events ends with an integration of its own at its end: every simulation after the first of a loaded model, i.e. every point of a scan after the first of its chunk, fired such an event with a delay after its end, or not at all (case 01757:P1(10)25, 1.5, 1.5 in three simulations; a scan[25, 1.5, 1.5]; since 0.9.0, which integrates the end of a simulation with events in a call of its own, measured on 0.9.3). The integration start times are set to 0 before every reset. roadrunner's reset also keeps the events of the simulation before which are still pending, which fired in a later simulation reaching their time (P1 = 625after a simulation which ended at 1): a model with an event with a delay is generated again, which empties the queue, before a simulation which integrates beyond the time the last simulation of the model reached, also after an initialization without a simulation in between, e.g. the references of a design (milliseconds for a small model, tenths of a second for a large one; a scan, whose points end at the same time, regenerates nothing unless it integrates to a steady state). The runner of the SBML Test Suite simulates every case which passes again on its loaded model, as a scan does, and each simulation must equal the first, bitwise (statusrepeatotherwise): the same simulation, the simulation after one of half its duration, which integrates beyond it, and the simulation with a steady state before it (for at most the duration of the case), compared with that of a fresh model; both may fail to reach the steady state, then with the same error. Before these fixes 8 cases failed the same simulation by their events (01120, 01335, 01713, 01754 to 01758) and 14 differed in the last bits, 01000 by its event at t0 and 13 by the random order in which libroadrunner executes simultaneous events of the same priority; that order is drawn withstd::randof the C library, whose state belongs to the process, so the runner seeds it before every simulation of a case. A regeneration of a model draws from that generator as well, so a case taggedRandomEventExecutionis compared within its tolerances after a shorter simulation and with a steady state, which only 01590 needs (7.1e-14). With these fixes all 1580 cases which pass also pass the repeat check. A model with simultaneous events of the same priority still depends on the state of that generator outside the runner. - A steady state of a model with a rate rule of a stoichiometry (#307, #306). A simulation with a steady state before it failed with a
ValueErrorof numpy (operands could not be broadcast together) for a model with a rate rule of a species reference (0.8.4 to 0.9.3): roadrunner'sgetRatesOfChangeNamedArrayhas the rate of every state but no name of such a species reference, and the steady state read the states by its names. The rates and the states are now read by the ids of the states of the integrator. Found by the repeat check with a steady state, in 10 cases of the SBML Test Suite (01452, 01453, 01563, 01633, 01727 to 01729, 01736 to 01738).