Skip to content

v2: Clarify condition table & initial assignments #624

@dweindl

Description

@dweindl

A question regarding the current v2 draft and how initial assignments interact with changes in the condition table:

1. **Evaluation of** ``targetValues``
``targetValues`` are first evaluated using the *current* values of all
variables in the respective expressions.
* For the initial time period of an experiment, *current* values are
determined by the initial conditions defined in the model.
Constructs defining initial values of model entities (e.g., SBML's
*initialAssignments*) are applied only once at the start of the first
time period and are not re-evaluated in later time periods. The start
time of the first time period is defined by the respective experiment.
* For subsequent time periods, the *current* values are taken from the
simulation results at the end of the preceding time period.
2. **Assignment of the evaluated ``targetValues`` to their targets**
All evaluated ``targetValues`` are simultaneously assigned to their
respective targets. It is invalid to apply multiple assignments to the
same target at the same time.
* These assignments respect language specific interpretations of which
variables are *atomic* or *derived*/*algebraic*. Most notably, SBML
considers species amounts and compartment sizes but not
concentrations to be *atomic*. This means that any entry that has a
``targetId`` that refers to a species with
``hasOnlySubstanceUnits=false`` will have its ``targetValue``
(interpreted as concentration) converted to amounts using the
**current** compartment size and then applied to the target's amount.
For further details, refer to SBML semantic test suite case `01779
<https://github.com/sbmlteam/sbml-test-suite/blob/7ab011efe471877987b5d6dcba8cc19a6ff71254/cases/semantic/01779/01779-model.m>`_.

If we have a model with a parameter p0 = 1 and another parameter p that is the target of an initial assignment p <- p0, and the experiment/condition tables specify some change p0 = 2 at time = 0 -- what is the value of p at time=0? 1 or 2?

According to the current draft, I would say the value should be 1, because the initialAssignment is evaluated before the condition-specific changes are applied.
This would be in line with how events triggering at t=0 would be handled in SBML, i.e. after the evaluation of initialAssignments. However, I am not sure if this is what users would expect. I think, in PEtab v1 this wasn't clearly specified, but implementations and users (and the test suite) assumed that changes through the condition table would be applied before evaluating initialAssignments (and thus, for the example above, the value of p would be 2).

How should this be handled? Generally, I'd find applying the condition table changes before evaluating initialAssignments more convenient. However, this is problematic if the targetValues themselves depend on targets of initialAssignments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions