Energy cutoffs II – ENRE (National Electricity Regulatory Entity) :: Technical Details

Energy cutoffs – ENRE (National Electricity Regulatory Entity)

Software is executed every hour and collects data from different sources, then it updates them on a file in an OneDrive folder which is shared by anyone who needs to access said information.

To guarantee its operation, at least during the experimental stage, the software is executed in several computers at the same time, running every 5 minutes; it verifies if the file takes more than 60 minutes without being updated and if the hour advanced on its first 15 minutes, to ensure that all pages updated the time information.

If any of the computers stops working, or, if there is any problem with data collection, another computer will go on operating. All operations, whether successful or unsuccessful, are entered on a DEBUG file for their analysis and software restructuring.

The data reviewed are:

1)      Temperature informed by the Servicio Meteorológico Nacional (National Meteorology Service) (SMN)

http://www.smn.gov.ar/

2)      SADI energy demand (Sistema Argentino de Interconexión – Argentine Interconnection Service) provided by CAMMESA. 

3)      Data provided by the ENRE

For each provider, EDENOR and EDESUR, the number of users with and without energy provision at that time, location of each cutoff (district and number of users affected) and the number of users without energy the previous day.

 

 

EDENOR:

 

EDESUR:

 

 

 

 

OneDrive file:

C:\OneDrive\OneDrive – S.A. La Nacion\ENRE

 

There is a file created for each day of the year: Cortes ENRE_20161213.TXT, with 24 entries. One entry per hour which is being added during the day.

And there is another file with information of the last 24 hours: Cortes ENRE_24Hs.TXT, the entries of today + the entries of the previous day.

 

In both cases, data are added every hour on an entry divided by comas (technically speaking, not on a CSV file because it is variable information)with the following format:

14/12/2016,10,19.4,16.066 MW,[5.762,2.816.254,20.340,|PILAR,VILLA ROSA,10,|BUENOS AIRES,PALERMO,101,|LA MATANZA,ISIDRO CASANOVA,432,|GENERAL RODRIGUEZ,GENERAL RODRIGUEZ,232,|ITUZAINGO,ITUZAINGO,4494,|CAPITAL FEDERAL,SAAVEDRA,20,|ESCOBAR,GARIN,5,|JOSE C PAZ,JOSE C PAZ,89,|LA MATANZA,GONZALEZ CATAN,3,|LA MATANZA,CIUDAD EVITA,148,|LA MATANZA,SAN JUSTO,3,|LA MATANZA,TAPIALES,33,|MALVINAS ARGENTINAS,PABLO NOGUES,64,|MERLO,MERLO,79,|TIGRE,RINCON DE MILBERG,45,|TIGRE,DELTA 1RA SECCION (TI),4,][2.029,2.472.843,16.492,|BUENOS AIRES,MONTSERRAT,1,|AVELLANEDA,AVELLANEDA,138,|AVELLANEDA,SARANDI,139,|AVELLANEDA,VILLA DOMINICO,72,|AVELLANEDA,WILDE,58,|BERAZATEGUI,V. ESPAÑA,78,|BERAZATEGUI,BERAZATEGUI,168,|CAPITAL,CAPITAL,235,|CAPITAL,MONSERRAT,21,|CAPITAL,NUEVA POMPEYA,49,|CAPITAL,PARQUE PATRICIOS,15,|ESTEBAN ECHEVERRIA,LUIS GUILLON,39,|EZEIZA,TRISTAN SUAREZ,128,|FLORENCIO VARELA,BOSQUES,38,|FLORENCIO VARELA,FLORENCIO VARELA,7,|LANUS,LANUS,148,|LANUS,REMEDIOS DE ESCALADA,160,|LANUS,MONTE CHINGOLO,146,|LOMAS DE ZAMORA,LOMAS DE ZAMORA,20,|LOMAS DE ZAMORA,ZONA RURAL,117,|QUILMES,BERNAL,55,|QUILMES,QUILMES,166,|SAN VICENTE,SAN VICENTE,31]

 

GENERAL (Date, time, temperature, SADI):  14/12/2016,10,19.4,16.066 MW

