# Optimized Scheduling of IoT Devices in Healthcare Facilities: Balancing Cost and Quality of Care
## 3 Materials and Methods
### Research Model
Equation (9) calculates \(\gamma\), which represents the total operational cost of device usage across all patients. For each device \(i\), the formula sums the durations of all assignments \((w_{ij}-z_{ij})\) across all patients \(j\) to which the device was assigned (set \(\Gamma_{i}\)). Each device's total usage time is then multiplied by its hourly cost \(c_{i}\). The final value \(\gamma\) is obtained by summing these cost calculations across all devices in the system. In summary, \(\gamma\) provides a comprehensive measure of the economic cost incurred from device utilization throughout the scheduling period, accounting for both assignment durations and device-specific operational costs. Equation (10) calculates \(\sigma\), which represents a weighted measure of the quality of service provided to patients. For each patient \(j\), the algorithm computes the sum of quality-weighted assignment durations \((w_{ij}-z_{ij})\cdot q_{i}\) across all devices \(i\) assigned to that patient. This sum is then normalized by the patient's total stay duration \((g_{j}-f_{j})\) and weighted by the patient's priority \(p_{j}\). The final value \(\sigma\) is obtained by summing these weighted quality measures across all patients. Notably, if a patient \(j\) is assigned only a single device \(i\) during their stay, the summation naturally reduces to a single term, and the normalized, \begin{table}
\begin{tabular}{c l} \hline \hline
**Name** & **Description** \\ \hline \(\Gamma_{i}\) & ordered list of patients assigned to device \(i\in D\), \(\Gamma_{i}\subseteq P\) \\ \(\Lambda_{j}\) & ordered list of devices assigned to patient \(j\in P\), \(\Lambda_{j}\subseteq D\) \\ \(x_{ij_{1}h_{2}}\) & binary variable representing whether device \(i\) is assigned, after patient \(j_{i}\), to \(j_{2}\) \\ \(y_{ji_{2}}\) & binary variable representing whether patient \(j\) is assigned, after device \(i_{1}\), to \(i_{2}\) \\ \(z_{ij}\) & start of assignment of device \(i\) to patient \(j\) \\ \(w_{ij}\) & end of assignment of device \(i\) to patient \(j\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Problem variables. weighted quality for that patient's assignment simplifies to \(p_{j}\cdot q_{i}\). In essence, \(\sigma\) serves as a comprehensive service quality metric, integrating factors such as assignment durations, the inherent quality of the assigned devices, and the clinical priority of the patients. A higher value of \(\sigma\) signifies an improved overall service quality, reflecting a greater emphasis on accommodating the needs of higher-priority patients and the allocation of devices with superior features and functionalities. This metric is designed to capture the multifaceted nature of service quality in our context, ensuring that both the efficiency of the assignment and the tangible benefits experienced by patients are appropriately valued. \[\gamma =\sum_{i\in D}c_{i}\sum_{j\in\Gamma_{i}}(w_{ij}-z_{ij}) \tag{9}\] \[\sigma =\sum_{j\in P}\frac{p_{j}}{g_{j}-f_{j}}\sum_{i\in\Lambda_{j}}q_{i }(w_{ij}-z_{ij}) \tag{10}\]