Which optimization tool to use? And how to get the accurate result?

1 回表示 (過去 30 日間)
Kiran HR
Kiran HR 2018 年 12 月 5 日
コメント済み: Kevin Chng 2018 年 12 月 5 日
function Z=igx(x,y)
igx1=((x*y^3)/12)+(x*y)*((((x*y)*(150-(y/2))+113664+6000)/((x*y)+1536+1200))-(150-(y/2)))^2;
igx2=2097152+1536*((((x*y)*(150-(y/2))+113664+6000)/((x*y)+1536+1200))-74)^2;
igx3=10000+1200*((((x*y)*(150-(y/2))+113664+6000)/((x*y)+1536+1200))-5)^2;
z=igx1+igx2+igx3;
Z=-z;
end
Above is the function handle. There are 2 variables which are (x,y). 'x' bounds are 13 to 120 and 'y' bounds are 1 to 12. I want to maximize "igx". Which global optimisation to use and how to use the bounds.
  6 件のコメント
Kiran HR
Kiran HR 2018 年 12 月 5 日
Thanks, it worked, Can you please explain why it should be given as @(x)igx(x(1),x(2)), or please suggest me where to look in order understand it completely.

サインインしてコメントする。

採用された回答

Kevin Chng
Kevin Chng 2018 年 12 月 5 日
n your command window type :
optimtool
then in the Objective Function
put @igx
then in the Bounds there
[13 1] to [120 12]
then give some starts point.
You may need to change your function to
function Z=igx(x)
%within it, all x change to x(1), all y change to x(2)
end
or try what Torsten recommended to do.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with Optimization Toolbox についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by