<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@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:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 2.0cm 2.0cm 2.0cm;}
div.WordSection1
{page:WordSection1;}
--></style></head><body lang=IT><div class=WordSection1><p class=MsoNormal>Hi TRNSYS users,</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I’m trying to run an optimization with TrnOpt with a link with matlab (type 155). The single simulation works, but when I run the optimization I have always the same error: “<i>The M-File did not properly set 'mFileErrorCode' to 0 when it was called. This may indicate that an error occurred in Matlab while running the M-File. 'mFileErrorCode' was left to 1 by the M-File. You can set ignoreEngineClose to 1 and run the 'lasterr' command in Matlab to help diagnose the problem. The error occurred at info(7) = 0 , info(13) = 0</i>”.<o:p></o:p></p><p class=MsoNormal>I think it’s a problem with matlab file access because , despite the .m file being inserted into the GenOpt input file, the GenOpt seems unable to start it, in fact GenOpt starts matlab but then fails to open the file. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Someone of you has already dealt with this issue?</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Kind regards,</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Elisa Ghirardi</p><p class=MsoNormal>University of Bergamo, Italy.<o:p></o:p></p></div></body></html>