<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Pauline,<br>
      There are a few Types that might help you. The first is a moving
    average component (either Type84 or Type939) which calculates the
    average value of an input over a certain period of time (for
    instance over the last 4 hours). The second is the "input value
    delay" (Type93 or Type661 in the TESS Libs). These components hold
    on to an input value for a desired number of timesteps before
    "releasing" it as an output. There are also some controllers in the
    TESS Libraries that have "lock-outs" (the controller must stay on or
    off for a certain time after changing state) and another that will
    calculate run-time (the time that has elapsed since its input
    changed state.)<br>
    Best,<br>
     David<br>
    <br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 4/24/2013 08:26, Pauline GELIN
      wrote:<br>
    </div>
    <blockquote
cite="mid:11E83A53757D4E42BAB9B7808BC3D143AF00707E16@VEV-MES1.KATENE.local"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <meta name="Generator" content="Microsoft Word 14 (filtered
        medium)">
      <!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]-->
      <style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Comic Sans MS";
        panose-1:3 15 7 2 3 3 2 2 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"Préformaté HTML Car";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Texte de bulles Car";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";
        color:black;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
span.PrformatHTMLCar
        {mso-style-name:"Préformaté HTML Car";
        mso-style-priority:99;
        mso-style-link:"Préformaté HTML";
        font-family:Consolas;
        color:black;}
span.TextedebullesCar
        {mso-style-name:"Texte de bulles Car";
        mso-style-priority:99;
        mso-style-link:"Texte de bulles";
        font-family:"Tahoma","sans-serif";
        mso-fareast-language:FR;}
span.Preacute1
        {mso-style-name:"Pr&eacute1\,format&eacute1\,HTML Car1";
        mso-style-priority:99;
        mso-style-link:"Pr&eacute\,format&eacute\,HTML";
        font-family:Consolas;
        color:black;}
p.Preacute, li.Preacute, div.Preacute
        {mso-style-name:"Pr&eacute\,format&eacute\,HTML";
        mso-style-link:"Pr&eacute2\,format&eacute2\,HTML Car2";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
span.Preacute2
        {mso-style-name:"Pr&eacute2\,format&eacute2\,HTML Car2";
        mso-style-priority:99;
        mso-style-link:"Pr&eacute\,format&eacute\,HTML";
        font-family:Consolas;
        color:black;}
span.il
        {mso-style-name:il;}
span.EmailStyle26
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.hps
        {mso-style-name:hps;}
span.shorttext
        {mso-style-name:short_text;}
span.EmailStyle29
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle30
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle31
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle32
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle33
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle34
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle35
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext">Hello,
            <o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"
            lang="EN-US">I would like to modelize a manual night
            ventilation. For that I need to keep the value of
            temperature for the time X (for example 17 pm) and compare
            this value with a set temperature during a given period (for
            example a night). <o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"
            lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"
            lang="EN-US">I don’t know to keep a value in a variable
            during a given period. Could anyone help me? <o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"
            lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"
            lang="EN-US">I began with the following formulas but  when
            the condition of the first  variable is not checked it
            returns 0 and the third variable doesn’t return  what I want
            :<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"
            lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:"Calibri","sans-serif";color:windowtext"
            lang="EN-US">T17h = eql(mod(TIME,24),17)*temperature_zone10<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:"Calibri","sans-serif";color:windowtext"
            lang="EN-US">periode =
            or(lt(mod(TIME,24),9),gt(mod(TIME,24),17))<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:"Calibri","sans-serif";color:windowtext">vnat
            = gt(T17h,24)*periode*2<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"
            lang="EN-US">Thanks a lot for your help. <o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"
            lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"
            lang="EN-US">Best Regards,<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
            lang="EN-US"><o:p> </o:p></span></p>
        <div>
          <p class="MsoNormal"><b><span
style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#1F497D"
                lang="EN-US">Pauline GELIN<o:p></o:p></span></b></p>
          <p class="MsoNormal"><b><span
style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#1F497D"
                lang="EN-US">Ingénieur Conception environnementale<o:p></o:p></span></b></p>
          <p class="MsoNormal"><span
              style="font-size:11.0pt;font-family:"Comic Sans
              MS";color:#1F497D" lang="EN-US"><o:p> </o:p></span></p>
          <p class="MsoNormal"><span
              style="font-size:11.0pt;font-family:"Comic Sans
              MS";color:#1F497D"><img id="Image_x0020_1"
                src="cid:part1.04080907.02000609@tess-inc.com"
                alt="cid:image004.jpg@01CE062A.F4C2C000" height="52"
                width="79"><o:p></o:p></span></p>
          <p class="MsoNormal"><b><span
style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#1F497D"><o:p> </o:p></span></b></p>
          <p class="MsoNormal"><span
style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#1F497D"><img
                id="Image_x0020_2"
                src="cid:part2.00020203.04090302@tess-inc.com"
                alt="cid:image006.jpg@01CE062A.F4C2C000" height="13"
                width="81"><o:p></o:p></span></p>
          <p class="MsoNormal"><span
style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#1F497D">10
              avenue des canuts<o:p></o:p></span></p>
          <p class="MsoNormal"><span
style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#1F497D">69120
              VAULX EN VELIN<o:p></o:p></span></p>
          <p class="MsoNormal"><span
style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#1F497D">T
              : 04.37.45.33.33  <o:p></o:p></span></p>
          <p class="MsoNormal"><span
style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
          <p class="MsoNormal"><b><span
style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#1F497D">Ligne
                directe : 04.37.45.33.47<o:p></o:p></span></b></p>
          <p class="MsoNormal"><b><span
style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#1F497D"><o:p> </o:p></span></b></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><a
                moz-do-not-send="true" href="www.katene.coop"><b><span
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D">www.katene.coop</span></b></a></span><b><span
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D"><o:p></o:p></span></b></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><a
                moz-do-not-send="true"
                href="http://www.quadriplus-groupe.com"><b><span
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D">www.quadriplus-groupe.com</span></b></a></span><b><span
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D"><o:p></o:p></span></b></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><a
                moz-do-not-send="true" href="http://www.woopa.coop"><b><span
                    style="color:#1F497D">www.woopa.coop</span></b></a></span><b><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">
                <o:p></o:p></span></b></p>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
TRNSYS-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:TRNSYS-users@cae.wisc.edu">TRNSYS-users@cae.wisc.edu</a>
<a class="moz-txt-link-freetext" href="https://mailman.cae.wisc.edu/listinfo/trnsys-users">https://mailman.cae.wisc.edu/listinfo/trnsys-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
***************************
David BRADLEY
Principal
Thermal Energy Systems Specialists, LLC
22 North Carroll Street - suite 370
Madison, WI  53703 USA

P:+1.608.274.2577
F:+1.608.278.1475
<a class="moz-txt-link-abbreviated" href="mailto:d.bradley@tess-inc.com">d.bradley@tess-inc.com</a>

<a class="moz-txt-link-freetext" href="http://www.tess-inc.com">http://www.tess-inc.com</a>
<a class="moz-txt-link-freetext" href="http://www.trnsys.com">http://www.trnsys.com</a></pre>
  </body>
</html>