<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Sam,<br>
I would recommend that you add your Type to the IVF TRNBuild
solution and run your simulation from IVF so that you can step
through your component one line at a time. Certainly from the code
except that you included, the setStorageSize() routine should be
getting called. The question is whether that section of code is
being correctly executed at the appropriate time. <br>
<br>
I might also mention that you are using a very out of date coding
standard. This will still work but more recent versions of TRNSYS
export an updated Type template that contains a lot more access
functions (which are intended to be a lot more intuitive to use than
all the codes associated with the INFO() array.<br>
<br>
Lastly, if you need to know the solution at the previous timestep
to solve the current time step, remember that you need to reserve
twice as many spots in the storage structure. In one spot, you will
have the solution from the last timestep. In the other, you will
keep your best guess of the current solution. At the end of the
timestep when all the iterations are complete (and when INFO(13)
> 0 in the coding standard that you are using) ten you need to
swap the "current solution" into the "last timestep" solution spot
in the storage structure. In the newer coding standard, you can
instead reserve what are called "dynamic" storage spots that will
automatically update at the end of the timestep. Look in the
07-Programmer's Guide from 17.1 or later for details on the newer
coding standard.<br>
Best,<br>
David<br>
<br>
<br>
<div class="moz-cite-prefix">On 4/19/2013 17:06, Currie, Sam R
wrote:<br>
</div>
<blockquote
cite="mid:FBB740467A55F746812B61E0D099CFB9116ED0A4@WPVEXCMBX03.purdue.lcl"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
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;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
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">Hello,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am currently building a component for
TRNSYS 17 that requires the solution at the previous time step
to solve for the current time step. The .dll’s compile fine
but I am getting the following error when attempting to run it
in Simulation Studio:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">(From the lst file)<o:p></o:p></p>
<p class="MsoNormal">TRNSYS Message 408 : The setStorageSize
subroutine was not called to set the number of storage
locations required before the setStorageVars routine was
called.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">My FORTRAN code for my first call
manipulations is as follows:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">! Perform Initialization Manipulations<o:p></o:p></p>
<p class="MsoNormal">IF (INFO(7) .EQ. -1) THEN<o:p></o:p></p>
<p class="MsoNormal"> ! Retrieve unit and type #:<o:p></o:p></p>
<p class="MsoNormal"> IUNIT = INFO(1)<o:p></o:p></p>
<p class="MsoNormal"> ITYPE = INFO(2)<o:p></o:p></p>
<p class="MsoNormal"> ! Reserve space in the global OUT
array:<o:p></o:p></p>
<p class="MsoNormal"> INFO(6) = NO<o:p></o:p></p>
<p class="MsoNormal"> ! This type should be called at
each iteration<o:p></o:p></p>
<p class="MsoNormal"> ! whether or not its inputs change:<o:p></o:p></p>
<p class="MsoNormal"> INFO(9) = 1<o:p></o:p></p>
<p class="MsoNormal"> ! Call Type Check subroutine:<o:p></o:p></p>
<p class="MsoNormal"> CALL TYPECK(1, INFO, NI, NP, ND)<o:p></o:p></p>
<p class="MsoNormal"> ! Call input/output check
subroutine:<o:p></o:p></p>
<p class="MsoNormal"> CALL RCHECK(INFO, YCHECK, OCHECK)<o:p></o:p></p>
<p class="MsoNormal"> ! Reserve storage space:<o:p></o:p></p>
<p class="MsoNormal"> CALL setStorageSize(NS, INFO)<o:p></o:p></p>
<p class="MsoNormal"> ! Return to calling program:<o:p></o:p></p>
<p class="MsoNormal"> RETURN 1<o:p></o:p></p>
<p class="MsoNormal">END IF<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Any thoughts on this error?<o:p></o:p></p>
<p class="MsoNormal">I am using Visual Studio 2010 with Intel
Visual FORTRAN if that helps.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks!<o:p></o:p></p>
<p class="MsoNormal">Sam<o:p></o:p></p>
</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>