-
Notifications
You must be signed in to change notification settings - Fork 166
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
Fix derivatives in 2D-table for one-sided extrapolation by constant continuation #3896
Conversation
917dcf3
to
87cba73
Compare
I've tested the functionality using tabletest4.txt attached. The input signals go "around" the table 0,1,2 Functionally this appears to be working correctly now. Thanks! |
ae20468
to
68570f2
Compare
Nice stimulation. I added it as new test model. Thanks.
Thanks for testing and confirmation. |
The test is better if the table is set so the derivative values are unique for example: |
68570f2
to
ccc9450
Compare
I'm having a bit of trouble understanding how this is supposed to work. Basically I expected the getValue code to be matched by derivative code, but the codes are different and I only see how the new code matches linear interpolation in table and hold-extrapolation - but not for other interpolations for hold-interpolation. Am I missing something obvious? |
The change considers the cases to HOLD_LAST_POINT where there is one-sided extrapolation. |
…lation by constant continuation
ccc9450
to
6f1175e
Compare
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 good now.
Closes #3894.
@GarronFish You can test by cloning master branch of ModelicaTableAdditions where I already updated the binaries.