Skip to content

Commit

Permalink
Added one sample period "delay" to avoid executing twice at t=0
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@24738 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
bernhard-thiele committed Feb 24, 2015
1 parent 1d1e10b commit 6f47d5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Compiler/BackEnd/StateMachineFeatures.mo
Expand Up @@ -171,7 +171,7 @@ uniontype TransitionType
end TransitionType;

constant String SMS_PRE = "smOf" "prefix for crefs of fresh State Machine Semantics variables/knowns";
constant Boolean DEBUG_SMDUMP = false "enable verbose stdout debug information during elaboration";
constant Boolean DEBUG_SMDUMP = true "enable verbose stdout debug information during elaboration";

public function stateMachineElab
"Elaborate state machines and transform them in data-flow equations."
Expand Down Expand Up @@ -882,7 +882,7 @@ algorithm

// Hack: Wrap everything in when equations
// FIXME: Guess there is a reference mechanism and maybe I shouldn't hardcode "1" as index? (needs also adaption in wrapInWhenhack)
timeEvent := BackendDAE.SAMPLE_TIME_EVENT(1, DAE.RCONST(0), DAE.RCONST(samplingTime));
timeEvent := BackendDAE.SAMPLE_TIME_EVENT(1, DAE.RCONST(samplingTime), DAE.RCONST(samplingTime));
wrappedEqs := List.map1(eqs, wrapInWhenHack, samplingTime);

systOut := List.fold(vars, BackendVariable.addVarDAE, systIn);
Expand Down

0 comments on commit 6f47d5a

Please sign in to comment.