TR-2007018: Peak Shaving through Resource Buffering

We introduce and solve a new problem inspired by energy pricing schemes in which a client is billed for peak usage. Given is a sequence of n positive values (d1, d2, . . . , dn) that represent resource demands (typically energy) over time. At each timeslot i, the system requests a certain amount ri to meet the demand di. The added piece of infrastructure is the battery, which can store surplus resource for future use. The demands may represent required amounts of energy, water, or any other tenable resource which can be obtained in advance and held until needed. In a feasible solution, each demand must be supplied on time, through a combination of newly requested energy and energy withdrawn from the battery. The goal is to minimize the maximum request. We consider batteries with and without a bounded capacity, and with or without a percentage loss in charging due to inefficiency. In the online version of this problem, the algorithm must determine request ri without knowledge of future demands, with the goal of maximizing the amount by which the peak is reduced. We give efficient combinatorial algorithms for the offline problem, which are optimal for all four battery types. Central to our analysis is a mathematical property we call a generalized average. Our fastest offline algorithms for the lossy battery settings compute a series of generalized averages with the aid of balanced binary search trees. We also show how to find the optimal offline battery size, for the setting in which the final battery level must equal the initial battery level. In the online setting, we focus on lossless batteries, with and without a capacity bound. We prove that no purely online algorithm can have competitive ratio better than n, and that if the peak demand is revealed in advance, no online algorithm can have competitive ratio better than Hn. We give two simple online algorithms, the fastest one with O(1) per-slot running-time, which meet this bound. ∗This work was supported by grants from the National Science Foundation and the New York State Office of Science, Technology and Academic Research. †amotz@sci.brooklyn.cuny.edu, City University of New York, Graduate Center, and Brooklyn College. ‡{mjohnson,oliu}@cs.gc.cuny.edu, City University of New York, Graduate Center.