<div dir="ltr"><div>Hi Sam,</div><div><br></div><div>I usually use type studio to make new component coding which is using Fortran language.</div><div>You can add any statement including "if statement" just like you make a program in Fortran.</div><div>Basically when you export to FORTRAN, the default coding is automatically created by TRNSYS. However at least, I need to make: declaration for output, equation I am going to use, and call the variable output. I don't know you have tried it or not. Hopefully It helps.</div><div><br></div><div>Regards,</div><div><br></div><div>Tri Ayodha Ajiwiguna<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 22, 2019 at 5:50 PM Sam Elyas via TRNSYS-users <<a href="mailto:trnsys-users@lists.onebuilding.org">trnsys-users@lists.onebuilding.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Dear all,<br>
<br>
I created a type that calculates the life-cycle cost of a project, but <br>
the calculations are performed uselessly at each time step.<br>
<br>
I need to add an "IF statement" that forces the type to perform the <br>
calculations at the last time step of the simulation.<br>
<br>
Any guidance ?<br>
<br>
P.S. The code is in Fortran<br>
<br>
Thank you<br>
<br>
_______________________________________________<br>
TRNSYS-users mailing list<br>
<a href="mailto:TRNSYS-users@lists.onebuilding.org" target="_blank">TRNSYS-users@lists.onebuilding.org</a><br>
<a href="http://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org" rel="noreferrer" target="_blank">http://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org</a><br>
</blockquote></div>