Opened 18 years ago
Last modified 18 years ago
#101 closed defect (fixed)
Boolean events are not generated correctly (zero crossing problem?)
Reported by: | Adrian Pop | Owned by: | Adrian Pop |
---|---|---|---|
Priority: | critical | Milestone: | |
Component: | Version: | ||
Keywords: | Cc: | Adrian Pop, haklu |
Description
Note:
See TracTickets
for help on using tickets.
class Test_Timer
Boolean booleanStepy;
parameter Real booleanStepstartTime = 6 "Time instant of step start";
parameter Boolean booleanStepstartValue = false "Output before startTime";
Boolean timer_intu;
Real timer_inty;
Boolean timer_intu2(start = false);
discrete Real timer_intentryTime "Time instant when u became true";
Boolean fin_timer(start = false);
initial equation
equation
end Test_Timer;
In this model the fin_timer is always 0 (zero), even if it should be true
when time is 12. However, if you change the equation:
with equation:
or with WRONG equation which should actually report an error:
everything works perfectly.
Any idea why this happens?
I tried to reproduce this bug with simpler models, but I can't.
Seems is a problem with zero crossing that happens only in some
cases where there is a combination of when and ifs.
Regards,
Adrian Pop/