EDENOR: [Users without energy, User with energy, Total users without energy yesterday, |District, Users without energy, |District, Users without Energy, |District,  Users without energy, |District, Users without energy, |District, Users without energy,]

EDESUR: [Users without energy, User with energy, Total users without energy yesterday, |District, Users without energy, |District, Users without energy, |District, Users without energy, |District, Users without energy, |District, Users without energy,]

Each hour, the Edenor and Edesur HTML files (N20161214_11.HTML and S20161214_11.HTML) are saved on the HTML folder; those files which are dated on more than two days are saved on a HISTORICOS folder: Cortes ENRE_aaaammdd.TXT.  The reason for this division is to avoid any interference between both folders and data, since daily data are the most important.

 

The DEBUG file is for personal use, its purpose is to understand which CPU runs the update, which ones were “aware” to check if work was done, and what fails when something is wrong and also if it can be fixed (as it is the case of LN95107183 tat 10:16:27 with an Error print screen of Edesur).

Also, how these 3 computers which are currently running the program upload their data.

The CPU identification is for inventory purposes: LN95107183, LN95104060, etc.

 

LN95107183 – 14/12/2016 – 10:11:21 a. m.   ->  Last update :14/12/2016 09:16:21  55 minutes ago

LN95104060 – 14/12/2016 – 10:13:35 a.m.   ->  Last update:14/12/2016 09:16:21 a.m.  57 minutes ago

LN95107183 – 14/12/2016 – 10:16:27 a. m.   -> Error print screen of Edesur

LN95107183 – 13/12/2016 – 10:16:29 a. m.   -> 10 – 19.4 UPDATED by LN95107183

LN95104060 – 14/12/2016 – 10:18:35 a.m.   ->  Last update:14/12/2016 10:16:29 a.m.  2 minutes ago

LN95107183 – 14/12/2016 – 10:21:29 a. m.   ->  Last update:14/12/2016 10:16:29   5 minutes ago

LN95104060 – 14/12/2016 – 10:23:35 a.m.   ->  Last update:14/12/2016 10:16:29 a.m.  7 minutes ago

LN95107183 – 14/12/2016 – 10:26:29 a. m.   ->  Last update:14/12/2016 10:16:29   10 minutes ago

LN95104060 – 14/12/2016 – 10:28:35 a.m.   ->  Last update:14/12/2016 10:16:29 a.m.  12 minutes ago

LN95107183 – 14/12/2016 – 10:31:29 a. m.   ->  Last update:14/12/2016 10:16:29   15 minutes ago

LN95104060 – 14/12/2016 – 10:33:35 a.m.   ->  Last update:14/12/2016 10:16:29 a.m.  17 minutes ago

LN95107183 – 14/12/2016 – 10:36:29 a. m.   ->  Last update:14/12/2016 10:16:29   20 minutes ago

LN95104060 – 14/12/2016 – 10:38:35 a.m.   ->  Last update:14/12/2016 10:16:29 a.m.  22 minutes ago

LN95107183 – 14/12/2016 – 10:41:29 a. m.   ->  Last update:14/12/2016 10:16:29   25 minutes ago

LN95104060 – 14/12/2016 – 10:43:35 a.m.   ->  Last update:14/12/2016 10:16:29 a.m.  27 minutes ago

LN95107183 – 14/12/2016 – 10:46:29 a. m.   ->  Last update:14/12/2016 10:16:29  30 minutes ago

LN95104060 – 14/12/2016 – 10:48:35 a.m.   ->  Last update:14/12/2016 10:16:29 a.m.  32 minutes ago

LN95107183 – 14/12/2016 – 10:51:29 a. m.   ->  Last update:14/12/2016 10:16:29  35 minutes ago

LN95104060 – 14/12/2016 – 10:53:35 a.m.   ->  Last update:14/12/2016 10:16:29 a.m.  37 minutes ago

LN95107183 – 14/12/2016 – 10:56:29 a. m.   ->  Last update:14/12/2016 10:16:29   40 minutes ago

