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

Re: [TRNSYS-users] Logic Statements



The easiest way it to use the boolean functions - especially since ON
signals are 1's and OFF signals are zeroes.

For example, run the pump if it's after 8 am and before 8 pm.  The current
time is 1:20 in the afternoon for example.

EQUATIONS 4
XTIME=MOD(TIME,24) ---> Gives back 13.5
OK_LOWERTIME=GT(XTIME,8)  --> Gives back a value of 1
OK_UPPERTIME=LE(XTIME,20)  --> Gives back a value of 1
ON_PUMP=OK_LOWERTIME*OK_UPPERTIME  --> Only a 1 if both functions are 1

FYI You'll want to be somewhat careful with the ON/OFF functions being
equations - especially if they'll be used to control components.  You can
get in a non-convergence situation fairly easily.

Jeff



Jeff Thornton
President - TESS, LLC

22 North Carroll Street - Suite 370
Madison WI 53703 USA

Phone: 608-274-2577
Fax: 608-278-1475
E-mail: thornton@tess-inc.com
Web: www.tess-inc.com