modelica / ModelicaSpecification

Specification of the Modelica Language
https://specification.modelica.org
Creative Commons Attribution Share Alike 4.0 International
98 stars 42 forks source link

Specification of delay() #2953

Open AHaumer opened 3 years ago

AHaumer commented 3 years ago

Chapter 3.7.2.1 states: "For simplicity, this is not supported because the minimum delay time has to be given as additional argument to be fixed at compile time." There seems to be a typo: "give" should be replaced by "given". Furthermore - excuse my limited understanding - I can't see how an event has to be delayed. Assume we have a a step signal at time=0.1, and apply the delay operator with a delay of 0.1, does the result reproduce a step at time=0.2 or could it be a steep ramp? Some (rare) models rely on delay(), e.g. Modelica.Electrical.Analog.Lines.TLine. Results of test examples should be identical when using different tools.

model TestDelay
  Modelica.Blocks.Sources.Step step(startTime=0.1);
  Modelica.Blocks.Nonlinear.FixedDelay fixedDelay(delayTime=0.1);
equation 
  connect(step.y, fixedDelay.u);
end TestDelay;
henrikt-ma commented 3 years ago

Generalizing delay to discrete-time signals – both Real and of other types – would be an interesting new feature. Is this what you are suggesting?