﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
4391	Weird behaviour with event detection	Francesco Casella	somebody	"Please consider the following test model
{{{
model Test
  Real a, b;
  discrete Real flag;
algorithm
  when a > 0 and b > 0 then
    flag := 1;
  end when;
initial algorithm
  if (a > 0) then
    flag := -1;
  end if;
equation
  a = 1+time;
  b = if time < (-1) then -1 else time;
annotation(experiment(StartTime=-2, StopTime=2));
end Test;
}}}

When simulating, the variable {{{flag}}} starts at -1, but only switches to +1 when time = 2, as if the event at time 0 was not caught.

Why does this happen?"	defect	new	high		Run-time				andrea.bartolini@…
