% Calculates half hourly national transmission line losses and % gross consumption (grid connection point consumption plus embedded generation) % Requires the Regions.txt file and GenTotals.txt file to be in the same directory % as Gnash % Warning - The period covered by generation data varies from generator to % generator. These totals are only valid for trading periods where comprehensive % generation data exists (2005 onwards) % Note that some metering of generation is carried out at points % where generation has already been partially consumed by local load. % Conversely, some metered loads include non-metered onsite co-generation. % Calculated gross demand below should be treated as excluding demand % supplied though onsite co-generation. % Call this file from within Gnash using the command @TXSLosses_GrossDemand.txt @Regions.txt @GenTotals.txt @GXPInjection.txt % calculate losses values calculate TransLoss = GEN.NewZealand.Grid + GXPImport.NewZealand - Reg.nz.totalpost96 %Provisional losses: Generation - Consumption. calculate TransLossPer = TransLoss/GEN.NewZealand.Grid*100 %Provisional losses: (Generation - Consumption)/Generation. calculate TransLossPerB = ((temp := GEN.NewZealand.Grid + GXPImport.NewZealand) - Reg.nz.totalpost96)/temp*100 %Provisional losses: (Generation - Consumption)/Generation. % calculate gross regional consumption - % i.e. total end user consumption plus losses across local lines networks % but excluding consumption supplied by onsite co-generation Calculate reg.NI.NorthIsthmusPost96.Gross = reg.NI.NorthIsthmusPost96 + GEN.NorthIsthmus.Embedded - GXPImport.NorthIsthmus Calculate reg.NI.AucklandPost96.Gross = reg.NI.AucklandPost96 + GEN.Auckland.Embedded - GXPImport.Auckland Calculate reg.NI.WaikatoPost96.Gross = reg.NI.WaikatoPost96 + GEN.Waikato.Embedded - GXPImport.Waikato Calculate reg.NI.BayOfPlentyPost96.Gross = reg.NI.BayOfPlentyPost96 + GEN.BayOfPlenty.Embedded - GXPImport.BayOfPlenty Calculate reg.NI.CentralPost96.Gross = reg.NI.CentralPost96 + GEN.Central.Embedded - GXPImport.Central Calculate reg.NI.HawkesBayPost96.Gross = reg.NI.HawkesBayPost96 + GEN.HawkesBay.Embedded - GXPImport.HawkesBay Calculate reg.NI.TaranakiPost96.Gross = reg.NI.TaranakiPost96 + GEN.Taranaki.Embedded - GXPImport.Taranaki Calculate reg.NI.WellingtonPost96.Gross = reg.NI.WellingtonPost96 + GEN.Wellington.Embedded - GXPImport.Wellington Calculate reg.NI.TotalPost96.Gross = reg.NI.TotalPost96 + GEN.NorthIsland.Embedded - GXPImport.NorthIsland Calculate reg.SI.NelsonMarlboroughPost96.Gross = reg.SI.NelsonMarlboroughPost96 + GEN.NelsonMarlborough.Embedded - GXPImport.NelsonMarlborough Calculate reg.SI.WestCoastPost96.Gross = reg.SI.WestCoastPost96 + GEN.WestCoast.Embedded - GXPImport.WestCoast Calculate reg.SI.CanterburyPost96.Gross = reg.SI.CanterburyPost96 + GEN.Canterbury.Embedded - GXPImport.Canterbury Calculate reg.SI.SouthCanterburyPost96.Gross = reg.SI.SouthCanterburyPost96 + GEN.SouthCanterbury.Embedded - GXPImport.SouthCanterbury Calculate reg.SI.OtagoSouthlandPost96.Gross = reg.SI.OtagoSouthlandPost96 + GEN.OtagoSouthland.Embedded - GXPImport.OtagoSouthland Calculate reg.SI.TotalPost96.Gross = reg.SI.TotalPost96 + GEN.SouthIsland.Embedded + GEN.SouthIsland.Embedded - GXPImport.SouthIsland Calculate reg.nz.totalpost96.Gross = reg.nz.totalpost96 + GEN.NewZealand.Embedded - GXPImport.NewZealand % set decimals and field width to get more than one decimal place for losses values set fielddec = 2, fieldwidth = 12