Online Algorithm for Demand Response with Inelastic Demands and Apparent Power Constraint

A classical problem in power systems is to allocate in-coming (elastic or inelastic) demands without violating the operating constraints of electric networks in an online fashion. Although online decision problems have been well-studied in the literature, a unique challenge arising in power systems is the presence of non-linear constraints, a departure from the traditional settings. A particular example is the capacity constraint of apparent power, which gives rise to a quadratic constraint, rather than typical linear constraints. In this paper, we present a competitive randomized online algorithm for deciding whether a sequence of inelastic demands can be allocated for the requested intervals, subject to the total satisfiable apparent power within a time-varying capacity constraint. We also consider an alternative setting with nodal voltage constraint, using a variant of the online algorithm. Finally, simulation studies are provided to evaluate the algorithms empirically.


I. INTRODUCTION
Today's smart grid requires timely control decision-making in dynamic environments, while ensuring the robustness of electric networks. Recently, there have been numerous studies focusing on viable demand response (DR) management. However, there is limited attention devoted to inelastic demand management and real-time control decisions. The control operations of customers' demands in practice usually consist of binary decisions (e.g., appliances that can be either switched on or off). These demands are often requested in an ad hoc manner, without planning. Hence, control decisions are computed without the knowledge of future information.
Typically, in a DR management scheme, there is a single load-serving entity (LSE) or an operator of microgrid (MG), who coordinates the scheduling of DR participant customers' demands over a certain time horizon. Various approaches for modeling the energy management in MGs have been proposed in the literature with different extents of consideration of characteristics and operating constraints. The system under study distinguishes between two distinct settings which are driven by the corresponding operating modes of an MG, namely grid-connected and islanded. These settings feature several realistic characteristics of power systems, such as nonlinear apparent power constraint and nodal voltage constraint.
There is a high probability that an MG once operating in isolated mode will be short of power. The first setting resembles such a scenario, where customers may suffer from A. Karapetyan a reduction of generation occasionally due to limited MG capacity. The employed MG model encompasses a hybrid mix of traditional and renewable energy (RE) supplies that could collectively have a variable (depending on the availability of RE and storage available) yet dispatchable capacity. The intermittent RE sources induce time-varying generation capacity. Constrained by the generation fluctuating over time, LSE is required to make binary control decisions in real time as to maximize the total utility of satisfied customers. To solve the resulting optimization problem, a competitive randomized online algorithm is proposed with a definite theoretical guarantee on the ratio over the offline optimal solution. The algorithm relies on the primal-dual schema introduced in [1].
On the other hand, when interconnected to the main grid MG may exchange energy with it, consequently provisioning sufficient generation supply to meet the demand for increasing customer participation. With growing number of customers, however, the load on MG may bring in significant voltage deviations. This is captured by the second setting considered, where LSE makes online binary control decisions to maximize the cumulative utility of satisfied customers subject to the nodal voltages of the distribution network not exceeding the acceptable range. The voltage constrained problem is studied under a relaxed model assuming path topology and small transmission power loss. A variant of the online algorithm is invoked to solve this problem.

II. RELATED WORK A. Online Algorithms
Online algorithms are critical for a wide range of problems involving uncertain input and timely decisions [2]- [5]. In an online problem, a sequence of input is revealed gradually over time. The algorithm needs to make certain decisions and generates output instantaneously over time, based on only the part of the input that have seen so far, without knowing the rest of the input in the future. The performance of online algorithms is usually evaluated using competitive analysis. The competitive ratio [2] of an online algorithm is defined as the worst-case ratio between the cost of the solution obtained by the online algorithm versus that of an offline optimal solution obtained by knowing all input sequence in the future.

B. Alternative Current Electric Power Allocation
There are several recent studies on demand response management for alternative current electric power sysetms with inelastic demands. For a single-link case, demand response with inelastic demands has been studied as the complex-demand arXiv:1611.00559v2 [cs.DS] 25 Oct 2021 knapsack problem (CKP) and its application to power demand allocation was highlighted by [6]. Let θ be the maximum angle between any complex valued demands. [6] obtained a 1 2 -approximation for the case where 0 ≤ θ ≤ π 2 .
III. MODEL AND PROBLEM FORMULATION The adopted DR model envisions a single LSE procuring the scheduling of customers' demands over a decision horizon T {1, ..., m}. The decision horizon T is discretized into m equal periods with a duration corresponding to the required time resolution granularity at which demand response management decisions are to be produced. To capture the volatile renewable energy sources, the available MG capacity is denoted by C t ∈ R at each time (slot) t ∈ T .

