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

Be more explicit in assert of VariableLimiter #4482

Open
ceraolo opened this issue Oct 19, 2024 · 0 comments
Open

Be more explicit in assert of VariableLimiter #4482

ceraolo opened this issue Oct 19, 2024 · 0 comments
Labels
enhancement New feature or enhancement L: Blocks Issue addresses Modelica.Blocks

Comments

@ceraolo
Copy link

ceraolo commented Oct 19, 2024

In Blocks.NonLinear.VariableLimiter, when limit1 becomes lower than limit2 an error is triggered.

Since these limits are dynamic, the user might not know what values caused the message, expecially in the case, that might occur, when this message is triggered at initialisation, and the tools do not show any variable value.

I propose to change the row.
assert(limit1 >= limit2, "Input signals are not consistent: limit1< limit2");
into:
assert(limit1 >= limit2, "Input signals are not consistent: limit1= "+String(limit1)+" < limit2= "+String(limit2));

The following screenshot shows how the output would be like in OM, if this change is done:
image

@beutlich beutlich added enhancement New feature or enhancement L: Blocks Issue addresses Modelica.Blocks labels Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or enhancement L: Blocks Issue addresses Modelica.Blocks
Projects
None yet
Development

No branches or pull requests

2 participants