Optimisation- having variable objective function
古いコメントを表示
Guys I have a problem in preparing both Objective and Constraint Function. Type of problem: Minimising with Non-linear Constraint Imagine I want to minimise an objective function which is a function of Omega and Omega=1:10 (assume). The objective function has 3 variable (X1 X2 X3) which are the optimisation’s variable and needs to be find by optimisation tools. Similar to objective function, I have a constrain function (which is again a function of Omega and has X1 X2 X3 inside). I know Matlab can deal with problems called semi-infinite constraints, however, my objective function is similar to the constrains (in case of having Omega). Any advice is highly appreciated.
1 件のコメント
yem
2014 年 12 月 14 日
hello Nima please i have a system with 2 delays d1 and d2 which are the optimisation’s variable and needs to be find by optimisation tools. Similar to objective function, I have a constrain function (which is again a function of x and has d1 d2 (reals valors) inside).. a help please??
回答 (1 件)
Matt J
2012 年 11 月 10 日
0 投票
See the documentation on passing extra parameters
5 件のコメント
Nima
2012 年 11 月 10 日
You're not meant to pass the entire vector p1=1:10 to the OF and constraints. You're meant to loop over the values of p1, and re-solve the problem for each value:
for i=1:length(p1)
OF=@(x) f(x,p1(i));
nlconst=@(x) c(x,p1(i));
X(:,i)=fmincon(OF,x0,...,nlconst,...);
%x0=X(:,i); initializing with the last solution may speed things up.
end
Nima
2012 年 11 月 14 日
yem
2014 年 12 月 14 日
please i have a system with 2 delays d1 and d2 which are the optimisation’s variable and needs to be find by optimisation tools. Similar to objective function, I have a constrain function (which is again a function of x and has d1 d2 (reals valors) inside).. a help please??
カテゴリ
ヘルプ センター および File Exchange で Solver-Based Nonlinear Optimization についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!