Eco
Eco
clc;
clear;
disp('Enter cost coefficients for each generator in the form: [a b c] for C = a + bP + cP^2');
% Extracting coefficients
P_total = P1 + P2 + P3;
Cost1 = a1 + b1 * P1 + c1 * P1^2;
Cost2 = a2 + b2 * P2 + c2 * P2^2;
Cost3 = a3 + b3 * P3 + c3 * P3^2;
fprintf('\nOptimal Generation:\n');
Output
Optimal Generation:
P1 = 400.00 MW
P2 = 250.00 MW
P3 = 150.00 MW