# Synchronous Remote Calibration for Electricity Meters: Application and Optimization
## 3 Methods
### System Model
#### 3.1.2 Task Model  
In remote calibration systems, the number of devices requiring calibration often exceeds the available standard equipment. Therefore, it is crucial to allocate the large number of calibration requests to appropriate standard equipment and expert terminals. Each calibration request is abstracted as a task unit. Let the task set be denoted as \(\mathcal{N}_{X}=\{X_{1},X_{2},\ldots,X_{t}\}\), where each task is defined as \(X_{t}=\left(X_{t}^{C_{m}},X_{t}^{S_{n}},X_{t}^{Q_{ly}},X_{t}^{T},X_{t}^{st},X_ {t}^{et},X_{t}^{pr}\right)\), indexed by \(t\in\{1,2,\ldots,|\mathcal{N}_{X}|\}\). **(a) Task Assignment Model**  
The task scheduling problem involves assigning multiple independent tasks to clients and servers, considering task types and system capabilities. The tasks are executed synchronously, and the allocation follows constraints based on task type, client, server, and detection point capacities, as follows:  
\[X_{t}^{ty}=Q_{ty}\cdot\mathcal{O}_{t}^{Q_{ty}},\quad\mathcal{O}_{t}^{Q_{ty}} \in\{0,1\},\quad\forall X_{t}\in\mathcal{N}_{X} \tag{2}\]  
\[X_{t}^{C_{m}}=C_{m}\cdot\mathcal{O}_{t}^{C_{m}},\quad\mathcal{O}_{t}^{C_{m}} \in\{0,1\},\quad\forall X_{t}\in\mathcal{N}_{X} \tag{3}\]  
\[X_{t}^{K_{i}}=K_{i}\cdot\mathcal{O}_{t}  
Based on the above equations, we now derive the constraints governing the task assignment process. Once a task is assigned to a client and a server, we must ensure that the assigned client can handle the specific task type, and that the server is capable of processing the corresponding task types:  
\[\sum_{m=1}^{|\mathcal{N}_{C}|}\sum_{ty=1}^{|\mathcal{N}_{Q}|}O_{t}^{Q_{ty}} \cdot O_{t}^{C_{m}}\cdot CTY_{m,ty}=1,\quad\forall t\in\mathcal{N}_{X} \tag{9}\]  
\[\sum_{n=1}^{|\mathcal{N}_{S}|}\sum_{ty=1}^{|\mathcal{N}_{Q}|}O_{t}^{Q_{ty}} \cdot O_{t}^{S_{n}}\cdot STY_{n,ty}=1,\quad\forall t\in\mathcal{N}_{X} \tag{10}\]  
In these constraints, \(CTY_{m,ty}\) represents the capability of client \(C_{m}\) to handle task type \(Q_{ty}\), and \(STY_{n,ty}\) indicates the capability of server \(S_{n}\) to manage task type \(Q_{ty}\). The summations ensure that each task is assigned to a compatible client and server. Additionally, tasks are generated at specific detection points, which are denoted by \(X_{t}^{pr}\). A calibration task is initiated by the equipment at its corresponding detection point:  
\[X_{t}^{pr}=X_{t}^{K_{i}},\quad\forall X_{t}\in\mathcal{N}_{X} \tag{11}\]  
Finally, we introduce a spatial constraint: the assigned client's location must be within the service coverage area of the corresponding central laboratory to ensure task feasibility. \[D_{K_{i},G_{j}}\leq G_{j}^{r},\quad\forall X_{t}\in\mathcal{N}_{X} \tag{12}\]  
In this equation, \(D_{K_{i},G_{j}}\) represents the distance between detection point \(K_{i}\) and central laboratory \(G_{j}\), and \(G_{j}^{r}\) denotes the coverage radius of the laboratory. This constraint ensures that the client assigned to a task is within the operational range of the central laboratory. **(b) Task Time Scheduling**  
In remote calibration systems, the Internet is employed to transmit data and maintain real-time connections between detection points and central laboratories for synchronized calibration. To ensure successful task execution, both clients and servers must be scheduled simultaneously, as shown in Figure 3.  
The synchronization of task start and end times between clients and servers is defined by the following equations:  
\[Time^{st}(C_{m},X_{t})=Time^{st}(S_{n},X_{t}),\quad\forall X_{t}\in\mathcal{N }_{X},\forall\mathbb{C}_{m}\in\mathcal{N}_{C},\forall S_{n}\in\mathcal{N}_{S} \tag{13}\]  
\[Time^{st}(C_{m},X_{t})=Time^{st}(S_{n},X_{t}),\quad\forall X_{t}\in\mathcal{N }_{X},\forall\mathbb{C}_{m}\in\mathcal{N}_{C},\forall S_{n}\in\mathcal{N}_{S} \tag{14}\]  
Here, \(Time^{st}(*,X_{t})\) and \(Time^{st}(*,X_{t})\) denote the start and end times of a task \(X_{t}\) for a given assignment \(*\) (client or server).