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

Add point that reset variables must be initialised? #329

Open
kerimoyle opened this issue Apr 28, 2020 · 11 comments
Open

Add point that reset variables must be initialised? #329

kerimoyle opened this issue Apr 28, 2020 · 11 comments
Labels
normative Pertaining to the normative specification question

Comments

@kerimoyle
Copy link
Collaborator

What do people feel about adding a point to either:
- 2.9 The reset element, or
- 3.11 Interpretation of resets
that says that the reset variable must be initialised? I think it would make a huge amount of the operation of the resets clearer, it's easy to validate, and the resets won't actually work without it ...?

@kerimoyle kerimoyle added question normative Pertaining to the normative specification labels Apr 28, 2020
@MichaelClerx
Copy link
Contributor

How do you mean "it must be initialised" ?

@kerimoyle
Copy link
Collaborator Author

It must have an initial_value attribute somewhere in the set? Or have I got that wrong? ie: you can't define its value through the maths A = 1 if you want to reset A anywhere ... ?

@MichaelClerx
Copy link
Contributor

Yeah I think that that's the only way the reset rules make sense. We can't have both "x is always 3" and "set x to 7". Probably wherever we explain the difference between eternal truths and initial values would be the place to bring this up?

@kerimoyle
Copy link
Collaborator Author

Another confusing thing: It's not that initial values are only true at t=0, it's that they're true until changed (whether by integration, maths, or resets makes no difference). The "initial" throws me a little, as I associate it only with integration. Maybe we can use the attribute initial_value still, but refer to them in the text by something more generic, as we do with map_variables etc ...

@MichaelClerx
Copy link
Contributor

That's cool!
We're only just working out what these things mean. It started with people saying "what constructs do we need to encode all the models we care about", I think, but now we're approaching it from the other end and saying "now that we've said X, what does that imply"? I like it

@MichaelClerx
Copy link
Contributor

Initially, x=0, until changed by a reset or ODE ?

@kerimoyle
Copy link
Collaborator Author

... or a change in another variable in an equation? Anything that has a value that can change for any reason needs to be initialised directly through either initial_value or indirectly by other variables that it depends on being initialised? I've started trying to figure this out ... see: https://libcellml-tutorials.readthedocs.io/en/pr344_documentation/tutorials/asides/aside_constant_vs_variable.html (work in progress!!)

@MichaelClerx
Copy link
Contributor

... or a change in another variable in an equation?

how so?

@kerimoyle
Copy link
Collaborator Author

A = B + C
B is changed by a reset or ODE? I guess A doesn't need to be initialised then ...

Initially, x=0, until changed by a reset or ODE ?

Can we not just say: x=0 until changed by something? Ditch the initial part?

@MichaelClerx
Copy link
Contributor

Is "initial" not a shorthand for "when the vector t is some unspecified value t0" ?

@kerimoyle
Copy link
Collaborator Author

It implies that it's a state variable (to me anyway), rather than just a regular variable that you need to give a value to. But I guess this could be cleared up with some clarity in whatever section in chapter 3 of the normative, and some good examples in the informative.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
normative Pertaining to the normative specification question
Projects
None yet
Development

No branches or pull requests

2 participants