-
Notifications
You must be signed in to change notification settings - Fork 7
Add variable monitor for solver iteration output #308
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
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.
this pull request leaves casing of enums inconsistent in data structures. for instance, the newly added monitorable variables in busdata are all caps, inconsistent with enums in other files. this should be resolved prior to merge.
additionally, we should evaluate whether we are willing to use magic_enum to sidestep the requirement of a SIZE variant, something i worked around with it previously.
Both good points. I'll check the guidelines for enum member styles. If we want to make magic_enum a public dependency that would help with the implementation here a lot. Or we could install it as part of gridkit so users don't have to deal with that. What do people think? I implemented this treating it purely as a build dependency. |
lukelowry
left a comment
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.
Other than my one concern regardining output format, this is an invaluable PR. Labeled output data will accelerate verification for the 37/39 bus case and larger cases. Having this in the develop branch would be incredibly valuable right now.
The GridKit code outside the I/O parser should not depend on magic_enum. I would try to avoid it being GridKit library dependency. It should be available only in utilities for building GridKit apps. |
magic_enum is an external library over which we have little control. Making it required GridKit dependency is something I would prefer to avoid. I understand it's easier said than done, though. |
|
Just so y'all know, I'm planning to finish up requested changes and get this updated tomorrow. |
4a1097d to
d3a86af
Compare
|
I have added the capability of choosing the output format(s) using the JSON input file. By default, it will print CSV style to the console. I included changes to |
d3a86af to
e0b726d
Compare
|
Not sure why the consumer test is failing (it works locally for me). I'll have to dig into that later this week. |
bed5a07 to
3bdebf5
Compare
pelesh
left a comment
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.
More offline discussion is needed before this PR can be merged. Some issues to consider:
- Conversion of strings to enums should ideally be in parser functions only. Moving them to component data structures is not an ideal design.
- Setting monitored variables should be done in parser. I am not sure the current solution is sustainable.
- Capitalization of enums should not be changed in this PR.
- It is unclear what is the purpose of the
VariableMonitorBaseclass.
@pelesh That IS done only in the parser. If you're referring to the |
a0625be to
86a737f
Compare
superwhiskers
left a comment
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.
overall the code quality looks good. i only have architectural questions that i would prefer be answered before we merge this.
GridKit/Model/PhasorDynamics/SynchronousMachine/GENROUwS/GenrouImpl.hpp
Outdated
Show resolved
Hide resolved
* Update CONTRIBUTING.md * Add specific guidelines for enums
f7f972c to
b553868
Compare
cd01a7c to
cece7cf
Compare
7b1d272 to
0479284
Compare
lukelowry
left a comment
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.
Invaluable. Thank you @PhilipFackler ! This opens so many doors for case validation.
Any feedback of value from me will come after I use this feature to validate/debug the larger cases.
Description
Capability for printing monitored variables during time iterations
Proposed changes
Let each bus and device specify variables to monitor based on
*Datainput. DuringIda::runSimulationallow for monitoring output as well as user-definedstep_callback.Checklist
-Wall -Wpedantic -Wconversion -Wextra.Further comments
I'm starting this as a draft because I need some feedback before I can consider it completed.