-
Notifications
You must be signed in to change notification settings - Fork 42
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
Clarify external object initialization #1907
Comments
Modified by beutlich on 12 Feb 2016 15:22 UTC |
Comment by jmattsson on 18 Feb 2016 08:37 UTC How about this? |
Comment by hansolsson on 18 Feb 2016 09:35 UTC
The constructor part seems good. For the destructor the order is a bit different (when terminal would be run before the destructor). I don't know exactly how to formulate that, but would write: The destructor shall completely delete the object, and must not require any preceding calls to be made (e.g., from a 'when terminal()' clause). |
Comment by jmattsson on 18 Feb 2016 10:02 UTC
Looks good to me. |
Comment by stefanv on 18 Feb 2016 14:37 UTC |
Comment by beutlich on 23 Jun 2016 21:51 UTC |
Comment by M.Arzt on 4 Jul 2016 17:11 UTC step A: The external objects constructor is called. I may say: "The external object is initialized by step A and later its internal data is modified by step B." But I guess, it's not what you meant. To clarify your intention, it is important to answer the question: "What makes an initialization complete?" |
Comment by jmattsson on 5 Jul 2016 07:11 UTC
If we also have:
If the external object is prepared to handle any other function that uses it, then its initialization is complete. Generally the only assumption you can make on the order functions for external objects is called is that the constructor is first and the destructor is last. |
Comment by choeger on 5 Jul 2016 07:48 UTC
My take on this is rather pragmatic: Initialization (of an object) is complete iff it is in a consistent state, i.e. all (external) procedures can work with that object. |
Modified by beutlich on 5 Aug 2016 08:41 UTC |
Comment by hansolsson on 12 Sep 2016 15:30 UTC Variant 2: What does it mean for initialization to be complete? (The intent was to avoid reading data after initialization.) Poll about proposal: |
Modified by hansolsson on 14 Sep 2016 12:31 UTC |
Comment by hansolsson on 23 Sep 2016 15:15 UTC |
Reported by hansolsson on 12 Feb 2016 15:18 UTC
Based on #1899
In 12.9.7 External Objects
add bullet with:
The constructor shall initialize the object, and not rely on other calls for this (in particular not any initial algorithm or initial equation). The destructor shall delete the object - and not rely on other calls (in particular not 'when terminal()...').
Migrated-From: https://trac.modelica.org/Modelica/ticket/1907
The text was updated successfully, but these errors were encountered: