MATLAB与GAMS的数据交互

Goal:This paper describes a link between GAMS and MATLAB. The aim of this link is two-fold. Firstly, it is intended to provide MATLAB users with a sophisticated nonlinear optimization capability. Secondly, the visualization tools of MATLAB are made available to a GAMS modeler in an easy and extendable manner so that optimization results can be viewed using any of the wide variety of plots and imaging capabilities that exist in MATLAB.
本篇博文介绍Matlab与GAMS的交互,将matlab数据生成能力&画图能力与GAMS的优化模型能力相结合。这个过程主要借助.gdx中间文件来完成。

主要步骤

(1).m文件导出输入数据到MToGDoc.gdx文件
(2)调用.gms优化模型文件,其中.gms模型读取MToGDoc.gdx,并将输出写到新的GToMDoc.gdx文件
(3).m文件读取GToMDoc.gdx文件并画图

相关参考材料:
[1]https://www.zhihu.com/question/50259729?from=profile_question_card
[2]https://blog.csdn.net/weixin_42421209/article/details/86436008
[3]https://www.gams.com/latest/docs/T_GDXMRW.html

发布了13 篇原创文章 · 获赞 0 · 访问量 1098

猜你喜欢

转载自blog.csdn.net/weixin_43413198/article/details/103664755