Opened 10 years ago

Last modified 7 years ago

#3138 accepted enhancement

Eliminate missleading warnings concerning [min, max]-asserts

Reported by: Bernhard Bachmann Owned by: Lennart Ochel
Priority: normal Milestone: Future
Component: Run-time Version: trunk
Keywords: Cc:

Description

model testInit
  Real x(start=1.0, fixed=true);
  parameter Real b(min=0.5,fixed=false);
initial equation
  b = 2;
equation
  der(x) = b;
end testInit;

A warning is issued, although the parameter b is initialized in the
corresponding [min, max]-interval. Seems that the check is performed
too early! Similar warnings are issued throughout most of the
Modelica.Fluid.Examples.

Change History (13)

comment:1 by Lennart Ochel, 10 years ago

Owner: changed from somebody to Lennart Ochel
Status: newaccepted

comment:2 by Lennart Ochel, 10 years ago

I fixed it and will commit the changes as soon as I have stable internet access.

comment:3 by Adrian Pop, 10 years ago

You posted the message using snail-mail? :) Ah, you said "stable", my bad.

Last edited 10 years ago by Adrian Pop (previous) (diff)

comment:4 by Lennart Ochel, 10 years ago

I removed wrong asserts for secondary parameters with r24471.
I don't close this ticket by now, since there are some asserts missing in certain cases.

comment:5 by Lennart Ochel, 10 years ago

There are still two issues with parameter assertions.

The following example shows that there are no assertions for "constant" parameters:

model testInit2
  parameter Real p(min=0.5, max=2) = p2;
  parameter Real p2(min=0.5, max=2) = 0;
end testInit2;

There is only an assertion for p.

assert            | warning | Variable p out of [min, max] interval: p >= 0.5 and p <= 2.0 has value: 0

In addition to that, there are also missing assertions for dependent parameters. The following example will not show any assert.

model testInit3
  parameter Real p(min=0.5, max=2, fixed=false);
initial equation
  p = 0;
end testInit3;
Last edited 10 years ago by Lennart Ochel (previous) (diff)

comment:6 by Lennart Ochel, 10 years ago

I solved the first issue (testInit2) with r24474.

comment:7 by Martin Sjölund, 10 years ago

Milestone: 1.9.21.9.3

Milestone changed to 1.9.3 since 1.9.2 was released.

comment:8 by Martin Sjölund, 9 years ago

Milestone: 1.9.31.9.4

Moved to new milestone 1.9.4

comment:9 by Martin Sjölund, 9 years ago

Milestone: 1.9.41.9.5

Milestone pushed to 1.9.5

comment:10 by Martin Sjölund, 9 years ago

Milestone: 1.9.51.10.0

Milestone renamed

comment:11 by Martin Sjölund, 8 years ago

Milestone: 1.10.01.11.0

Ticket retargeted after milestone closed

comment:12 by Martin Sjölund, 8 years ago

Milestone: 1.11.01.12.0

Milestone moved to 1.12.0 due to 1.11.0 already being released.

comment:13 by Francesco Casella, 7 years ago

Milestone: 1.12.0Future

The milestone of this ticket has been reassigned to "Future".

If you think the issue is still valid and relevant for you, please select milestone 1.13.0 for back-end, code generation and run-time issues, or 2.0.0 for front-end issues.

If you are aware that the problem is no longer present, please select the milestone corresponding to the version of OMC you used to check that, and set the status to "worksforme".

In both cases, a short informative comment would be welcome.

Note: See TracTickets for help on using tickets.