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!