-
-
Notifications
You must be signed in to change notification settings - Fork 231
Improve Printing of Uninitialized Variables #3920
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
base: master
Are you sure you want to change the base?
Conversation
@asinghvi17 can you try this out for your MWE please |
src/utils.jl
Outdated
Else returns the variable as-is. | ||
""" | ||
function underscore_to_D(v::AbstractVector, sys) | ||
maps = get_schedule(sys).dummy_sub |
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.
Can this be gated behind isscheduled(sys)
so that printing the error doesn't error if the system isn't mtkcompile
d? It could also use the string manipulation "hack" discussed earlier in that case (or if the inverse map doesn't have the appropriate entry, as is the case for algebraic variables)
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.
Shouldn't that error check happen earlier (ie before we get this far in the problem construction). Also note that any variables not in the schedule get passed through as is.
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.
Problems do not require the system to be mtkcompile
d.
Also note that any variables not in the schedule get passed through as is.
Yeah, but we can still print them better.
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 is added back in f137b1a
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.
Needs tests to make sure the error prints correctly both with and without simplification, and on a DAE where it tries to print the derivative of an algebraic variable.
Added the test |
Checklist
contributor guidelines, in particular the SciML Style Guide and
COLPRAC.
Additional context
Closes #3913
Add any other context about the problem here.