<html><head></head><body bgcolor="#FFFFFF"><div>Use the Equations card and create one input, called Tambient, and connect the appropriate output from the weather model to the Equations card.  Then define two equations:</div><div><br></div><div>Equations 2</div><div>On_Cool = GT(Tambient,18)</div><div>On_Heat LT(Tambient,14)</div><div><br>Then simply connect these two outputs to the heat pump model.  This approach works well if Tambient is unaffected by the heat pump (as it is in this case).  If Tambient was instead the room temperature then you should use a thermostat model to avoid iteration issues.</div><div><br></div><div>Be aware though that this equation based approach will make the heat pumps run constantly whenever the ambient temperature is above 18 or below 14.  If you want to only allow operation of the heat pumps when it's above 18 or below 14 then you'll have to use a thermostat model and an Equations card.  In that case you would create three inputs: Tambient, WantCool, and WantHeat.  You would connect the thermostat to the building and then the thermostat outputs to WantCool and WantHeat equation inputs.  Then your two equations would change to:</div><div><br></div><div>Equations 2</div><div>On_Cool=GT(Tambient,18)*WantCool</div><div>On_Heat=LT(Tambient,14)*WantHeat</div><div><br></div><div>Jeff</div><div><br>On Feb 13, 2014, at 7:19 AM, metkell yebiyo <<a href="mailto:metkell@yahoo.com">metkell@yahoo.com</a>> wrote:<br><br></div><div></div><blockquote type="cite"><div><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:12pt"><div>Dear TRNSYS users,</div><div><br></div><div style="color: rgb(0, 0, 0); font-size: 16.363636016845703px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;">Could you anyone tell me if it is possible to write an if statement in the equation box,</div><div style="color: rgb(0, 0, 0); font-size: 16.363636016845703px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;">I am trying to send a control signal based on the outside temperature, if outside air temperature is</div><div style="color: rgb(0, 0, 0); font-size: 16.363636016845703px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida
 Grande', sans-serif; background-color: transparent; font-style: normal;">greater than 18 deg C then the heat pump would run in cooling mode else if the outside <span style="font-size: 12pt;">air temperature is </span><span style="font-size: 12pt; background-color: transparent;">less than 14 deg C then </span><span style="font-size: 12pt;"> </span><span style="font-size: 12pt;">the heat pump would run in heating mode.</span></div><div style="color: rgb(0, 0, 0); font-size: 12pt; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;"><span style="font-size: 12pt;"><br></span></div><div style="color: rgb(0, 0, 0); font-size: 16.363636016845703px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;"><span style="font-size: 12pt;">Any suggestions would be
 appreciated thank you very much.</span></div><div style="color: rgb(0, 0, 0); font-size: 12pt; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;"><span style="font-size: 12pt;"><br></span></div><div style="color: rgb(0, 0, 0); font-size: 16.363636016845703px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;"><span style="font-size: 12pt;"><br></span></div><div style="color: rgb(0, 0, 0); font-size: 16.363636016845703px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;"><span style="font-size: 12pt;">Regards,</span></div><div style="color: rgb(0, 0, 0); font-size: 12pt; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
 background-color: transparent; font-style: normal;"><span style="font-size: 12pt;">Metkel</span></div><div style="color: rgb(0, 0, 0); font-size: 12pt; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;"><span style="font-size: 12pt;"><br></span></div><div class="MsoNormal">Metkel Yebiyo BEng (Hons), MSc<o:p></o:p></div><div class="MsoNormal">CEREB PhD Researcher - Ground Source Heat Pumps <o:p></o:p></div><div class="MsoNormal">Room T615 <o:p></o:p></div><div class="MsoNormal">Department of Urban Engineering <o:p></o:p></div><div class="MsoNormal">Faculty of Engineering, Science and the Built Environment<o:p></o:p></div><div class="MsoNormal">London South Bank University, <o:p></o:p></div><div class="MsoNormal">103 Borough Road,<o:p></o:p></div><div class="MsoNormal">London SE1 0AA<o:p></o:p></div><div class="MsoNormal">Tel: +44 (0)20 7815
 7639<o:p></o:p></div><div style="background-color: transparent;"><span style="font-size: 12pt;">

















</span></div><div class="MsoNormal">E: <a href="mailto:yebiyom@lsbu.ac.uk">yebiyom@lsbu.ac.uk</a><o:p></o:p></div></div></div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>TRNSYS-users mailing list</span><br><span><a href="mailto:TRNSYS-users@cae.wisc.edu">TRNSYS-users@cae.wisc.edu</a></span><br><span><a href="https://mailman.cae.wisc.edu/listinfo/trnsys-users">https://mailman.cae.wisc.edu/listinfo/trnsys-users</a></span><br></div></blockquote></body></html>