Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions regarding setting initial concentrations via condition table #481

Open
dweindl opened this issue Oct 28, 2020 · 7 comments · May be fixed by #581
Open

Questions regarding setting initial concentrations via condition table #481

dweindl opened this issue Oct 28, 2020 · 7 comments · May be fixed by #581
Labels
question Further information is requested

Comments

@dweindl
Copy link
Member

dweindl commented Oct 28, 2020

Related to AMICI-dev/AMICI#1319, i was wondering about the following:

In case of preequilibration, should the occurrence in the condition table of any parameter that somehow impacts the initial state trigger a reinitialization?

Independent of preequilibration: In the presence of aninitialAssignment to a species in the model AND the assigned-to species in the condition table, what would have precedence? Would that even be valid in PEtab?

@FFroehlich
Copy link
Collaborator

Related to AMICI-dev/AMICI#1319, i was wondering about the following:

In case of preequilibration, should the occurrence in the condition table of any parameter that somehow impacts the initial state trigger a reinitialization?

In the case of precomputed steady states, this may turn out not to be what the user anticipated. Could be encoded in parameter table which parameter should and shouldn't lead to reinitialization (also makes it more transparent to the user that reinitialization is a feature and forces the user to think about it).

Independent of preequilibration: In the presence of aninitialAssignment to a species in the model AND the assigned-to species in the condition table, what would have precedence? Would that even be valid in PEtab?

I would argue that PEtab has precedence.

@LeonardSchmiester
Copy link
Collaborator

Independent of preequilibration: In the presence of aninitialAssignment to a species in the model AND the assigned-to species in the condition table, what would have precedence? Would that even be valid in PEtab?

I would argue that PEtab has precedence.

Would agree. The PEtab doc also says that a species in the condition table overrides initial assignments in the SBML model and preequilibration.

In case of preequilibration, should the occurrence in the condition table of any parameter that somehow impacts the initial state trigger a reinitialization?

At least this is how I remember it from the discussions back then and how I would have interpreted the documentation.

@dweindl
Copy link
Member Author

dweindl commented Nov 9, 2020

Thanks for the feedback so far. Any other opinions? @yannikschaelte ?

@yannikschaelte
Copy link
Member

Point 2 definitely agreed, point 1 ... not sure. Is the difference to AMICI-dev/AMICI#1319 only that here it's about a parameter dependent initial state of the simulation as opposed to directly encoding the initial state in the condition file (where the override would happen)?

@dweindl
Copy link
Member Author

dweindl commented Nov 9, 2020

Point 2 definitely agreed, point 1 ... not sure.

Agreed with whom? And with point exactly, the order changed on the way :).

Is the difference to AMICI-dev/AMICI#1319 only that here it's about a parameter dependent initial state of the simulation as opposed to directly encoding the initial state in the condition file (where the override would happen)?

The question is how the fix for AMICI-dev/AMICI#1319 has to be implemented.

In the case of species IDs in the condition table things are relatively simple. But InitialAssignments are somewhat more difficult. In the simplest case, they just assign a numeric value directly or via another parameter. But they can potentially depend on other terms, potentially depending on other terms, potentially... So it might not be too obvious that changing a certain parameter in the condition table would trigger a reinitialization (as Fabi mentioned).

Another point, not mentioned above, is that the math of InitialAssignments could also include other species. In case of preequilibration, if a species is referenced in the math of an InitialAssignment, that should refer to its value after preequilibration, not from before, right?

@yannikschaelte
Copy link
Member

Agreed with whom? And with point exactly, the order changed on the way :).

Ah right, the PEtab having precedence thingy.

The question is how the fix for AMICI-dev/AMICI#1319 has to be implemented.

In the case of species IDs in the condition table things are relatively simple. But InitialAssignments are somewhat more difficult. In the simplest case, they just assign a numeric value directly or via another parameter. But they can potentially depend on other terms, potentially depending on other terms, potentially... So it might not be too obvious that changing a certain parameter in the condition table would trigger a reinitialization (as Fabi mentioned).

Yes, I also thought that the dependence chain may be non-trivial, so that could be problematic und yield unexpected results ... 1) Would it be possible to detect such cases via symbolic calculation and output them? With the suggestion of specifying in the parameter table whether a parameter should lead to reiniialization: could work (?) but a problem might be conflicting parameters telling to do it or not ...

Another point, not mentioned above, is that the math of InitialAssignments could also include other species. In case of preequilibration, if a species is referenced in the math of an InitialAssignment, that should refer to its value after preequilibration, not from before, right?

Sounds plausible ...

@dweindl
Copy link
Member Author

dweindl commented Nov 9, 2020

Yes, I also thought that the dependence chain may be non-trivial, so that could be problematic und yield unexpected results ... 1) Would it be possible to detect such cases via symbolic calculation and output them?

Needs to be detected anyways for handling things correctly. Outputting afterwards is trivial.

With the suggestion of specifying in the parameter table whether a parameter should lead to reiniialization: could work (?) but a problem might be conflicting parameters telling to do it or not ...

Yes, but catching those conflicts would be the exact reason why we'd take that approach.

Such an extra field would be something to discuss for the next PEtab version. The question is, how to handle things for the moment. Would agree with Leonard's interpretation there.

@dweindl dweindl linked a pull request May 23, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants