<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
Cramer,<br><br>Try inserting an equation. Create an output variable called "signal" or something. This variable will take on the value 1 for when the window is allowed to be opened; 0 for when it is not. Then, make signal equal to "and(ge(mod(time,24),8),le(mod(time,24),21))". Basically, this is saying: if the time is greater than or equal to 8 AND less than or equal to 21, then output the value 1, otherwise it takes on zero. If the type you're using uses an input that is a control signal, then this equation can be directly linked to it. I confirmed that the equation works by connecting the equation to an online plotter. Hope that helps. <br><br>Liam O'Brien<br><br><hr>Date: Fri, 12 Sep 2008 19:01:55 +0200<br>From: silkworth@transsolar.com<br>To: trnsys-users@engr.wisc.edu<br>Subject: [TRNSYS-users] changing value only under certain conditions<br><br>
<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML">
<div><font face="Arial" size="2"><span class="EC_031255516-12092008">Hi
All,</span></font></div>
<div><font face="Arial" size="2"><span class="EC_031255516-12092008"></span></font> </div>
<div><font face="Arial" size="2"><span class="EC_031255516-12092008">I'm trying to model
manually-operated windows, ie that can only be opened or closed when
someone is around to do it. Thus, I need a way to modify a variable only at
certain times - for example, so I can change my airchange rate
accroding to outdoor temp **only if** hr>8 and hr<21. I know of type
93 (input value recall), but can't think of how this helps. I also know about
chaining GT(), LT(), etc, to form logical operations, but everything I can think
of would assign a new value at each timestep. I need more of a real
if(condition)-then(action), but I know these don't exist in trnsys. Any
thoughts?</span></font></div>
<div><font face="Arial" size="2"><span class="EC_031255516-12092008"></span></font> </div>
<div><font face="Arial" size="2"><span class="EC_031255516-12092008">Thanks,</span></font></div>
<div><font face="Arial" size="2"><span class="EC_031255516-12092008">Cramer</span></font></div>
<div> </div>
<div align="left">
<p style="" align="left"><b><font face="Arial" size="1"><span style="font-weight: bold; font-size: 8pt; font-family: Arial;">J. Cramer
Silkworth</span></font></b></p>
<p style=""><b><font face="Arial" size="1"><span style="font-weight: bold; font-size: 8pt; font-family: Arial;">Transsolar Climate
Engineering</span></font></b><b><font size="1"><span style="font-weight: bold; font-size: 8pt;"></span></font></b></p>
<p style=""><font face="Arial" size="1"><span style="font-size: 8pt; font-family: Arial;">Technical consulting for energy
efficiency and environmental quality in buildings.</span></font><font size="1"><span style="font-size: 8pt;"></span></font></p>
<p style=""><font face="Arial" size="1"><span style="font-size: 8pt; font-family: Arial;">145 Hudson
Street</span></font></p>
<p style=""><font face="Arial" size="1"><span style="font-size: 8pt; font-family: Arial;">Suite 402</span></font><font size="1"><span style="font-size: 8pt;"></span></font></p>
<p style=""><font face="Arial" size="1"><span style="font-size: 8pt; font-family: Arial;">New York, NY 10013</span></font><font size="1"><span style="font-size: 8pt;"></span></font></p>
<p style=""><font face="Arial" size="1"><span style="font-size: 8pt; font-family: Arial;">Office: 212-219-2255</span></font></p>
<p style=""><font face="Arial" size="1"><span style="font-size: 8pt; font-family: Arial;">Mobile: 347-283-2547</span></font><font size="1"><span style="font-size: 8pt;"></span></font></p>
<p style=""><font face="Arial" size="1"><span style="font-size: 8pt; font-family: Arial;"><a title="mailto:silkworth@transsolar.com" href="mailto:silkworth@transsolar.com">silkworth@transsolar.com</a></span></font></p></div>
<div> </div>
<br /><hr /> <a href='' target='_new'></a></body>
</html>