eskom-calendar icon indicating copy to clipboard operation
eskom-calendar copied to clipboard

Add Mangaung & NMB areas

Open IamC8 opened this issue 1 year ago • 3 comments

Ok, I have started over again. Understand GitHub better now. These are the proposed changes

IamC8 avatar Jun 30 '23 20:06 IamC8

Hi there, I need to know the source of your information for the changed areas as previously mentioned. I see you said this URL was for mangaung:

  • https://www.centlec.co.za/LoadShedding/LoadSheddingDocuments

But please also provide a URL for NMB.

beyarkay avatar Jul 04 '23 13:07 beyarkay

NMB: https://www.nelsonmandelabay.gov.za/page/loadshedding https://www.nelsonmandelabay.gov.za/documentslist?searchtext=&categoryid=58 https://www.nelsonmandelabay.gov.za/DataRepository/Documents/loadshedding-res-industr-5june23-3sept23_oM4s3.pdf

IamC8 avatar Jul 04 '23 17:07 IamC8

Hi there, apologies for the long delay, I had to focus on some personal things for a while.

For the Mangaung changes, all looks good. I'm happy to merge them in, although there are some issues with the NMB schedules (see below). If you open up a new PR with just the Mangaung changes then I'll merge that PR. Thanks!

The NMB schedules are no longer up-to-date because NMB has updated their schedules (the latest one looks like it covers 4 September 2023 - 3 December 2023).

It's not feasible for me to re-calculate the schedules every couple of months, so a NMB schedule would have to be resilient to this sort of change. The main codebase supports a different format for the CSVs which could help with this. Instead of specifying the date of the month, you can specify a periodic schedule that has an arbitrary start and arbitrary repetition frequency.

For example, to specify a schedule that repeats every 19 days and started on the 15th September 2023:

nelson-mandela-bay-group-1.csv

day_of_cycle, period_of_cycle, start_of_cycle, start_time, finsh_time, stage
           1,              19, 2023-09-15    , 00:00     , 02:30     ,     1
           1,              19, 2023-09-15    , 00:00     , 02:30     ,     2
           1,              19, 2023-09-15    , 00:00     , 02:30     ,     3
           1,              19, 2023-09-15    , 18:00     , 20:30     ,     3
           1,              19, 2023-09-15    , 00:00     , 02:30     ,     4
           1,              19, 2023-09-15    , 08:00     , 10:30     ,     4
           1,              19, 2023-09-15    , 18:00     , 20:30     ,     4

(whitespace added for clarity)

As per the updated schedule for NMB: Screenshot 2023-09-21 at 12 12 01

If the NMB schedules are specified in this way, I think they won't need to be updated every 3 months because the new schedules announced by NMB would match the ones predicted by the periodic schedule.

beyarkay avatar Sep 21 '23 10:09 beyarkay