[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TRNSYS-users] (no subject)



Hsein,

If statement is not allowed.
But you can use instead x variable as a flag for the situation.
Ex.
x=1 if true; then y=5
x=0 if false; then y=10

Then it can be written in Equ as follows

y=5*eql(x,0) +10*eql(x,1)
Similar way is valid for <,> ,=<,=>,~=
You can use "!" To add Comment

BR,
Ayman

From: Hsein Moussawi
Sent: ‎11/‎21/‎2015 16:31
To: trnsys-users@lists.onebuilding.org
Subject: [TRNSYS-users] (no subject)

Hello there,
I was wondering if there is certain language for writing expressions in the calculator component inside a trnsys project.
I am trying to make "if...otherwise" expressions for example.
Is this possible?

Thanks