[TRNSYS-users] IF-Statement

Mehdi Shahrestani mahdishahrestani at yahoo.com
Mon Jan 17 16:29:17 PST 2011


Andrey 
If you write

S=EQL(a,0)+(GT(a,0)+LT(a,0))*b

It does the job. 

It means 

If a=0 
	S=1
Else 
	S=b
End

You can also have a look on page 25 of manual vol.6.
Regards
Mehdi



-----Original Message-----
From: trnsys-users-bounces at cae.wisc.edu
[mailto:trnsys-users-bounces at cae.wisc.edu] On Behalf Of Andrey Vyshnepolsky
Sent: 17 January 2011 17:33
To: TRNSYS USERS
Subject: [TRNSYS-users] IF-Statement

Hello,

is it possible to construct an IF-Statement in Trnsys? I want it to use
together with the Equation Component. It shall work like that: if the input
value is not zero use the calculated output value else set the output value
to one.

Regards,

Andrey
_______________________________________________
TRNSYS-users mailing list
TRNSYS-users at cae.wisc.edu
https://mailman.cae.wisc.edu/listinfo/trnsys-users




More information about the TRNSYS-users mailing list