Calculate Incremental Cost

158 Views Asked by At

I am working on a project calculating costs of energy usage & demand. Usage (kWh) is simple - just multiply the kWh x $/kWh unit cost. Demand is a bit tricky. Typically there is a cost per kW applied to the highest demand for the billing period. The simple solutions are:

a) (First suggestion from my customer): Assign the entire cost to the highest demand interval. But that is wrong because it would mean that if that interval didn't exist then everything else would be free.

b) Assign proportionally to all intervals. But that is essentially the same as the usage and is also wrong because it does not account for the incremental cost of the peak interval - i.e., if that peak interval didn't exist then the cost for the billing period would go down substantially more than the proportional demand of that interval.

Here is an example using 10 intervals with integer demand values and 1 kW = $1 to keep it really simple:

Day 1 = 1 kW
Day 2 = 1 kW
Day 3 = 2 kW
Day 4 = 2 kW
Day 5 = 3 kW
Day 6 = 4 kW
Day 7 = 4 kW
Day 8 = 5 kW
Day 9 = 4 kW
Day 10 = 2 kW

a) would assign $5 to Day 8 and everything else would be free, which is clearly wrong.

b) would add up the demand (28 kW) and divide 5 evenly = 0.1786 per kW. That would charge 0.89 for the peak Day 8. But if day 8 dropped to 4 kW then the actual charge for the month would drop by 1, not just 0.1786, and more than the entire 0.89 charged to Day 8.

So I came up with another method that is, IMHO, arguably correct: Assign each group of intervals based on the incremental cost over the next lower set of intervals, applied uniformly across those higher intervals. In this example:

Divide first kW by all days that have at least 1 kW = 10 = 0.10/day
Divide second kW by all days that have at least 2 kW = 8 = 0.125/day
Divide third kW by all days that have at least 3 kW = 5 = 0.20/day
Divide fourth kW by all days that have at least 4 kW = 4 = 0.25/day
Divide fifth kW by all days that have 5 kW = 1 = 1.00/day

Totals:

Day 1 = 0.10
Day 2 = 0.10
Day 3 = 0.225
Day 4 = 0.225
Day 5 = 0.425
Day 6 = 0.675
Day 7 = 0.675
Day 8 = 1.675
Day 9 = 0.675
Day 10 = 0.225

Total = 5.00 - which matches the total charge of 1 x 5 kW = $5

Assuming this is a valid method, how can this be expanded to handle much larger numbers of values (e.g., 96 15-minute intervals/day x a month, so ~ 3,000 values is typical) and real numbers instead of integers. I am fairly certain there is a simple mathematical way to handle this, but what little calculus I learned 30 years ago escapes me and I am not sure what to do. Once I have an equation, I am sure I can turn it into code.

1

There are 1 best solutions below

0
On BEST ANSWER

This approach is equivalent to apportioning costs according to the Shapley value. See f.i. the airport problem.