i think i found the problem, even though i do not understand it properly. I had these lines in the program:
fid=fopen('outputfile.txt','a'); fprintf(fid,'1) Beginning of time (t=%.1f);\n%f\n',trnTime); fprintf(fid,'%.2f\n',trnInputs(2)); looping everytime. 'a' mode in fopen (creates or open a file and append to the already existing content). TRNSYS code was running for 1-2 times and then crashing in the middle of any additional simulation. Like it was kind of "overflow" in the output file, although it is not significantly big. now i open the file only once in 'w+' mode in the section if ((trnInfo(7)==0) && (trnTime-trnStartTime<1e-6) ) fid1=fopen('CheckFile.txt','w+'); end' and then write on it an any trnsys call. the problems seems to be fixed ;-) Thanks anyway Federico Date: Mon, 6 Jul 2015 10:07:03 -0500 From: d.bradley@tess-inc.com To: trnsys-users@lists.onebuilding.org; thunderfactory@hotmail.it Subject: Re: [TRNSYS-users] random error when using Type155 It sounds a little bit as though some other program is performing an action that causes the Windows "current directory" to change in the middle of your simulation. I have not heard anyone else reporting such behavior and I am afraid that I don't have any suggestions for how to work around it except to try and close down as many other programs as possible and perhaps even disconnect from the internet before running the simulation just to see if that solves the problem. kind regards, David On 07/06/2015 02:17, -- Fed -- wrote:
-- *************************** 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@tess-inc.com http://www.tess-inc.com http://www.trnsys.com |