﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
6212	First tick of shiftsample is missing	p.van.der.hulst@…	Andreas Heuermann	"Hi,

When shifting a clock with shiftSample (as explained in Fritzson, Principles of object-oriented modeling..... 2nd ed., page 709/710) the first tick of the shifted clock y1 (expected at 0.1sec) is missing. 
Below is an example model derived from Fritzson's example. I added 'Count1' and 'Count2' variables to reveal the actual sampling moment, since sampling instances are not clear from the OMedit plots.

{{{
model test3

  Clock u1 = Clock(3,10);
  Clock y1=shiftSample(u1,1,3);

  Real Count1(start=2);
  Real Count2(start=2);

initial equation
equation
  Count1 = sample(time,u1);
  Count2 = sample(time,y1);

end test3;
}}}
The first update of Count2 is at 0.4 sec instead of at 0.1 sec.
I use OpenModelica 1.16.0 (this does not seem to be an option in the drop-down list below).

Best regards,
Paul van der Hulst

PS. Note that in dymola I ''do'' get the first sample at 0.01sec."	defect	assigned	high		OMSimulator			shiftsample	
