Opened 7 years ago
Closed 7 years ago
#4762 closed defect (fixed)
Inconsistent behaviour of asserts when using the NF
Reported by: | Francesco Casella | Owned by: | Per Östlund |
---|---|---|---|
Priority: | high | Milestone: | 2.0.0 |
Component: | New Instantiation | Version: | |
Keywords: | Cc: |
Description
Please consider Modelica.Electrical.Analog.Examples.OpAmps.Multivibrator. The following error is reported
assert | warning | The following assertion has been violated at time 0.000250 | | | | 1.0 + r.alpha * (r.T - r.T_ref) >= 1e-15
The flattened model contains the following declaration
parameter Real r.alpha(quantity = "LinearTemperatureCoefficient", unit = "1/K") = 0.0 "Temperature coefficient of resistance (R_actual = R*(1 + alpha*(T_heatPort - T_ref))";
Now, if r.alpha = 0
then the expression inside the assert statement should be equal to 1.0, which is definitely greater than 1e-15.
Why is this assertion triggered?
Note:
See TracTickets
for help on using tickets.
This issue is no longer showing up, although the model breaks later during the simulation due to a system singularity.