Loading...
HomeMy WebLinkAbout20230705IPC to Staff PR 4 Attachment - LOLE_Loop.pdf%%% Loop for LOLE calculation % Programmed by Andres Valdepena Delgado 2022 % Email ‐ avaldepenadelgado@idahopower.com   % Input Description: % Hourly net load % outage table % Output Description: % Perfect Capacity % Variable to speed up the solution epsiln = 0.1; % Loop over the different test year for m = 1:length(years)     test_year = years(m);     Data_Import_LnR     Data_Import_Exports_Losses     Data_Load     LOLE_d = 1;     RCAT_Gen = 200;      Gen_Cap_LnR     Dates          while LOLE_d > target_LOLE                  Perf_Cap_Add = RCAT_Gen;         Gen_Cap_LnR         LOLP_Calc         RCAT_Gen = RCAT_Gen + 1 + round((LOLE_d‐target_LOLE)/epsiln)     end          LOLE(:,m) = LOLE_d     LOLH(:,m) = LOLH_d;     Perf_Cap(:,m) = RCAT_Gen ‐ 1;     VODER_kWh(:,m) = sum(Data_TT.Res + Data_TT.SC + Data_TT.LC + Data_TT.Irr);     LOLPs(:,m) = LOLP_hourly; end