Skip to content

Commit

Permalink
implemented recognition of startTime (see modelica#4035)
Browse files Browse the repository at this point in the history
  • Loading branch information
AHaumer committed Sep 21, 2022
1 parent f325ed3 commit 023175c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Modelica/Blocks/Discrete.mo
Expand Up @@ -44,7 +44,7 @@ via parameter <strong>samplePeriod</strong>.

equation
when {sampleTrigger, initial()} then
ySample = u;
ySample = if time>=startTime then u else pre(ySample);
end when;
/* Define y=ySample with an infinitesimal delay to break potential
algebraic loops if both the continuous and the discrete part have
Expand Down

0 comments on commit 023175c

Please sign in to comment.