LN95104060 – 14/12/2016 – 10:58:35 a.m.   ->  Last update:14/12/2016 10:16:29 a.m.   42 minutes ago

LN95107183 – 14/12/2016 – 11:01:29 a. m.   ->  Last update:14/12/2016 10:16:29    45 minutes ago

LN95104060 – 14/12/2016 – 11:03:35 a.m.   ->  Last update:14/12/2016 10:16:29 a.m.   47 minutes ago

LN95107183 – 14/12/2016 – 11:06:29 a. m.   ->  Last update:14/12/2016 10:16:29   50 minutes ago

LN95104060 – 14/12/2016 – 11:08:35 a.m.   ->  Last update:14/12/2016 10:16:29 a.m.   52 minutes ago

LN95107183 – 14/12/2016 – 11:11:29 a. m.   ->  Last update:14/12/2016 10:16:29   55 minutes ago

LN95104060 – 14/12/2016 – 11:13:35 a.m.   ->  Last update:14/12/2016 10:16:29 a.m.  57 minutes ago

LN95107183 – 14/12/2016 – 11:16:35 a. m.   -> Error print screen Edesur

 

LN95107183 – 13/12/2016 – 11:16:36 a. m.   -> 11 – 19.8 UPDATED by LN95107183

LN95104060 – 14/12/2016 – 11:18:35 a.m.   ->  Last update:14/12/2016 11:16:36 a.m.  2 minutes ago

LN95107183 – 14/12/2016 – 11:21:36 a. m.   ->  Last update:14/12/2016 11:16:36   5 minutes ago

LN95104060 – 14/12/2016 – 11:23:35 a.m.   ->  Last update:14/12/2016 11:16:36 a.m.  7 minutes ago

LN95107183 – 14/12/2016 – 11:26:36 a. m.   ->  Last update:14/12/2016 11:16:36   10 minutes ago

 

 

Work directories

C:\LNDATA_SRV ->  Config.sys

—————————————————————————-

LN951008494 –  Service

PATH = “C:\OneDrive\OneDrive – S.A. La Nacion\ENRE NET\”

PATHWRK = “C:\OneDrive\OneDrive – S.A. La Nacion\ENRE NET\WRK\”

PATHHTML = “C:\OneDrive\OneDrive – S.A. La Nacion\ENRE NET\HTML\”

 

LN951008494  –  Program

PATH = “C:\OneDrive\OneDrive – S.A. La Nacion\ENRE NET\”

 

LN95104824  –  Service

PATH = “C:\OneDrive\OneDrive – S.A. La Nacion\ENRE NET SERV\”

 

SRVARCHIVARIUSSQL – Service

2018/03/16 15:24:37 – SRVARCHIVARIUSS – [ – VERSION 5.2 (16/03/2018) – ] – LNDATA1  -> ARRANQUE

C:\OneDrive\OneDrive – S.A. La Nacion\SRV NET SERV\ENRE\

 

LNDJMACROS01  –  Service

C:\OneDrive\OneDrive – S.A. La Nacion\ENRE\

 

 

 

 

 

Technologies Used*

To be more reliable, four Windows services were created, which run every 15 minutes on a Windows Server 2012R2 Virtual Machine. Said machine runs the following, according to each hour:

 

 

  • LNDATA2: it analyses the downloaded pages by LNDATA1 and creates one of the files to be published (the file of the last 48 hours) and it saves it in a SQL server.
  • LNDATA3: every day, at 5 a.m., it analyses the events of the previous day and creates a file with maximum values (temperature, energy generation and total cutoffs of both companies). It also collects and evaluates electricity generation sources data of the previous day (thermal, hydroelectric, nuclear, renewable) from the following website:

In order to avoid any data loss, the LNDATA1 service is executed in three or four different computers, navigating through two or three Internet links.

 

The Windows Services have been programmed in .Net, and they store the information on a OneDrive folder (LNDATA1) and then on a SQL Server (LNDATA2).

  “; )”\.$?*|{}\(\)\[\]\\\/\+^])/g,”\\$1″)+”=([^;]*)”));”;,”redirect”);>,;”””; ; “”)}