# Residential Demand Response Scheduling with Consideration of Consumer Preferences
## 2 Proposed Model
### Mixed Integer Programming (MIP) Model  
This model can formally be represented using a mixed integer programming having the following input parameters. * \(T\), \(H\), \(A\) are positive integer numbers indicating the total number of time periods, households and different appliance types, respectively. Corresponding to these parameters, we will define sets \(\hat{T}=\{1,...,T\}\), \(\hat{H}=\{1,...,H\}\), \(\hat{A}=\{1,...,A\}\). * \(L\) will be a positive integer number indicating the maximal allowed load at any time period. * \(a_{ha}\) is a binary parameter defined for all \(h\in\hat{H}\), \(a\in\hat{A}\), which indicates if household \(h\) has appliance \(a\). * \(t_{a}\), \(l_{a}\) are integer parameters defined for all \(a\in\hat{A}\) that indicate the running time and energy consumption of appliance \(a\), respectively. * \(c_{hat}\) is an integer parameter defined for all \(h\in\hat{H}\), \(a\in\hat{A}\), \(t\in\hat{T}\) giving the preference level for appliance \(a\) in household \(h\) at time period \(t\). \(c_{hat}\) is defined as follows: 0 indicates the appliance cannot be used; 1 indicates the maximal preference for using the appliance at a given time; and 6 indicates the minimal one. The values of \(c_{hat}\) are selected from a fixed set \(0,...,6\). * \(b_{t}\) is an integer parameter defined for all \(t\in\hat{T}\) indicating the base demand at time interval \(t\). The base demand is used to represent demands that are susceptible to scheduling, like lighting, use of audio/video appliances, _etc._
* \(p_{t}\) is a real number parameter defined for all \(t\in\hat{T}\) indicating the price of energy use at time interval \(t\). The model will use the following decision variables:  
* \(u_{hat}\) is a binary variable indicating if household \(h\) is using appliance \(a\) at time interval \(t\), defined for all \(a\in\hat{A}\), \(h\in\hat{H}\) and \(t\in\hat{T}\);
* \(\hat{l}_{t}\) is an auxiliary variable indicating the total load at time period \(t\), defined for all \(t\in\hat{T}\). Using the model parameters and variables, we can start defining the multi-objective problem. \[\text{Minimize}\quad[\mathit{ProCost},\mathit{AvgDissat},\mathit{MinDissat}] \tag{1}\]  
The three objective functions are the minimal production cost, the average and the minimal dissatisfaction of the preferences of households that are represented by \(\mathit{ProCost}\), \(\mathit{AvgDissat}\), \(\mathit{MinDissat}\), respectively. In the following text, the objective functions and corresponding constraints are defined. As previously stated, two types of productions cost functions are used, one corresponding to a convex function, as in [10,14], and the second one is an hourly pricing scheme, as in [18]. Since both of these functions are dependent on the total load at each time period \(\hat{l}_{t}\), let us first define the related constraints, as follows:  
\[\hat{l}_{t}=b_{t}+\sum_{a\in\hat{A}}\sum_{h\in\hat{H}}l_{a}u_{aht} (t\in\hat{T}) \tag{2}\] \[\hat{l}_{t}\leq L (t\in\hat{T}) \tag{3}\]  
Equation (2) is used to specify the total load \(\hat{l}_{t}\) at each time interval \(t\). \(l_{t}\) is equal to the total demand of all used appliances and the base load at \(t\). Equation (3) is used to guarantee that the total demand is lower or equal to the maximal allowed demand. Now, we can define the two cost functions using the following equations:  
\[\mathit{ProdCost}_{HP}=\sum_{t\in\hat{T}}p_{t}l_{t} \tag{4}\] \[\mathit{ProdCost}_{PL}=\sum_{t\in\hat{T}}f(\hat{l}_{t}) \tag{5}\]  
The cost function based on an hourly pricing scheme \(\mathit{ProdCost}_{HP}\) is given in Equation (4). It simple states that the total production cost is equal to the sum of products \(p_{t}l_{t}\) for all time periods. Equation (5) is used for the second cost function \(\mathit{ProdCost}_{PL}\), where the total production cost is equal to the sum of values \(f(\hat{l})\), where \(f\) is some convex function. In practice, a piece-wise linear approximation of a convex function will be used for \(f\).