A. Customer and Load Model
Consider a set of customers N {1, ..., n} for a DR management scheme run by LSE. A customer k ∈ N is associated with a complex-valued power demand S k ∈ C required for operating certain electric appliances at each time instant t in a predetermined preferred schedulable interval T k = [t 1 , t 2 ] ⊆ T . Without loss of generality, we assume that the customers arrive in a sequential fashion from 1 to n. Also, it is assumed that each customer arriving at time t declares T k at the beginning of t.
The customers' demands are categorized into two types according to their operation and energy consumption characteristics, elastic (divisible) and inelastic (indivisible). The demand of a customer possessing inelastic load can be either shed or fed completely over the specified time period. This models the electric appliances that can operate only under particular energy supply level (e.g., washing machine, vacuum cleaner). Different from the inelastic demands, an elastic load may be satisfied partially and adjusted to operate with different energy consumption levels (e.g., air conditioners, LED light bulbs).
Each customer is an independent decision maker. The response to the incentives posed by the DR aggregator is modeled by an utility function. For simplicity, the utility function is summarized by an utility value u k associated with a customer k ∈ N that quantifies the extent of satisfaction obtained (or alternatively, the payment) by customer k when own power demand is satisfied. In the case with inelastic demands, if S k is satisfied at each time t ∈ T k , u k is the perceived utility for customer k, otherwise zero utility is perceived. As for a customer k ∈ N with an elastic load, a portion b ∈ [0, 1] of the demand S k scheduled over T k imparts an utility of b·u k .

B. Real-time Demand Response Management
In the online setting, the set of customers N is not known in advance, but is revealed progressively over time as customers continue to arrive. While DR participants arrive one at a time, LSE should determine, at each time instant, a scheduling decision on the demand arrived which once outputted cannot be undone or altered.
Note that deploying a centralized management system requires customers to submit their demands and utilities to LSE upon arrival as the inputs for optimization, which may compromise customer privacy. A distributed management system dilutes such concerns by allowing certain computations to be performed on a customer's side involving minimal exchanges of information. The algorithm proposed in this paper is sufficiently flexible to handle both centralized and distributed settings. For clarity of presentation, the centralized setting is primarily considered, where each customer declares his reactive and active power demand, preferred scheduling interval and his utility to LSE upon arrival.

C. Optimization under Generation Capacity Constraint
Now that the system model is established, the complexdemand scheduling problem [10] with a generation capacity constraint (CSP C ) can be formulated by the following quadratically constrained integer programming problem.
Here, x k is a binary decision variable that takes value 1 if and only if the k-th customer's power demand S k is satisfied for all time slots t ∈ T k . The CSP C problem aims at maximizing the overall net utility of customers arriving online without violating the apparent power generation C t over all time slots t ∈ T . Note that the time-varying capacity (C t ) t∈T is assumed to be known (or at least estimated) in advance. Otherwise, it is impossible to schedule a current customer's demand without violating the future capacity constraint.
Evidently, CSP C is NP-HARD, since the 0-1 classical knapsack problem is a special case of CSP C . In fact, the presence of complex-demands in CSP C makes it an even harder problem (as shown to be strongly NP-HARD [9]). Before the proposed online algorithm is introduced, a measure for assessing the quality of the computed solution of CSP C problem is provided in the subsequent section.

