Skip to content

Commit

Permalink
enhanced documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
AHaumer committed Dec 14, 2022
1 parent c80a86a commit c02e180
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Modelica/Blocks/Sources.mo
Expand Up @@ -768,7 +768,9 @@ by a falling exponential signal:
count := integer((time - startTime)/period);
T_start := startTime + count*period;
equation
//The following formulation causes a state event
//when integer((time - startTime)/period) > pre(count) then
//A formulation causing a time event is more efficient:
when time >= (pre(count) + 1)*period + startTime then
count = pre(count) + 1;
T_start = time;
Expand Down Expand Up @@ -824,7 +826,9 @@ The Real output y is a pulse signal:
count := integer((time - startTime)/period);
T_start := startTime + count*period;
equation
//The following formulation causes a state event
//when integer((time - startTime)/period) > pre(count) then
//A formulation causing a time event is more efficient:
when time >= (pre(count) + 1)*period + startTime then
count = pre(count) + 1;
T_start = time;
Expand Down Expand Up @@ -890,7 +894,9 @@ The Real output y is a saw tooth signal:
count := integer((time - startTime)/period);
T_start := startTime + count*period;
equation
//The following formulation causes a state event
//when integer((time - startTime)/period) > pre(count) then
//A formulation causing a time event is more efficient:
when time >= (pre(count) + 1)*period + startTime then
count = pre(count) + 1;
T_start = time;
Expand Down

0 comments on commit c02e180

Please sign in to comment.