How can I slove ecomic dispatch problem by nonlinear constarin function?
29 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
function [c,ceq] = circlecon(x)
c = 459 + 6.48*x +0.00128*x^2;
ceq = [0];
A = [459];
b = [3];
Aeq = [32];
beq = [23];
x0 = [1/4,1/4];
nonlcon = @circlecon;
x = fmincon(fun,x0,A,b,Aeq,beq,lb,ub,nonlcon)
end
0 commentaires
Réponses (1)
Walter Roberson
le 14 Mai 2019
A = [459];
b = [3];
Aeq = [32];
beq = [23];
x0 = [1/4,1/4];
nonlcon = @circlecon;
x = fmincon(fun,x0,A,b,Aeq,beq,lb,ub,nonlcon)
function [c,ceq] = circlecon(x)
c = 459 + 6.48*x +0.00128*x^2;
ceq = [0];
end
This would probably fail because your A and Aeq matrices should have as many columns at the length of x0
0 commentaires
Voir également
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!