Tariff rate priorities

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Tariff rate priorities

grampajohn
Administrator
I'm writing the TariffExaminer, the code that has to decide exactly which Rate applies under specific circumstances. Rates can specify applicability based on hour of day, day of week, usage tier, or any combination of conditions. So the question is, do we assume that two Rates will never be applicable to the same situation, or do we establish a priority scheme that resolves conflicts? I started out thinking that the problem was one of validation, but now I think that could make the Agent's job in composing a Tariff unnecessarily difficult.

So here's a proposed priority scheme that will yield a single Rate that applies in any given circumstance:

1. A Rate that specifies a non-zero usage-tier threshold overrides other Rates that might apply. So a Tariff that is supposed to give low rates for modest usage but higher rates for excess usage could specify 0.25 $/kwh for daily usage above 30 kwh, regardless of time-of-day or day-of-week.

2. A Rate that applies on particular days of the week overrides other Rates that might apply at particular times of the day. So you could have a flat weekend rate, and time-of-use rates during the week, without having to specify that the time-of-use rates do not apply during the weekend.

3. A Rate that applies at particular hours of the day overrides only other Rates that do not specify any tier or time constraints.

4. A Rate that specifies not tier or time constraints will apply only if no other Rate applies.

Feedback welcome, of course. One advantage of this scheme, it seems to me, is that it's easy to understand, besides being relatively easy to implement.