constrain in fmincon exceeds its maximum, any tip?

2 Ansichten (letzte 30 Tage)
sensation
sensation am 29 Jun. 2018
Hi, I have many constraints in my file but one is not fulfilling the given condition. When i run the model I get the values that exceeds max_capacity and I do not want that.
Can anyone let me know where is the error maybe? Thank you a lot!
% So constaint is of a form A*x <= b
ot = ones(N,1);
ot1 = ones(N,1)*k2; %k2 is a scalar
for i=1:M % number of case studies
A2 = spdiags([ot1 ot],[0 N],N,N*2);
end
for i=1:M
b4(1:N,i)=max_cap(1,i); %max capacity
end
A = [A; A2]; %just addition to previous vector constraints
b = [b; b4]; %just addition to previous vector constraints
and I am optimizing with fmincon on x.
The equation in respect to fmincon is:
% % k2*H*x<=max_cap
Should I also include H in calculation in constraint?
H is of a form= (S(t)/alpha_par).^(1/b_par(i)))
Thanks a lot!

Antworten (0)

Kategorien

Mehr zu Systems of Nonlinear Equations finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by