cellml / cellml-specification

CellML Specification
0 stars 8 forks source link

Suggested rewording for 3.11 interpretation of resets #321

Open MichaelClerx opened 4 years ago

MichaelClerx commented 4 years ago
  1. For the purposes of this section, we define the “reset variable” to be the variable referenced by a reset element’s variable attribute, and the “test variable” to be the variable referenced by its test_variable attribute.
  2. Each reset element describes a change to be applied to the reset variable when specified conditions are met during the simulation of the model.
  3. For each equivalent variable set (see 3.10 Interpretation of map_variables elements) where one or more of its variables appear as a reset variable, the "active reset" shall be determined as follows:
    1. All reset elements SHALL be considered sequentially for the equivalent variable set to which the reset variable belongs. The sequence SHALL be determined by the value of the reset element’s order attribute, lowest (least positive / most negative) having priority.
    2. The active reset shall be the first reset element for the equivalent variable set for which the value of the test variable equals the evaluation of the MathML expression encoded in the test value.
  4. When an active reset is found, the value of the reset variable SHALL ...

Attempts to address #317 and #316

kerimoyle commented 4 years ago

Want to cover off the idea of the same local variable being referenced by more than one reset too:

For each equivalent variable set (see 3.10 Interpretation of map_variables elements) where ~one or more of its variables appears as a reset variable~ more than one reset addresses any of its variables, the "active reset" shall be determined as follows: ... All reset elements SHALL be considered sequentially ~for~ within the equivalent variable set to which the reset variable belongs. ...