[TRNSYS-users] Fwd: Re: Error when creating new component with storage

David BRADLEY d.bradley at tess-inc.com
Wed Feb 19 08:08:33 PST 2014


Hi C.K.
   If you need to store and retrieve values from the last iteration then 
you'll need to reserve yourself some "static" storage space as well as 
the "dynamic" storage space that you've already reserved. The idea of 
the dynamic storage is that you will always set and store the value that 
you compute at the current iteration and retrieve the converged value 
from the end of the previous timestep. The TRNSYS kernel takes care of 
updating the last converged value for you automatically at the end of 
the timestep. If you need to do something else you use the static 
storage which operates exactly the way storage did in Trnsys16.
Kind regards,
  David



On 2/19/2014 00:12, C K Lee wrote:
> Hello, David.
>
> I get another problem in the new model.  I need to retrieve the values 
> stored at the previous iteration at the beginning of each iteration 
> which can be done in the TRNSYS 16 version.  However, there is only 
> one command "getDynamicArrayValueLastTimestep" in the TRNSYS 17 
> template which gives the stored values at the previous time step.  Is 
> there any way to meed my requirement? Thank you!
>
> Best Regards
> C. K. Lee
>
> -------- Original Message --------
> Subject: Re: [TRNSYS-users] Error when creating new component with 
> storage
> Date: 2014-02-19 08:24
> From: C K Lee <a8304506 at graduate.hku.hk>
> To: "TRNSYS users mailing list at the Solar Energy Lab, UW-Madison" 
> <trnsys-users at cae.wisc.edu>
> Cc: Trnsys discussion group <trnsys-users at engr.wisc.edu>
> Reply-To:
>
> Hello, David.
>
> The "SetValueThisIteration" subroutine appears at the end of the 
> source code template created by TRNSYS.  I have revised that statement 
> and successfully created the .dll file.  Maybe it is a bug.  
> Nevertheless, thanks for your help.
>
> Best Regards
> C. K. Lee
>
>
> On 2014-02-19 00:42, David BRADLEY wrote:
>> C.K.
>>   I believe that the function name should be
>> "SetDynamicArrayValueThisIteration" and not "SetValueThisIteration."
>> Could you please point out for me where the function
>> "setValueThisIteration" is referenced?
>> Best,
>>  David
>>
>>
>> On 2/17/2014 20:23, C K Lee wrote:
>>> Hello, everyone.
>>>
>>> I want to create a new component in TRNSYS 17 which employs the 
>>> storage function.  However, when I try to create the dll file, I 
>>> receive the following error message:
>>>
>>> Type257.obj : error LNK2001: unresolved external symbol 
>>> _SETVALUETHISITERATION
>>> C:\Trnsys17\UserLib\DebugDLLs/Type257.dll : fatal error LNK1120: 1 
>>> unresolved externals
>>> Error executing link.exe.
>>>
>>> It seems that the subroutine SetValueThisIteration cannot be 
>>> recognized.  Does anyone know how to solve the problem?  Thank you!
>>>
>>> Best Regards
>>> C. K. Lee
>>> City University of Hong Kong
>>>
>>> _______________________________________________
>>> TRNSYS-users mailing list
>>> TRNSYS-users at cae.wisc.edu
>>> https://mailman.cae.wisc.edu/listinfo/trnsys-users
>>>
>>
>> -- 
>> ***************************
>> 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
>> d.bradley at tess-inc.com
>>
>> http://www.tess-inc.com
>> http://www.trnsys.com
>>
>> _______________________________________________
>> TRNSYS-users mailing list
>> TRNSYS-users at cae.wisc.edu
>> https://mailman.cae.wisc.edu/listinfo/trnsys-users
> _______________________________________________
> TRNSYS-users mailing list
> TRNSYS-users at cae.wisc.edu
> https://mailman.cae.wisc.edu/listinfo/trnsys-users
> _______________________________________________
> TRNSYS-users mailing list
> TRNSYS-users at cae.wisc.edu
> https://mailman.cae.wisc.edu/listinfo/trnsys-users
>

-- 
***************************
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
d.bradley at tess-inc.com

http://www.tess-inc.com
http://www.trnsys.com




More information about the TRNSYS-users mailing list