#2363 closed defect (fixed)
smooth operator is removed for order 0
Reported by: | Willi Braun | Owned by: | Per Östlund |
---|---|---|---|
Priority: | high | Milestone: | 1.9.0 |
Component: | Frontend | Version: | trunk |
Keywords: | Cc: | Niklas Worschech |
Description
The smooth operator is removed in the frontend, if the order is 0.
It should decide in the backend if such expressions should generate
zero-crossing or not.
For example
loadString(" model A Real u = sin(time); output Real y; equation y = smooth(0, if u > 0.7 then 0.7 else if u < 0.2 then 0.2 else u); end A; "); getErrorString(); instantiateModel(A);
results in
true "" "class A Real u = sin(time); output Real y; equation y = if u > 0.7 then 0.7 else if u < 0.2 then 0.2 else u; end A; "
Change History (3)
comment:1 by , 11 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:3 by , 11 years ago
Adrian, I think that's okay, the model has now fewer events and so resolution of evaluation is a bit different, but the basic trajectories are equal. May be we need an engineer, who can decide such things.
Note:
See TracTickets
for help on using tickets.
Fixed in r17388.
Note that Modelica.Electrical.Analog.Examples.SimpleTriacCircuit give small differences compared with Dymola (i used the OpenModelica result file for now).
Willi, please investigate this.