D. Competitive Ratio
Let the inputs of CSP C at time t of the arriving customers be σ t = u k , T k , S k k∈N :t∈T . Recall that in an online algorithm, the decision at the current time t only depends on the inputs available before or at t, namely, ] be the expected objective value (i.e., k∈N u k x k ) by a randomized algorithm ALG, and OPT(σ) be the objective value of an offline optimal solution (that knows all future inputs). In competitive algorithmic analysis, the competitive ratio is a common performance metric, defined as the worst-case ratio between the expected objective value of the online algorithm ALG and that of an offline optimal solution, namely, Similarly, an algorithm ALG is called c-competitive, if CR(ALG) = c. The absence of any information concerning the future inputs limits the performance of an online algorithm severely as compared to that of offline algorithm possessing complete knowledge of all future inputs. In this context, comparing the performance of ALG against such all-powerful benchmark is substantially difficult. In fact, it was shown in [11] that if one makes no assumptions it is impossible to devise a non-trivial constant factor competitive online algorithm. This necessitates the need for introducing the assumptions listed hereunder that will be followed throughout this paper.
1) The largest demand of a customer is at most the smallest capacity over all time slots, namely, This is known in the literature [12] as the no bottleneck assumption (NBA). 2) There exist positive a max , a min , u max , u min and T max known apriori such that for ∀k ∈ N We remark that the NBA assumption naturally holds in power systems, since individual demands are typically much smaller than the generation capacity over all time slots.

IV. COMPETITIVE ONLINE ALGORITHM
The presence of complex-valued power demands in CSP C problem bestows substantially challenging problem which, in general, is NP-hard to solve. This section presents an efficient randomized online algorithm (Online) in Algorithm 1 to compute solutions of CSP C problem that are close to the offline optimal solution, with a precise theoretical guarantee on their competitive ratio. Online, which is extended from the algorithm presented in [12] for solving the Unsplittable Flow problem, as a subroutine invokes a primal-dual (PD) schema similar to that introduced in [1] for online fractional packing problem (FPP). The adapted PD schema is explained in Algorithm 2.
Unlike FPP, CSP C problem requires integral solutions. Also, CSP C has quadratic constraints, whereas FPP has only linear ones. The basic idea is that Online relates the quadratically constrained CSP C to a linearly constrained packing problem by Lemma 3. This allows us to use the framework of [1] to obtain a close-to-optimal fractional solution x (i.e., elastic demands). To convert the fractional solution x to an integral solution x (i.e., inelastic demands) without losing much in the quality of the solution, a rounding technique called randomized rounding with correction is utilized [12]. For this to work, the demands are categorized based on a predetermined threshold into two sets, one set I L designated for those with large magnitude as compared to the capacity, while the remaining ones comprise the other set I S . The primal-dual schema is then invoked on each set in parallel to obtain primal-dual fractional solutions ( x, y) and ( x, y) for the small and large demands, respectively. Rounding the fractional solutions to an integral solution x probabilistically concludes the execution.
We next show analytically that Algorithm Online is a competitive online algorithm for CSP C problem under certain assumptions. Define θ max k,k ∈N | arg(S k ) − arg(S k )| to be the maximum difference between the phase angles of any pair of customer power demands. Note that in practice θ < π 2 , due to regulations requiring electric equipment to conform with a maximum power factor. More precisely, θ is usually restricted to be in the range of [0, 36 • ] [13]. Denote by S R k Re(S k ) the active power demand of customer k, and by S I k Im(S k ) the reactive power demand. For clarity of presentation, this paper assumes (via a rotation) that S R k ≥ 0 and S I k ≥ 0 for ∀t ∈ T , k ∈ N .
Theorem 1: Under the NBA assumption, algorithm Online produces a feasible solution to CSP C , with the following competitive ratio: .
The proof of Theorem 1 is deferred to the appendix.

