How can I slove ecomic dispatch problem by nonlinear constarin function?

7 visualizaciones (últimos 30 días)
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

Respuestas (1)

Walter Roberson
Walter Roberson el 14 de Mayo de 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

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by