multiobjective optimization problem (NSGA)
1 回表示 (過去 30 日間)
古いコメントを表示
Hi all, I am trying to perform multi objective optimization and this is my function
f
unction [y, cons] = TMS_CONSTR_objfun(x)
y = [0 0];
cons = [];
x(1:10)=1;
d(1:10)=0;
sp(1:10)=0;
y(1)=sum(x(1:10));
for h=1:10
d(h)=x(h)*xe(h);
sp(h)=x(h)*ve(h);
end
dd=d(d~=0);
spp=sp(sp~=0);
n=length(dd);
for j=2:n-1 y(2)=abs(((dd(1)+dd(2))/(2*spp(1)))+9.7-((x(n)+x(n-1))/(2*spp(n))+ sum((x(j+1)-x(j-1))/(2*spp(j))))); end
I keep received an error: Undefined function or variable 'x'.
why?
0 件のコメント
回答 (1 件)
Yu Jiang
2014 年 8 月 13 日
編集済み: Yu Jiang
2014 年 8 月 13 日
Hi Adam
It seems that you are executing the nonlinear function itself. If that is the case, I wonder what is the expected answer? Also, would you let me know what is the output cons for?
if you want to optimize this function, you need to use one of the optimization solvers in MATLAB, such as fmincon and fminsearch. The documentations are given as below:
For multiobjetive optimization, you can refer to
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Problem-Based Optimization Setup についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!