Closed dweindl closed 5 months ago
I'd say, in the
else
case, that assignment should be ignored.Example: Assuming a model with a concentration-based species S in compartment C, and an event with two event assignments – EA_S assigning to S and EA_C assigning to C. In this case, S should only change due to EA_S, but not due to the volume change caused by EA_C. Currently, first EA_S is applied, then EA_C.
Correct?
Yes, sounds correct.
Might have been correct before. I don't quite understand why, yet. But changing that leads to failures in:
From elsewhere in the SBML spec (sec 4.6.8):
There is one exception: if the species’ quantity is determined by an AssignmentRule, RateRule, AlgebraicRule, or an EventAssignment and the species has the attribute value hasOnlySubstanceUnits=“false”, it means that the concentration is assigned by the rule or event; in that case, the amount must be calculated when the compartment size changes.
It's not exactly intuitive and quite possibly a common source of error, but the present implementation is correct.
Multiple event assignments from the same event should be executed simultaneously. From the SBML L3V2 specs:
However, that doesn't seem to be the case:
https://github.com/AMICI-dev/AMICI/blob/da19a550688e8232b23ace6d06722c66deb2703f/python/sdist/amici/sbml_import.py#L1670-L1673
I'd say, in the
else
case, that assignment should be ignored.Example: Assuming a model with a concentration-based species S in compartment C, and an event with two event assignments – EA_S assigning to S and EA_C assigning to C. In this case, S should only change due to EA_S, but not due to the volume change caused by EA_C. Currently, first EA_S is applied, then EA_C.
Correct?