V. OPTIMIZATION UNDER VOLTAGE CONSTRAINT
This section presents a variant of the complex-demand scheduling problem where, instead of the capacity constraint, the nodal voltages in the distribution network are restricted to remain within the nominal range at all time steps. To introduce the voltage constraint into the DR optimization problem a model of the distribution network is established below.
Consider a path topology G = (V, E) that represents a distribution system feeder, where each customer k is located at a given node except the root. For simplicity, assume V = {0, 1, . . . , d} and E = {(0, 1), (1, 2), . . . , (d − 1, d)}. The root (denoted by node 0) is either a substation or a generator which powers the entire system. For each node i ∈ V\{0}, there is a set of customers attached to i, denoted by M i . For node i ∈ V, denote its voltage by V i ∈ C. For each edge e = (i, i + 1) ∈ E, denote its current from i to i + 1 by I i,i+1 , its impedance by z i,i+1 ∈ C, and with a slight abuse of notation, its transmitted power by S i,i+1 . A power flow in a steady state is described by a set of power flow equations. In radial networks (which include paths) the Branch Flow Model (BFM) proposed by [14] can be used to model them.
Let v i |V i | 2 and i,i+1 |I i,i+1 | 2 be the magnitude square of voltage at node i ∈ V and current at edge (i, i+1) ∈ E, respectively. The BFM is given by the following for all Execution upon the k-th customer: where it is assumed S d,d+1 = 0. Here, x k again is a binary decision variable that takes value 1 if and only if the k-th customer's power demand S k is satisfied. At any time step, the operating constraint requires voltage v i to be at least a given number v min ∈ R, that is In MGs, the size of the grid is typically small and most power demand can be attributed to customers' demands, and hence, the effect of transmission loss is negligible. As a consequence, one can approximate the optimal power flow model by dropping the terms associated with the transmission power loss (i.e., |z i,i+1 | 2 i,i+1 , z i,i+1 i,i+1 ), and then derive a feasible solution without explicitly considering the transmission power loss [15]. Rewriting Eqn. (6) by recursively substituting S i+1,i+2 and dropping z i,i+1 i,i+1 gives For k ∈ N denote by (k) the index ∈ V such that k ∈ M . For each i = 1, . . . d, Cons. (7) can be rewritten as where h min{i, (k) − 1} and the last statement follows from exchanging the summation operators.
Assumption 1: We assume throughout this paper that z R i,i+1 S R k +z I i,i+1 S I k ≥ 0 for all customers k and edges (i, i+1). Observe that by Assumption 1 it is sufficient to consider Cons. (10) only at the edge (d − 1, d) ∈ E furthest from the root, because the left hand side of the constraint at that edge is the largest among all other edges. The complexdemand scheduling problem under voltage constraint (CSP V ) is embodied by the following integer programming problem.
where v 1 2 (v 0 − v min ). A similar algorithm of Algorithm 1 can be devised to solve CSP V . It is identical to Online except that the customer power demands S k are replaced by z R j,j+1 S R k + z I j,j+1 S I k for ∀k ∈ N and time-varying capacities C t are replaced by v over all the time slots t ∈ T . The consecutive section applies the modified algorithm to one of the feeders of the Canadian benchmark system (see Fig. 1).

Bus1
Bus2 VI. EMPIRICAL EVALUATION To complement the analytic result in Theorem 1, this section evaluates the proposed algorithm Online empirically under extensive scenarios. The objective value obtained by Online when applied to CSP C and CSP V is compared against that of offline optimal solution by numerical solver CPLEX. The results are also compared with a benchmark algorithm, FCFS (first-come-first-serve), which greedily schedules the loads in the arrival order until the corresponding operating constraint is violated (i.e. apparent power constraint or voltage constraint).

A. Simulation Setup
An MG with an overall generation capacity of 4MVA is simulated with over 2000 customers arriving in a sequential manner. Each customer has a power demand (including both active and reactive power) defined over a certain time interval and a utility that is generated according to a probability preference model. The output solution of CPLEX optimizer is denoted by OFL. Customer arrival follows an uniformly random probability distribution and demand durations are picked at random, from a uniform distribution on the interval {1, . . . , max k∈N |T k |} where |T k | ≤ |T | for ∀k ∈ N . The time-varying generation capacity follows a Bernoulli process.
For the CSP V problem the candidate algorithms are applied to the Canadian benchmark distribution system depicted in Fig 1. The power system analysis package PSCAD was utilized to simulate the feeder which is rated at 8.7MVA, 400A and 12.47KV. Each feeder section is a 700MCM Cu XLPE cable with z = 0.1529 + J0.1406 Ω/km and each node consists of a 2MVA total load.
The following are settings for the case studies in this paper. a) Quadratic utility: The utility of each customer is a function of the power demand in the form of where a, b, c ≥ 0 are predetermined constants. b) Random utility: The utility of each customer is independent of the power demand and is generated randomly from [0, |S max (k)|], where |S max (k)| depends on the customer type: if customer k is a commercial customer then |S max (k) = 1MVA|, otherwise if residential |S max (k) = 20KVA|.

B. Results
Figs. 2 and 3 illustrate the empirical results for two case studies with quadratic and random utilities. As can be observed from both figures, Online approaches OFL in most cases, whereas FCFS drifts far away from OFL in some cases. The results illustrated in Fig. 3 show that Online obtains higher objective value as compared to FCFS while maintaining appropriate voltage level of the end of the feeder (i.e. is within IEEE standard 1547 limits).

VII. CONCLUSION
We presented a competitive randomized online algorithm for deciding whether a sequence of inelastic demands can be allocated for the requested intervals, subject to the total satisfiable apparent power within a time-varying capacity constraint. We also applied to an alternative setting with nodal voltage constraint, using a variant of the online algorithm. In future work, we will consider an extension to radial network topology [15]. Finally, we note that our online algorithm can be adapted to a distributed setting, such that the customers decide the scheduling decisions without submitting full preferences. A detailed adaption will be provided in future work.

APPENDIX
The appendix gives an overview of the preliminaries of primal-dual schema [1] followed by the proof of Theorem 1.

A. Duality and Linear Relaxation
Relax the integrality constraints (2) (x k ) k∈N ∈ {0, 1} |N | in CSP C problem and substitute customers' complex-valued power demands by their real-valued magnitude: Note that any feasible integral solution x for (CSP R ) is also feasible for CSP C , as | k∈N :t∈T k S k x k | ≤ k∈N :t∈T k |S k |x k ≤ C t for all t ∈ T . Define x k u k x k . We will use the following generic linear programming problem (which we call the dual LP for convenience). The coefficients a k,t , the setsN ,T k andT , and the right-hand sidesC t will be set later depending on whether we are dealing with large or small demands.
x k ≥ 0 ∀k ∈N . Next, formulate the corresponding primal minimization linear programming problem, dual to (D).
The primal-dual pair (P) and (D) are broadly referred to as general fractional covering and packing problems respectively. Observe that the primal linear program (P) comprises |T | variables which correspond to the constrains of the dual (D) and |N | constraints corresponding to the dual variables. A wellknown fundamental lemma which establishes the correlation between primal and dual feasible solutions is stated below.

B. Primal-Dual Schema
In this section, we describe the primal-dual schema of [1] for providing a competitive solution for the online fractional packing problem (D).
Recall that in the online setting studied here the constraints matrix defining the feasibility region of (D) is revealed to the algorithm column by column. In other words, the knowledge about the capacity profile and time interval is available to Online prior to execution, whereas customer utilities and demands are given one at a time. The Online algorithm at each round outputs a load scheduling decision on only the current demand, which once made is irrevocable.
Consider the k-th round where customer k ∈N arrives introducing a new variable x k along with its respective constraints. Online first obtains a fractional solution x k by solving the primal-dual pair (P) and (D). The algorithm attains this by increasing the value of the new variable x k continuously and updating the primal variables (y t ) t∈T such that y t = max y t , e 1 2C t j∈{1,...,k},t∈T j aj,t xj − 1 as long as the corresponding primal constrains are infeasible. Let P (k) and D(k) be the objective values of the primal and dual problems respectively, obtained up to the k-th round. In [1], the following three claims were proved to hold for the aforementioned primal-dual schema.
(A2) The scheme produces a feasible primal solution.
Proof of (A1): Given that initially, P (0) = D(0) = 0, consider the k-th round when the dual variable x k is being increased iteratively. To prove the claim it suffices to show that ∂P(k) as |T k | ≤T max . Since the covering constraint (17) remains infeasible while x k is being iteratively increased, it follows from Eqn. (21) that Proof of (A2): Consider the k-th round when the corresponding primal variables y t are being increased until the associated primal constraints become feasible. The feasible constrains remain satisfied in the subsequent rounds since none of these variables decrease.
Proof of (A3): Note that during the execution of this primaldual schema a primal variable y t , for t ∈T k , is upper bounded by 1 a min (i.e., y t ≤ 1 a min ) in the k-th round, since otherwise the corresponding constraint a k,t y t ≥ 1 with a k,t > 0 would already be satisfied. Therefore, Simplifying Eqn. (23) yields j∈{1,...,k},t∈Tj Scale down each dual variable x k by a factor of r = 2 log 1+ T maxāmax a min to construct a dual feasible solution. Then, by claim (A1), we obtain Let OPT D be the objective value of an optimal offline solution to the dual problem (D). Lemma 1 together with claim (A2) imply that and thus it follows from Eqns. (24) and (25) that Hence, this proves that the primal-dual schema above devises an r-competitive solution for the dual problem (D).

C. Proof of Theorem 1
Proof: The proposed algorithm Online when applied to CSP C problem employs the above primal-dual schema, after partitioning demands into two sets I S and I L . Following [12], given a constant δ ∈ [0, 1 2 ), we define a demand S k to be δ-small if |S k | ≤ δ min t∈T k {C t }, otherwise define it to be δ-large. The former set I S is comprised of only the δ-small demands, and the latter set I L contains the rest of the demands. The primal-dual schema is applied on each set in parallel. The algorithm then rounds the obtained solutions randomly under NBA and corrects the rounded integral solutions whenever necessary. Next, we analyze these three steps in detail.
We δ-Small Demands: To obtain a feasible approximate fractional solution ( x k ) k∈I S for δ-small demands Online applies the aforementioned primal-dual schema on an instance of problem (D) with δ-small demands only with the following parameters: N = I S , a k,t = |S k | u k for ∀k ∈ I S , t ∈ T k andC t = C t for all t ∈ T . To account for the constraint x k ≤ 1, we imagine a dummy time slot t with capacity 1 (hence, the assignments T s ← T k ∪{|T |}, C |T | ← u k and a s,|T | ← 1 in steps 11-12 of Algorithm 1); this ensures the normalized fractional decision variable x k is upper bounded by u k . Thus, OPT D = OPT * S . Let x be the solution returned by Algorithm 2 on δ-small demands, and set x s = ( x k u k ) k∈I S . Then by (A1), (A2) and (A3) above, δ-Large Demands: To obtain a feasible approximate fractional solution ( x k ) k∈I L for δ-large demands Online applies the aforementioned primal-dual schema on an instance of problem (D) with δ-large demands only with the following parameters: N = I L , a k,t = 1 u k for ∀k ∈ I L , t ∈ T k andC t = 1 for all t ∈ T . In other words, Online invokes the primal-dual approach to approximately solve fractional weighted maximum independent set (FWMIS) problem on the set I L . Define x i u i x i ∀i ∈ I L , then FWMIS problem is captured by the following linear programming problem.
Denote by OPT F the objective value of an optimal solution of (FWMIS). Then OPT D = OPT F ≥ δ 2 2 OPT * L by part (B2) of Lemma 2 below. Let x be the solution returned by Algorithm 2 on δ-large demands, and set x = ( x k u k ) k∈I L . Then by (A1), (A2) and (A3) above, 2r L , where r S is given in step 7.
Randomized Rounding and Correction: Initially, Online (step 8) chooses τ ∈ {0, 1} at random to determine which of the fractional solutions, either among δ-large demands or δ-small demands, will be used for rounding. Online lastly randomly rounds the fractional solutions of the chosen set (either δ-large or δ-small demands), after scaling them by a factor of α u k (α ≤ 1), to obtain an integral solution (x i ) i∈N ∈ {0, 1} n to problem CSP C . This may still result in infeasible solution, which calls for a correction step where a manual feasibility check should be invoked. In this step, the demand arrived in k-th round is scheduled (i.e, x k = 1) over the time interval T k if scheduling it does not violate any capacity constraint. In the case if the demand is accepted, the corresponding capacities are reduced by the magnitude of the demand to maintain feasibility.
Denote by Z ONL the expected utility of the output solution of Online for the CSP C problem. In [12] it was shown that the rounding steps for δ-small demands in Online result in an integer solution (among I S ) with an expected total utility of at least α 1 − i ≥ 0 for α = 0.138 and δ = 0.333. On the other hand, for δ-large demands, Lemma 5 below shows that the expected utility of rounded integer solution Online obtains for δ-large demands is at least 1 4 OPT F which is at least δ 2 8r L OPT * L = 0.0139 OPT * L r L . Since Online chooses among the δ-large and δ-small demands with equal probability, by parts (B1) and (B3) of Lemma 2. This completes the proof of the theorem.
Lemma 2: The following inequalities hold: (B1) OPT * ≤ OPT * S + OPT * L ; (B2) OPT F ≥ δ 2 2 OPT * L ; (B3) OPT * ≥ cos θ 2 OPT. Proof: (B1) Let x * be an optimal solution for (CSP R ). Then (x * k ) k∈I S and (x * k ) k∈I L are feasible solutions for (CSP R [S]) and (CSP R [L]), respectively. Thus, k∈I S u k x * k ≤ OPT * S and k∈I L u k x * k ≤ OPT * L , implying that OPT * = k∈I S u k x * k + k∈I L u k x * k ≤ OPT * S + OPT * L . (B2) Let x * be an optimal solution for (CSP R [L]). Then by Lemma 4, k∈I L :t∈T k x * k ≤ 2 δ 2 for all t ∈ T . It follows that x = ( δ 2 2 u k x * k ) k∈I L is a feasible solution for (FWMIS), and hence OPT F ≥ k∈I L x k = δ 2 2 k∈I L u k x * k = δ 2 2 OPT * L . (B3) Let x * be an optimal solution for (CSP C ). By Lemma 3 below and using the fact that x * satisfies (1) and (2) we have since θ is restricted to be at most π 2 . Thus, x = (cos θ 2 x * k ) k∈N is a feasible solution to (CSP R ). This implies that OPT * ≥ cos θ 2 k∈N u k x * k = cos θ 2 OPT. Lemma 3: ( [16] ) Given a set of 2D vectors where θ is the maximum angle between any pair of vectors {d i ∈ R 2 } n i=1 and 0 ≤ θ ≤ π 2 . Lemma 4: Fix a feasible solution (x * k ) k∈I L to an instance of problem (CSP R [L]). Then under the NBA assumption, at any time instant t ∈ T , k∈I L :t∈T k x * k ≤ 2 δ 2 . Proof: We use a similar argument to the one in Lemma 5.1 in [12], applied to the fractional problem. For each demand k ∈ I L , identify a bottleneck time slot t k ∈ T k such that C t k = min t∈T k C t . Fix a time slot t ∈ T . Let I L (t) be the set of all demands k ∈ I L such that t ∈ T k . We partition the set of demands in I L (t) into two sets I L (t) and I r L (t): a demand k ∈ I L (t) is in I L (t) if it has its bottleneck time slot to the left of t (including t), otherwise the demand is in I r L (t). We show that k∈I L (t) x * k ≤ 1 δ 2 and a similar argument shows that k∈I r L (t) x * k ≤ 1 δ 2 , which together imply the lemma. Let A be the set of bottleneck slots for demands in I L (t) and let t be the rightmost slot in A. As t is a bottleneck slot for some δ-large demand j ∈ I L (t) and by the NBA, we have δC t ≤ |S j | ≤ C min , which implies that C min ≥ δC t , and hence |S k | ≥ δC t k ≥ δC min ≥ δ 2 C t for any δ-large demand k ∈ I L . Since t is the rightmost time slot in A, t ∈ T k for all demands k ∈ I L (t). Hence, form the above and the feasibility of x to (CSP R [L]), we get It follows that k∈I L (t) x * k ≤ 1 δ 2 . Lemma 5: Fix a feasible solution ( x k ) k∈I L to an instance of problem (FWMIS). Then the integral solution x = (x k ) k∈I L obtained by setting x k = 1 with probability x k 2u k , followed by a correction step, has expected utility at least 1 4 k∈I L x k . Proof: For k ∈ I L , let X k ∈ {0, 1} be a random variable indicating whether demand k was selected initially, and Y k ∈ {0, 1} be a random variable indicating whether demand k survives the correction step. Then P[Y k = 1] = (1 − P[Y k = 0|X k = 1])P[X k = 1]. Let t ∈ T be the time slot at which demand k arrives. Note that P[Y k = 0|X k = 1] is the probability that there exists a demand j ∈ I L that arrived before k such that t ∈ T j and Y k = 1. Thus, P[Y k = 0|X k = 1] ≤ j∈I L :t∈ Tj P[X j = 1] = j∈I L :t∈ Tj by the feasibility of x for (FWMIS). It follows that P[Y k = 1] ≥ 1 2 · x k 2u k and hence the expected utility of the integral solution obtained is k∈I L u k P[Y k = 1] ≥ 1 4 k∈I L x k . Remark: It is worthwhile mentioning that to the best of our knowledge there are no known results in the literature concerning the lower bound of the competitive ratio of the online problem CSP C . From the arguments stated in [1], however, it holds that O(log( a max a min )) is indeed the best possible competitive ratio that could be achieved by any online algorithm for an instance of the online problem D with only a single constraint, which will be matched by the achievable competitive ratio of our online algorithm in such case.