﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
3498	Wrong generation of base partitions	Rüdiger Franke	Lennart Ochel	"The code generated for the following model does not compile due to the attempt to access the not existing previous(dt). 
{{{#!mo
model SID ""Single Integrator Discrete-time""
  parameter Real dt = 0.1 ""sample time"" annotation(Evaluate=true);
  parameter Real p = 1 ""gain for input"";
  parameter Real y_start = 0 ""start value for state"";
  Real xd(start = y_start);
  input Real u(start = -2);
  output Real y;
equation
  when Clock(dt) then
    xd = previous(xd) + p * u * dt;
  end when;
  y = hold(previous(xd));
end SID;
}}}
The sample rate dt should be constant. Instead `omc -s -d=dumpSynchronous SID.mo` gives
{{{
Base clocks (1)
========================================
1: Clock(previous(dt))[1]
}}}"	defect	reopened	high	Future	Backend			Cpp run-time	
