Release notes for sbmlsim 0.67.0
This is a breaking release. A panel can declare a virtual population which is simulated at every value of a scan and summarized by scalars, shown as box plots and histograms (#830). The exported bundle is the contract panelbundle/5, the package requires sbmlsim-core 0.66.1 and the web app of a model vendors sbmlsim-web 0.12.0. See Migration for what a model package does.
Breaking
- The contracts
populationpanel/1,populationresult/1andpanelbundle/5.panelbundle/5addspopulationsto every answer of the bundle. It is a clean cut: the panel endpoint of sbmlsim-core 0.65.0 and later readspanelbundle/5only and refusespanelbundle/4, and an older endpoint refusespanelbundle/5, so a bundle and a web app must be exported again with this release. - Requires sbmlsim-core 0.66.1 (
sbmlsim-core>=0.66.1): 0.65.0 the panel endpoint ofpanelbundle/5with the population panels and the summariesboxStatsandhistogram, 0.66.0 and 0.66.1 the room of the tick labels of an axis (tick_label_room). - sbmlsim-web 0.12.0 is vendored, which shows population panels and reads
panelbundle/5.
Migration
- Run the factory again of every model package and commit the web app (
<name>_app.html) and the browser exports it writes again: an app of 0.66 embeds a host which refusespanelbundle/5.
Added
- Population panels.
sbmlsim.panel.PopulationPaneldeclares virtual patients (PanelPopulation:nat mostMAX_DRAWS(256), a fixedseedof at mostMAX_SEED(2^64 - 1),draws,measured,targets), simulated at every value of the scan of one range knob (PanelScanAxis, at mostMAX_SCAN_VALUES(16) values, so at most 4096 simulations; no draw reads the knob of the scan) on explicit outputtimes, and summarized by scalars (PanelScalar, at mostMAX_SCALARS(8), formulas over the knobs, the flagsknown_<id>, the draws, earlier scalars and the reductionsat,max,min,loglinear_interceptandloglinear_slope), shown as box plots per value of the scan (ScalarBoxPlot) and histograms of the draws (DrawHistogram, at mostMAX_BINS(100) bins). A page of an app names it as a part; the annotation is<population>, the project overrideProject.populations. The demo isexamples.panels.population:PROJECT(python -m sbmlsim.serve --model population=examples.panels.population:PROJECT). - The distributions of a population (
sbmlsim.population):Normal,LogNormal(scipy's convention) andMultivariateNormalof at most 3 coordinates with one table or aLookupof tables by the class of a knob (right-closed edges), every parameter a number or a formula of knobs. They are compiled to formulas of the knobs and seeded standard normal scores (the designrandomofdesign/1of sbmlsim-core) and written as initial assignments into the population SBML, which the service and the browser simulate alike, so draws, targets and integration agree by their bits and the scalars within 4 ulps for the elementary functions and the power. - The conditional normal of measured values.
Measured(name, value, cv)sets a coordinate tovalue*(1 + cv*z)when the optional knob its value reads is known, and draws the other coordinates of its multivariate normal from the conditional normal given the measured ones (per subset and class, Cholesky factors at compile time), so they keep their correlation with what a reader knows. Knob(optional=True): a knob without a target which a reader may leave unknown (nullin a request), itsdefaultread then and its flagknown_<id>0; only a population panel declares one.- The routes
GET /api/models/{model}/populations/{population}(populationpanel/1) andPOST .../populations/{population}/simulate(populationresult/1, one value of the scan per request: the scalars and the draws of every patient with their units, provenance and status), cached under the spec hash and checked at startup on every variant a population runs on (its change formulas as those of a panel). sbmlsim.simulator.observables.derive_unitis public: the unit of a formula derived from the units of its symbols, which the scalars of a population are checked and converted with.
Fixed
- The web app strips
distribwith the DOM, keeping every number as its text, so a model with uncertainties simulates in the page the SBML the service simulates (before, libsbml wrote it again with 15 digits, which also moved the derived targets ofpanelbundle/3and/4). - The XML declaration of the exported SBML carries its encoding.
The web app
- sbmlsim-web 0.12.0 shows population panels (
<sbmlsim-population>), and a page without an app shows one per population panel. The web app registers the renderer withboxStatsandhistogramof sbmlsim-core, the box and the histogram ofsbmlsim.sensitivity.plotsby their bits.
Documentation
docs/serve.md(population panels) anddocs/webapp.md; the guard of the embedded contracts (tests/webapp/test_contracts.py) checkspopulationpanel/1andpopulationresult/1.
