Need help for solving an Optimization problem with Nonlinear constraints
情報
この質問は閉じられています。 編集または回答するには再度開いてください。
古いコメントを表示
Does someone can help me for the problem below, any answer will be appreciated.
whether the function 'fmincon' or other function in matlab can solve the following problem:
% N
% minimize ∑ {C(i)*V(i)} % objective function
% i=1
% subject to:
% -1 ≤ V(i) ≤ 1;
% 0 ≤ Y(i) ≤ 1;
% 0.6 ≤ Y(N) ≤ 1;
% Y(i+1)-Y(i)=(1-Y(i))*V(i)/20;
%
given Y0=0.3; N=30; vector C is given;
while N is small, like 3 or 4, I can represent Y(3) with Y0,V(1),V(2),V(3). However, when N is big, it's hard to formulate the constrained function.
0 件のコメント
回答 (1 件)
Alan Weiss
2012 年 8 月 6 日
編集済み: Alan Weiss
2012 年 8 月 6 日
It seems to me that your Y vector is a deterministic function of your V vector, and that you minimize over a set of V vectors.
If this is corrrect, you should write a function that gives Y as a function of V, and then write your Y constraints as a set of nonlinear inequalities, and give the V constraints as bounds. Something like the following
function Yout = Ycalc(V)
Yout = zeros(size(V));
Yout(1) = .3 + .7*V(1)/20;
for ii = 2:length(V)
Yout(ii) = Yout(ii-1) + (1-Yout(ii-1))*V(ii)/20;
end
Now that you have this function, write the nonlinear constraints:
-Y(ii)
Y(ii) - 1
Alan Weiss
MATLAB mathematical toolbox documentation
0 件のコメント
この質問は閉じられています。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!