Effacer les filtres
Effacer les filtres

How to solve Langrage Multiplier

1 vue (au cours des 30 derniers jours)
nazrin mokhtar
nazrin mokhtar le 24 Avr 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 ])

Réponses (0)

Catégories

En savoir plus sur Symbolic Math Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by