Filter löschen
Filter löschen

How to solve Langrage Multiplier

1 Ansicht (letzte 30 Tage)
nazrin mokhtar
nazrin mokhtar am 24 Apr. 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 ])

Antworten (0)

Kategorien

Mehr zu Symbolic Math Toolbox 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