From a66c9e086393e6a6cd51a980eeae4a1aca2bc9c7 Mon Sep 17 00:00:00 2001 From: Quentin Lambert Date: Tue, 31 Oct 2023 13:30:33 +0100 Subject: [PATCH] Remove real relation in non-discrete-time controlled if-statement. --- Modelica/Blocks/Sources.mo | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modelica/Blocks/Sources.mo b/Modelica/Blocks/Sources.mo index 1a6bdd6181..017a0c944d 100644 --- a/Modelica/Blocks/Sources.mo +++ b/Modelica/Blocks/Sources.mo @@ -1443,8 +1443,8 @@ a flange according to a given acceleration. b := b - a*shiftTimeScaled; end getInterpolationCoefficients; algorithm - if noEvent(size(table, 1) > 1) then - assert(not (table[1, 1] > 0.0 or table[1, 1] < 0.0), "The first point in time has to be set to 0, but is table[1,1] = " + String(table[1, 1])); + if size(table, 1) > 1 then + assert(noEvent(not (table[1, 1] > 0.0 or table[1, 1] < 0.0)), "The first point in time has to be set to 0, but is table[1,1] = " + String(table[1, 1])); end if; when {time >= pre(nextEvent),initial()} then (a,b,nextEventScaled,last) := getInterpolationCoefficients(