<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta name="Microsoft Theme 2.00" content="rmnsque 111">
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Book Antiqua";
        panose-1:2 4 6 2 5 3 5 3 3 4;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Calibri","sans-serif";
        color:#663300;}
h1
        {mso-style-priority:9;
        mso-style-link:"Heading 1 Char";
        margin-top:24.0pt;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:0in;
        margin-bottom:.0001pt;
        page-break-after:avoid;
        font-size:16.0pt;
        font-family:"Calibri","sans-serif";
        color:#663300;}
h2
        {mso-style-priority:9;
        mso-style-link:"Heading 2 Char";
        margin-top:10.0pt;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:0in;
        margin-bottom:.0001pt;
        page-break-after:avoid;
        font-size:14.0pt;
        font-family:"Calibri","sans-serif";
        color:#663300;
        font-weight:normal;}
h3
        {mso-style-priority:9;
        mso-style-link:"Heading 3 Char";
        margin-top:10.0pt;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:0in;
        margin-bottom:.0001pt;
        page-break-after:avoid;
        font-size:13.0pt;
        font-family:"Calibri","sans-serif";
        color:#663300;
        font-weight:normal;}
h4
        {mso-style-priority:9;
        mso-style-link:"Heading 4 Char";
        margin-top:10.0pt;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:0in;
        margin-bottom:.0001pt;
        page-break-after:avoid;
        font-size:14.0pt;
        font-family:"Calibri","sans-serif";
        color:#663300;
        font-weight:normal;}
h5
        {mso-style-priority:9;
        mso-style-link:"Heading 5 Char";
        margin-top:10.0pt;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:0in;
        margin-bottom:.0001pt;
        page-break-after:avoid;
        font-size:13.0pt;
        font-family:"Calibri","sans-serif";
        color:#663300;
        font-weight:normal;}
h6
        {mso-style-priority:9;
        mso-style-link:"Heading 6 Char";
        margin-top:10.0pt;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:0in;
        margin-bottom:.0001pt;
        page-break-after:avoid;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:#663300;
        font-weight:normal;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#660000;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#999900;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:#1F497D;
        font-weight:normal;
        font-style:normal;}
span.Heading1Char
        {mso-style-name:"Heading 1 Char";
        mso-style-priority:9;
        mso-style-link:"Heading 1";
        font-family:"Book Antiqua","serif";
        color:#663300;
        font-weight:bold;}
span.Heading2Char
        {mso-style-name:"Heading 2 Char";
        mso-style-priority:9;
        mso-style-link:"Heading 2";
        font-family:"Book Antiqua","serif";
        color:#663300;}
span.Heading3Char
        {mso-style-name:"Heading 3 Char";
        mso-style-priority:9;
        mso-style-link:"Heading 3";
        font-family:"Times New Roman","serif";
        color:#663300;}
span.Heading4Char
        {mso-style-name:"Heading 4 Char";
        mso-style-priority:9;
        mso-style-link:"Heading 4";
        font-family:"Times New Roman","serif";
        color:#663300;}
span.Heading5Char
        {mso-style-name:"Heading 5 Char";
        mso-style-priority:9;
        mso-style-link:"Heading 5";
        font-family:"Times New Roman","serif";
        color:#663300;}
span.Heading6Char
        {mso-style-name:"Heading 6 Char";
        mso-style-priority:9;
        mso-style-link:"Heading 6";
        font-family:"Times New Roman","serif";
        color:#663300;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</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]-->
</head>

<body bgcolor=white background="cid:image001.jpg@01CADFA7.A4EABC60" lang=EN-US
link="#660000" vlink="#999900">
<img src="cid:image001.jpg@01CADFA7.A4EABC60"
v:src="cid:image001.jpg@01CADFA7.A4EABC60" v:shapes="_x0000_Mail" width=0
height=0 class=shape style='display:none;width:0;height:0'><!--[if gte mso 9]><xml>
 <v:background id="_x0000_s1025" o:bwmode="white" o:targetscreensize="800,600">
  <v:fill src="cid:image001.jpg@01CADFA7.A4EABC60" o:title="romtextb" type="frame" />
 </v:background></xml><![endif]-->

<div class=Section1>

<p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'>Hi
All, <o:p></o:p></span></p>

<p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'>I
am building my own control module in TRNSYS. This module is to do two things,
the first to calculate out the control signal vector for next few days
according to forecast data and then the control module will send each day
control signals to devices in the system. The problem is that the calculation
is done once but sending signals is done every day based. How to integrate the
two things into one modules?<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'>Can
module define as following:<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'>MyControl()<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'>{<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'> 
Static int calculate = 0;<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'> 
If (calculate == 0)<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'>    
{<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'>      
//TODO: calculation according to forecast data and get control signal vector
for next few days<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'>     
//……<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'>      
Calculate = 1;<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'>      
Return;<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'>    
}<o:p></o:p></span></p>

<p class=MsoNormal style='text-indent:6.0pt'><span style='font-family:"Calibri","sans-serif";
color:#1F497D'>Else if (calculate == 1)<o:p></o:p></span></p>

<p class=MsoNormal style='text-indent:6.0pt'><span style='font-family:"Calibri","sans-serif";
color:#1F497D'>{<o:p></o:p></span></p>

<p class=MsoNormal style='text-indent:6.0pt'><span style='font-family:"Calibri","sans-serif";
color:#1F497D'>  //TODO: send out control signals to devices<o:p></o:p></span></p>

<p class=MsoNormal style='text-indent:6.0pt'><span style='font-family:"Calibri","sans-serif";
color:#1F497D'> //……<o:p></o:p></span></p>

<p class=MsoNormal style='text-indent:6.0pt'><span style='font-family:"Calibri","sans-serif";
color:#1F497D'> Return;<o:p></o:p></span></p>

<p class=MsoNormal style='text-indent:6.0pt'><span style='font-family:"Calibri","sans-serif";
color:#1F497D'>}<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'>}<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'>Is
this idea reasonable in TRNSYS? Thanks.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'>Regards,<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'>qichao<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#4BACC6'>Email : </span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#C0504D'>QiChao.Zhu@sg.panasonic.com<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#4BACC6'>Tel: </span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#C0504D'>(65)6550 5324<o:p></o:p></span></p>

<p class=MsoNormal><o:p> </o:p></p>

</div>

</body>

</html>