Skip to content

Commit

Permalink
Remove useless condition
Browse files Browse the repository at this point in the history
  • Loading branch information
lochel committed Sep 8, 2016
1 parent 5ac7218 commit 6d333d4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Compiler/Template/CodegenFMU.tpl
Expand Up @@ -1488,11 +1488,11 @@ case FMIIMPORT(fmiInfo=INFO(__),fmiExperimentAnnotation=EXPERIMENTANNOTATION(__)
algorithm
<%if intGt(listLength(fmiInfo.fmiNumberOfEventIndicators), 0) then
<<
when {(<%fmiInfo.fmiNumberOfEventIndicators |> eventIndicator => "change(fmi_z_positive["+eventIndicator+"])" ;separator=" or "%>) and not initial(),triggerDSSEvent > flowStatesInputs, nextEventTime < time, terminal()} then
when {<%fmiInfo.fmiNumberOfEventIndicators |> eventIndicator => "change(fmi_z_positive["+eventIndicator+"])" ;separator=" or "%>, triggerDSSEvent > flowStatesInputs, nextEventTime < time, terminal()} then
>>
else
<<
when {not initial(), triggerDSSEvent > flowStatesInputs, nextEventTime < time, terminal()} then
when {triggerDSSEvent > flowStatesInputs, nextEventTime < time, terminal()} then
>>
%>
newStatesAvailable := fmi1Functions.fmi1EventUpdate(fmi1me, intermediateResults);
Expand Down Expand Up @@ -1844,11 +1844,11 @@ case FMIIMPORT(fmiInfo=INFO(__),fmiExperimentAnnotation=EXPERIMENTANNOTATION(__)
algorithm
<%if intGt(listLength(fmiInfo.fmiNumberOfEventIndicators), 0) then
<<
when {(<%fmiInfo.fmiNumberOfEventIndicators |> eventIndicator => "change(fmi_z_positive["+eventIndicator+"])" ;separator=" or "%>) and not initial(),triggerDSSEvent > flowStatesInputs, pre(nextEventTime) < time, terminal()} then
when {<%fmiInfo.fmiNumberOfEventIndicators |> eventIndicator => "change(fmi_z_positive["+eventIndicator+"])" ;separator=" or "%>, triggerDSSEvent > flowStatesInputs, pre(nextEventTime) < time, terminal()} then
>>
else
<<
when {not initial(), triggerDSSEvent > flowStatesInputs, pre(nextEventTime) < time, terminal()} then
when {triggerDSSEvent > flowStatesInputs, pre(nextEventTime) < time, terminal()} then
>>
%>
newStatesAvailable := fmi2Functions.fmi2EventUpdate(fmi2me);
Expand Down

0 comments on commit 6d333d4

Please sign in to comment.