Skip to content

Be more explicit in assert of VariableLimiter #4482

@ceraolo

Description

@ceraolo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    L: BlocksIssue addresses Modelica.BlocksenhancementNew feature or enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions