[TRNSYS-users] if elseif else statement in equations
Böttner, Jan
Jan.Boettner at dbfz.de
Thu Apr 7 05:00:03 PDT 2022
Hey everyone,
i found this entry about implementing if else statements: http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/2013-February/024732.html
I'm wondering if ist possible to extend this to an if elseif else statement.
I want the output X to be X=1 if the temperature is t<5, X=2 for t>=5.and.t<15 and X=3 for t>=15.
I tried this, but it's wrong and doesnt work:
X = GT(T,GT(T,15)*S+(1-GT(T,15))*U)*U+(1-GT(T,5))*W with S=3,U=2and W=1.
If anyone knows a solution i'd appreciate it.
Best regards
Jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20220407/87e31d71/attachment.html>
More information about the TRNSYS-users
mailing list