-
Notifications
You must be signed in to change notification settings - Fork 44
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
Issue 1976 do not log pointless time variables #2002
Issue 1976 do not log pointless time variables #2002
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to work! It is unfortunate that we have a component with the default display name "Time". It should probably be changed to "SimulationTime" or similar. Then we can make "Time" a reserved name. Only problem is of course the backward compatibility.
a71b56b
to
d4f6ffa
Compare
@robbr48 Can you look over the last two commits as well, I reserved Time, time, Frequency, frequency and attempt to autoupdate old models (only in HopsanGUI). Things like aliases probably wont update, and users of system variables with these names will need to be updated manually. |
- Code cleanup and clarification - In the event of dataset creation failure, remaining data will still be written - Print error message in CLI if hdf5 export has errors
Try to rename component and system parameters when loading model in GUI
Also rename files to match source code file
When simulation is aborted, time and data vectors will be fully allocated but data not written is junk. Only export up until last logged sample.
d4f6ffa
to
5908e7d
Compare
Example: If only a subsystem variable is exported, then only the time vector for that system is
Issues still needing to be solved:
Related to #1976
Test
Assuming debug build!
Run this before updating to this code:
Run this after updating to this code:
Run the following to see the differences: