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 ZeroThresholds test in Blocks #4229

Merged
merged 2 commits into from
Jan 12, 2024

Conversation

tobolar
Copy link
Contributor

@tobolar tobolar commented Nov 9, 2023

Add a test example addressing both Modelica.Blocks.Nonlinear.Limiter and Modelica.Blocks.Logical.GreaterThreshold due to OpenModelica/OpenModelica#11132

Note: OM gives resuts different to Dymola and ModelonImpact.

@tobolar tobolar added the L: ModelicaTest Issue addresses ModelicaTest, ModelicaTestConversion4 or ModelicaTestOverdetermined label Nov 9, 2023
ModelicaTest/Blocks.mo Outdated Show resolved Hide resolved
Co-authored-by: Hans Olsson <HansOlsson@users.noreply.github.com>
@HansOlsson HansOlsson self-requested a review January 12, 2024 13:42
Copy link
Contributor

@HansOlsson HansOlsson left a comment

Choose a reason for hiding this comment

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

Looking good.
I can understand that it slightly complicated to handle since it is exactly at the threshold.

However, there should be no integration uncertainty in the ramp and limiter combination (there is neither a differential equation nor a non-linear system) and during events such expressions should be used as is:
https://specification.modelica.org/maint/3.6/equations.html#events-and-synchronization

(Note: That's an oversimplification in some advanced cases.)

If we wanted to ignore such differences it wouldn't make sense to have both greater and greaterequal blocks.

@MartinOtter MartinOtter self-requested a review January 12, 2024 14:04
@MartinOtter MartinOtter merged commit 525b2b1 into modelica:master Jan 12, 2024
2 checks passed
@tobolar tobolar deleted the addZeroThresholds branch January 12, 2024 14:34
@beutlich beutlich added this to the MSL4.1.0 milestone Jan 12, 2024
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.

None yet

4 participants