Hey Guys,
Just writing up some routines for working out what electricity tarriff applies at a given time of a day.
We have the following tarriffs
Peak
Off-Peak,
Shouldder
Controlled Load 1/2
I receive a feed from my electricity provider that gives me the wholesale rate projected forward in 30 minute increments - on top of that wholesale rate we then have the tarriffs listed above added to the base wholesal rate.
I think the most efficient way would be to create an multidimensional array - but how would others approach it ?
The rates do get updated on a fairly frequent basis, and the dates they are in effect can be changed on a yearly basis
I was thinking of
Monthnumber[DayOfWeek].[HourOfDay].[ApplicableTarriff] as an obvious structure and then populate that array each day from a listed table
Is this the sane approach or is there a better way ? Such as a javascript object ?
Craig