﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
4312	Discrete event example does not work	Jan Kokert	somebody	"Hi, I'm struggeling with an example from the Modelica Tutorial ([https://www.modelica.org/documents/ModelicaRationale13norev.pdf]) on page 29:
{{{
block DiscreteStateSpace2 
parameter Real a, b, c, d;
parameter Real Period=1;
input Real u;
discrete output Real y;
discrete Real x, NextSampling(start=0); 

equation
when time >= pre(NextSampling) then 
  x = a*pre(x) + b*u;
  y = c*pre(x) + d*u;
  NextSampling = time + Period;
end when;
end DiscreteStateSpace2;
}}}

{{{NextSampling}}}  will be zero for all times. Is this a bug or is the code wrong? Replacing equation with algorithm didn't change the behavior."	defect	closed	normal	Future	*unknown*		invalid	Discrete event example	
