[TRNSYS-users] Problem with initialization when callinguser-written component
keilholz, werner
werner.keilholz at cstb.fr
Tue Jan 8 02:29:59 PST 2008
Dear Knut,
Please find attached my type: it slows down TRNSYS to 'real world time'.
I wonder what exactly happens. You say info(8) is 4 at the very first call. Is this when you set a breakpoint at the very beginning? In that case, the problem may rather be the simulation project (what are START, STOP and STEP ?).
I get INFO[8]=1 alright the first time TRNSYS give me control.
Werner
-----Message d'origine-----
De : knut.erik.enerstvedt at niva.no [mailto:knut.erik.enerstvedt at niva.no]
Envoyé : mardi 8 janvier 2008 10:14
À : keilholz, werner; trnsys-users at engr.wisc.edu
Objet : RE: [TRNSYS-users] Problem with initialization when callinguser-written component
Hi Werner,
Thank you for your answer.
I am aware of the difference between FORTRAN and C++ array indices, and
have checked that these are correct in my code. I still can't get TRNSYS to
do the version signing (info[6] == -2) and initialization (info[6] == -1).
It would be helpful if you could send me the source code of your C++ Type,
as you are suggesting.
Kind regards,
Knut Erik
"keilholz,
werner"
<werner.keilholz@ To
cstb.fr> <knut.erik.enerstvedt at niva.no>,
<trnsys-users at engr.wisc.edu>
01/07/2008 05:04 cc
PM
Subject
RE: [TRNSYS-users] Problem with
initialization when
callinguser-written component
Hi Knut,
Be careful, the version signing stuff is checked by
Inf(7) .EQ. -2
In FORTRAN, but this translates to
if (info[6]== -2)
in C++ (C arrays start at 0, FORTRAN arrays at 1 - see the comments
generated when you use File/Export to C++ in the Studio).
I just wrote a type in C++ and it behaves as expected.
It's a quite simple , if you want I can send you the source code.
Werner
-----Message d'origine-----
De : knut.erik.enerstvedt at niva.no [mailto:knut.erik.enerstvedt at niva.no]
Envoyé : lundi 7 janvier 2008 15:55
À : trnsys-users at engr.wisc.edu
Objet : [TRNSYS-users] Problem with initialization when callinguser-written
component
Dear TRNSYS users,
I have written a new TRNSYS Type in C++ which will not work because TRNSYS
skips the initialization procedures. The result is that TRNSYS crashes
because arrays are not sized properly etc. I have checked some values of
the INFO array during program execution, and they show that at the very
first call to the Unit, INFO(8) (in FORTRAN, info[7] in C++) already has a
value of 4. This means that the version signing, initialization call
(INFO(7)=-1) and time=start time steps are not executed.
Does anyone know why this happens?
Thanks in advance.
Kind regards,
Knut Erik Enerstvedt
----------------------------------------------------------------------------------------------------------------------
NIVAs hovedkontor har flyttet til nye lokaler i CIENS - Forskningssenter
for miljø og samfunn; Gaustadalléen 21, 0349 Oslo. Meld deg på vårt
nyhetsbrev på www.niva.no
_______________________________________________
TRNSYS-users mailing list
TRNSYS-users at engr.wisc.edu
https://www.cae.wisc.edu/mailman/listinfo/trnsys-users
************************************************************************************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals & computer
viruses.
************************************************************************************
************************************************************************************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals & computer
viruses.
************************************************************************************
----------------------------------------------------------------------------------------------------------------------
NIVAs hovedkontor har flyttet til nye lokaler i CIENS - Forskningssenter
for miljø og samfunn; Gaustadalléen 21, 0349 Oslo. Meld deg på vårt
nyhetsbrev på www.niva.no
************************************************************************************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses.
************************************************************************************
************************************************************************************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses.
************************************************************************************
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Pacemaker.zip
Type: application/x-zip-compressed
Size: 259615 bytes
Desc: Pacemaker.zip
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20080108/f05fb08a/attachment-0005.bin>
More information about the TRNSYS-users
mailing list