Competitive Algorithms for the Online Multiple Knapsack Problem with Application to Electric Vehicle Charging

We introduce and study a general version of the fractional online knapsack problem with multiple knapsacks, heterogeneous constraints on which items can be assigned to which knapsack, and rate-limiting constraints on the assignment of items to knapsacks. This problem generalizes variations of the knapsack problem and of the one-way trading problem that have previously been treated separately, and additionally finds application to the real-time control of electric vehicle (EV) charging. We introduce a new algorithm that achieves a competitive ratio within an additive factor of one of the best achievable competitive ratios for the general problem and matches or improves upon the best-known competitive ratio for special cases in the knapsack and one-way trading literatures. Moreover, our analysis provides a novel approach to online algorithm design based on an instance-dependent primal-dual analysis that connects the identification of worst-case instances to the design of algorithms. Finally, we illustrate the proposed algorithm via trace-based experiments of EV charging.


PROBLEM STATEMENT
We focus on a novel generalization of the fractional Online Multiple Knapsack Problem (FOMKP), which can unify a wide variety of classical online problems. On one hand, it is a generalization of two classical online optimization problems: the one-way trading [1] and the online knapsack problems [3], bringing together two streams of research that were previously treated separately in the literature. On the other hand, it is the core model of many practical online decision-making applications such as the online electric vehicle charging and online geographical load balancing problems.
FOMKP considers a setting where items in a set N need to be packed into knapsacks in a set M. For each item , the operator decides an assignment vector denoted by := ( 1 , . . . , ), where each entry is the fraction of item packed into the knapsack . The set of assignment vectors satisfying (1)-(3) is Y : The first constraint (1) is a demand constraint, which bounds the total accepted fractions of the item by the item size . The second constraint (2) ensures the assigned fractions satisfy the capacity constraints, of the heterogeneous knapsacks, where is the maximum capacity of the knapsack . The third constraint (3) is a rate constraint, which ensures that at most fraction of the item can be packed into the knapsack .
Objective function. The objective of an FOMKP is to optimize the value of packed items subject to the constraints (1)-(3). More formally, let ( ) : Y → R + denote the value function of the item . This function models the value of the item with an assignment vector . Optimizing over assignment vectors that satisfy (1) Assumptions. We assume that the value functions satisfy the following regularity conditions. Assumption 1.1. The value functions { : ∈ N } satisfy: (i) for any ∈ N , (·) is non-decreasing, differentiable and concave; (ii) for any ∈ N , (0) = 0; (iii) the partial derivative of (·) is bounded, i.e., there exist constants , > 0 such that for any ∈ N and ∈ M, ≤ ≤ .
The first condition ensures that the value function is smooth and has diminishing returns. The second condition indicates that packing no item earns no value. The third condition requires that the partial derivatives of the value function are lower and upper bounded by and , respectively. and are assumed to be known and let := / denote the fluctuation ratio.

6: end while
We design an online threshold-based algorithm (OTA), i.e., Algorithm 1, to solve the FOMKP. Its basic idea is to use a threshold function to estimate the cost of a knapsack assignment and determine the online solution by solving a pseudo-utility maximization problem (5), i.e., the value from the item minus the cost of packing it. Since OTA is fully parameterized by , the key design question is how to determine the threshold function such that OTA is competitive with the offline optimum. This paper proposes to design the threshold function using an instance-dependent online primal-dual (OPD) analysis that extracts the design of the threshold function from the identification of a worst-case instance. The novelty of this approach is the construction of instance-dependent offline formulations by adding constraints to the primal problem that are constructed based on online solutions, and then utilizing the corresponding dual objectives to bound the offline optimum. In this way, we actually perform an instance-dependent OPD analysis. Moreover, by focusing on the worst-case instances, this approach yields threshold functions that are tuned to the challenges of the online problem, and are tight for the worst case. Based on this approach, the main results of our paper [2] can be summarized as follows.
The competitive ratios of both cases in Theorem 2.1 are bounded between 1 + ln and 2 + ln , where 1 + ln is a lower bound of the optimal competitive ratio. Compared to the design proposed in prior work [3], which uses the same threshold function for all knapsacks, we achieve improved competitive ratios since the threshold functions (6) and (7) for FOMKP are lower, and consequently estimate a lower marginal cost at the same utilization level, encouraging a more aggressive assignment of items.