When I tried simulating a simple model in dymola (2015) using the sample
function:
model test_sample
Integer counter(start = 0);
algorithm
when sample(0, 0.25) then
counter:=counter + 1;
end when;
end test_sample;
I had to increase the number of intervals to a high number (ex. 5000) to be able to see the instantaneous change of counter
variable at sampling intervals. even with 5000 intervals, counter
starts to change its value at time 0.2496 instead of 0.25. this is not at all the case in OpenModelica (version 1.9.1+dev (r17879)) and even with 1 interval, the counter
variable changes its value at exactly 0.25. I am using Dassl in both platforms. is this a bug/feature?