Opened 14 years ago

Last modified 13 years ago

#1369 closed defect (fixed)

Evaluation Order for ZeroCrossings

Reported by: wbraun Owned by: wbraun
Priority: high Milestone:
Component: Version:
Keywords: Cc: wbraun, wbraun

Description

This model should fail at the event, but it doesn't.
{{{model A

Real h(start=0.1);
parameter Real c=1;

equation

der(h)=if h>0 then -c*sqrt(h) else 0; Incorrect
der(h)=if noEvent(h>0) then –c*sqrt(h) else 0; Correct

end A;}}}

Change History (1)

comment:1 Changed 14 years ago by wbraun

I think this issue is also related to Bug #1368. We can solve both issues by inline the ZEROCROSSING's in the functions: functionODE, functionDAE, etc. So that the ZEROCROSSING should not evaluated outside of this functions. I have started to try out a solutions for this.

Note: See TracTickets for help on using tickets.