[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TRNSYS-users] Some problem about TRNSYS calling MATLAB



Dear Mr Zhu,

I have coupled trnsys17 with matlab 2001 and developed a model that solves an optimization problem using "linprog" with no problems.
Are you sure matlab is correctly coupled with trnsys?

Best regards,

Oussama

Sent from my iPhone

On Aug 7, 2017, at 5:08 AM, 朱倩雯 via TRNSYS-users <trnsys-users@lists.onebuilding.org> wrote:

Hello! I am a Chinese graduate student, and our lab uses TRNSYS to do some research about microgrid. Now we have some problem about TRNSYS calling Matlab.


(1) The m-file which was called by TRNSYS contains a function from a Matlab toolbox---yalmip. The toolbox is downloaded from Internet. But there is an error "undefined function or variable 'sdpvar'" ('sdpvar' is a function from yalmip toolbox), so the TRNSYS simulation cannot run successfully.


(2) In addition, we try to use the Matlab optimization toolbox function linprog() in the m-file which was called by TRNSYS. The format is like'[x,fval]=linprog(f,[],[],Aeq,beq,lb);'. But a similar error appears again, "undefined function or variable 'fval'".


So, is it able to use Matlab toolbox function when TRNSYS calls Matlab file? Especially the toolbox installed by user. If it is, is there some extra operation?


I would be grateful i­f you can give me a r­eply at your­ earliest convenience.


Sincerely,

Qianwen Zhu 

_______________________________________________
TRNSYS-users mailing list
TRNSYS-users@lists.onebuilding.org
http://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org