[TRNSYS-users] Type 9 Data reader

David BRADLEY d.bradley at tess-inc.com
Tue Aug 27 07:34:00 PDT 2019


Hoofar,

   When you say "parameter" do you mean TRNSYS's definition of a 
parameter (i.e. a value that is read once at the beginning of a 
simulation and then does not change value throughout the rest of the 
simulation) or are you using it in the more general sense of the word? 
The reason I ask is that if you want to set a TRNSYS parameter from an 
external file rather than from in the input file itself then you might 
be able to use the concept of an INCLUDE file. In the "simulation cards" 
section of your project's control cards, you can enter a line like:

INCLUDE d:\Trnsys18\MyProjects\ProjectX\paramVals.txt

when you launch a TRNSYS simulation, whatever is in paramVals.txt will 
be read and treated as though it were part of the input file. So if 
paramVals.txt contained

CONSTANTS 1
myParameter = 5

then the variable "myParameter" could be used by Types in the 
simulation. paramVals.txt would need to exist of course and, if you are 
doing optimization, would probably have to get rewritten after each 
simulation. Not knowing the specifics of what you are trying to do, I 
may be leading you down a useless path here. If you want to talk further 
about it, please don't hesitate to email me.

kind regards,

  David


On 08/27/2019 07:57, Hemmatabady, Hoofar via TRNSYS-users wrote:
>
> Dear all,
>
> Is there a way that a data reader (type 9) reads a text file just at 
> the beginning of the simulation, instead of the whole time steps, so 
> that it can be used as a TRNSYS parameter for mathematical optimization?
>
> I know it is also possible by using type 62 (calling excel), but using 
> excel reduces the speed considerably.
>
> Best regards,
>
> Hoofar
>
>
> _______________________________________________
> TRNSYS-users mailing list
> TRNSYS-users at lists.onebuilding.org
> http://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org

-- 
***************************
David BRADLEY
Principal
Thermal Energy Systems Specialists, LLC
3 North Pinckney Street - suite 202
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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20190827/1ac7c8e6/attachment-0001.html>


More information about the TRNSYS-users mailing list