Skip to content
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

Add extra variables for easier check of derivative calculations of table blocks #4529

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HansOlsson
Copy link
Contributor

@HansOlsson HansOlsson commented Feb 11, 2025

In order to check the derivative-approximation a simple possibility is to just integrate it and see that it is roughly the same as the original. It doesn't replace the reference results, but it helps in analyzing potential errors.

As an example simulate ModelicaTest.Tables.CombiTable1Ds.Test34 and plot d_t_new.u, integrated, integrated2. They should all be almost identical to each other. The parameter with Evaluate=false is added so that tools don't have the amazing idea of seeing through the differentiation combined with integration. There is no need to have references for these variables.

Possible extensions:

  • assert for equality (a bit complicated due to double integration)
  • turn it into a block
    • so that we don't mix graphics and text
    • it can be re-used for derivative test-models not extending from those base-classes
  • figure-annotations

@HansOlsson HansOlsson added the L: ModelicaTest Issue addresses ModelicaTest, ModelicaTestConversion4 or ModelicaTestOverdetermined label Feb 11, 2025
@HansOlsson HansOlsson added this to the MSL4.2.0 milestone Feb 11, 2025
@beutlich beutlich changed the title Add extra variables for easier check. Add extra variables for easier check Feb 11, 2025
Copy link
Member

@beutlich beutlich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Is this related to ContinuousClock is not suitable for testing derivatives in ModelicaTest.Tables #4325?
  2. Should the comparisonSignals.txt files be adapted to actually track the new signals?

@beutlich beutlich changed the title Add extra variables for easier check Add extra variables for easier check of derivative calculations of table blocks Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: ModelicaTest Issue addresses ModelicaTest, ModelicaTestConversion4 or ModelicaTestOverdetermined
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants