## 3 Quantifying the Value of Energy Storage
Definition 2: The minimum representation of \(v(\theta)\) is:  
\[v(\theta)=\max_{i}\Big{\{}m_{i}+n_{i}^{T}\theta\Big{\}},\ \forall\mu_{i}\in \overline{V}(U) \tag{12}\]  
where \(m_{i}=\mu_{i}^{T}\overline{b}\) and \(n_{i}=\mu_{i}^{T}\overline{B}\) are constant coefficients. Another representation of the piecewise linear (PWL) function in (12) is as follows:  
\[v(\theta)=\left\{ \begin{array}{cc}m_{1}+n_{1}^{T}\theta,&\theta\in\text{CR} _{1}\\ \vdots&\vdots\\ m_{k}+n_{k}^{T}\theta,&\theta\in\text{CR}_{k}\end{array} \right. \tag{13}\]  
where \(\text{CR}_{1},\cdots,\text{CR}_{k}\) are called critical regions, and \(\Theta=\cup_{i=1}^{k}\text{CR}_{i}\). Critical regions are the set of parameters in which respective piece reaches the maximum, therefore  
\[\text{CR}_{i}=\Big{\{}\theta\Big{|}m_{i}+n_{i}^{T}\theta\geq m_{[-i]}+n_{[-i]} ^{T}\theta\Big{\}},[-i]=\{1,\cdots,i-1,i+1,\cdots,k\} \tag{14}\]  
If \(v(\theta)\) is not the minimum representation and contains redundant vertices, then some critical region will be empty because the inequality set does not have a solution. To test if a vertex is redundant, we solve the following linear program  
\[ \begin{array}{c}\min_{\theta,\ s}s\\ \text{s.t.}\ m_{i}+n_{i}^{T}\theta+s\geq m_{[-i]}+n_{[-i]}^{T}\theta\\ s\geq 0\end{array}  \tag{15}\]  
If the optimal value is equal to zero, then the vertex \(\mu_{i}\) is non-redundant. Optimal value function (13) provides explicit sensitivity information. The marginal cost reduction brought by the per unit increase of storage capacity is:  
\[\frac{\partial v(\theta)}{\partial\theta}=\left\{ \begin{array}{cc}n_{1}& \theta\in\text{CR}_{1}\\ \vdots&\vdots\\ n_{k}&\theta\in\text{CR}_{k}\end{array} \right. \tag{16}\]  
However, the vertex set vert \((U)\) not known in advance. We propose a sampling-based algorithm to generate an approximation of \(v(\theta)\). The flow chart is summarized as follows:  
```
1:Step 1: Create uniformly distributed grid points \(\theta_{1},\cdots,\theta_{l}\) in the parameter set \(\Theta\). 2:Step 2: Solve linear program (10) for each \(\theta_{i}\) the corresponding optimal solution is \(\mu_{i}\). 3:Step 3: Remove duplicated dual variables, and calculate \(m_{i}=\mu_{i}^{T}\overline{b}\) and \(n_{i}=\mu_{i}^{T}\overline{B}\); construct \(v(\theta)=\max\limits_{[-1,-\cdot,\cdot]}\left[m_{i}+n_{i}^{T}\theta\right]\)
4:Step 4: Redundancy screen. For each linear function \(m_{i}+n_{i}^{T}\theta\) in the optimal value function, solve.LP (15). If the optimal value is strictly positive, then remove this linear function from \(v(\theta)\). 5:Step 5: Construct critical regions according to (14). ```  
**Algorithm 1 Constructing the Optimal Value Function**According to our experiments, using \(10\times 10\) grid points as the initial samples, Algorithm 1 can produce high quality approximation for \(v(\theta)\). In problem (10), \(\theta\in\mathbb{R}^{2}\), and x is a high-dimensional vector. The average time for solving problem (10) is 0.1 s If we use \(10\times 10\) grid points, the computation time of Algorithm 1 is less than half a minute. The proposed method is developed based on the abstract formulation (2) and makes no specific assumptions on the objective function and operating constraints, except for linearity. On this account, Algorithm 1 is also valid if the linear objective function considers carbon emission or the energy loss/solar power curtailment, or the bidirectional electricity arbitrage is modeled. Future expansions of system facilities can be considered as well, by simply modifying the baseline value of the parameter vector \(\theta\).