## 4 Results
### Obtaining the Peak Load Profile
#### 4.1.1 Finding the Load Profile through the Maximum Entropy Principle  
Let us assume the division of a day (24 h) into \(N\) equal intervals, where \(I_{i}\) is the \(i\)-th interval, for \(i=1\ldots n\). Let \(f_{i}\) be a normalized value of load in the \(i\)-th interval (\(I_{i}\)). All intervals overlap the 24 h: \(Dom(\bigcup_{i=1}^{m}I_{i})=24\) h.  
Normalization means satisfying the following conditions: \(\sum_{i=1}^{n}f_{i}=1\) and \(0\leq f_{i}\leq 1\). The length of the \(i\)-th interval is \(TI=T24/n=const\). The load given by a client is defined using subsections. Let us assume the following:  
\(S_{m}\)--the \(m\)-th subsection;  
\(m\)--the number of subsections, where \(m=1\ldots M\) and \(M<<N\);  
\(R_{m}\)--the number of requests in the \(m\)-th subsection (\(S_{m}\)). The domain of \(S_{m}\) satisfies the following equations: \(Dom(\bigcup_{m=1}^{M}S_{m})=24\) h and  
\[\text{Dom}(S_{m})=\text{Dom}(\bigcup_{i=i_{m,start}}^{i_{m,step}}I_{i}). \tag{1}\]  
According to Equation (1):  
The beginning of the domain of \(S_{m}\) is \((i_{m\_start}-1)TI\);  
The end of the domain of \(S_{m}\) is \(i_{m\_stop}TI\);  
The length of the \(S_{m}\) domain equals:  
\[T_{m}=(i_{m\_stop}-i_{m\_start}+1)TI. \tag{2}\]  
Let us assume that the \(m=1\) subsection is the wider one, i.e., the subsection that has a domain that equals 24 h (a whole day). Then, \(R_{1}>R_{m}\) for \(m=2\ldots M\). Let us define \(r_{m}=R_{m}/R_{1}\) for \(m=1\ldots M\) as a normalized load \"to the \(1\)\" in the \(S_{m}\) subsection. The sample of \(S_{m}\) properties (the real examples) is presented in Table 2. A certain resolution of the interval division is also assumed, i.e., \(N=48\), so \(TI=24\) h/\(48=30\) min. Let us present formulas defining the dependency between the \(f_{i}\) and \(r_{m}\) values for each \(m\)-th subsection:  
\[\sum_{i=i_{m,stapt}}^{i_{m,stapt}}f_{i}=r_{m}\text{ for }m=1\ldots M. \tag{3}\]  
According to the real data from Table 2 and using Equation (3), we can obtain concrete \(M=3\) equations:  
\[\sum_{i=1}^{48}f_{i}=1,\sum_{i=22}^{33}f_{i}=0.66,\sum_{i=24}^{29}f_{i}=0.42. \tag{4}\]  
This can be written in matrix expression:  
\[\mathbf{A}\times\mathbf{F}=\mathbf{R} \tag{5}\]  
where \(\mathbf{A}\) is presented in Table 3 and \(\text{F}=[f_{1},\ldots,f_{N}]^{T}=[f_{1},\ldots,f_{48}]^{T}\) and \(\mathbf{R}=[r_{1},r_{2},r_{3}]^{T}=[1,0.66,0.42]^{T}\). The next step in finding \(f_{i}\) is based on the well-known maximum entropy principle. The crucial observation is that pairs \((i,f_{i})\) can be treated as a discrete distribution with unknown values of probabilities \(f_{i}\). The optimal vector of \(f_{i,opt}\) can be obtained by finding the maximum entropy. This is equivalent to the problem of finding the optimal (minimum) value of some quality indicator (minus entropy) subject to some constraints, i.e.,  
\[[f_{1\_opt},\ldots,f_{N\_opt}]^{T}=\arg(\min_{(f_{1},\ldots,f_{N})\sum_{i=i_{ m,stapt}}^{i_{m,stapt}}f_{i}=r_{m}\text{ for }m=1\ldots M\text{ \& }0\leq f_{i}\leq 1}-\text{Entropy}(f_{1},\ldots,f_{N})) \tag{6}\]  
where  
\[\text{Entropy}(f_{1},\ldots,f_{N})=-\sum_{i=1}^{N}(f_{i}\log_{2}(f_{i})). \tag{7}\]  
The following is Algorithm 1 for finding normalized optimal values of \(f_{i}\) returned in _F_opt_ :  
```
(input:A,R;outputF_opt) 01b=[0,...,0]//lowerboundariesforf_i 02 ub=[1,...,1]//upperboundariesforf_i 03F_opt=fmin(minusentropy,A,R,lb,ub)
```  
**Algorithm 1**Finding the optimal load profile using Entropy and load constrains.