Borrar filtros
Borrar filtros

How to solve Langrage Multiplier

1 visualización (últimos 30 días)
nazrin mokhtar
nazrin mokhtar el 24 de Abr. de 2020
Why i cannot solve the langrange...it say empty double matrix...please someone help me
SF=[ 0 -2/3 -1/3
0 -1/3 -2/3
0 1/3 -1/3 ];
A=[ 1 0
0 1
0 0 ];
B=[ 0
0
1 ];
PLmax=[ 30
150
150 ];
Cost=[ 10
12
11 ];
syms P1 P2 Pd
Pgen=[ P1
P2];
f=10*P1+12*P2; %obj func
Lmda=Pd-(P1+P2)==0;
Pi1=SF*(A*Pgen-B*Pd)<=PLmax;
Pi2=-SF*(A*Pgen-B*Pd)<=PLmax;
P1,P2>=0;
Pd==150;
Sol=solve ([f,Lmda,Pi1,-Pi2],[ P1 P2 Pd ])

Respuestas (0)

Categorías

Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by