# A Mathematical Model for Scheduling and Assignment of Customers in Hospital Waste Collection Routes
## 3 Materials and Methods
The proposed model's formulation corresponds to (1)-(14):  
\[Minimize\ z=capmax \tag{1}\]  
subject to:  
\[\sum_{j\in J}x_{ij}=F_{i}\ \ \ \ \ \ \ \forall i\in I \tag{2}\]  
\[x_{ij}=0\ \ \ \ \ \forall i\in TW,\forall j\in\{2,4,7,9,12,14,17,19\} \tag{3}\]  
\[x_{ij}=x_{i(j+\alpha)}\ \ \ \ \ \forall i\in SW,\forall j\in 1,2,\forall \alpha\in\{2,5,7,10,12,15,17\} \tag{4}\]  
\[x_{ika}=0\ \ \ \ \ \ \forall i\in SW,\forall\alpha\in\{5,10,15,20\} \tag{5}\]  
\[x_{ij}=x_{i(j+\alpha)}\ \ \ \ \ \ \forall i\in W,\forall j\in\{1.5\},\forall \alpha\in\{5,10,15\} \tag{6}\]  
\[x_{ij}=x_{i(j+10)}\ \ \ \ \ \ \forall i\in B,\forall j\in\{1..10\} \tag{7}\]  
\[\sum_{i\in I}K_{i}*x_{ij}\leq capmax\ \ \ \ \ \ \forall j\in J \tag{8}\]  
Figure 1:0Figure 1:1  
Figure 1:2  
Figure 1:3  
Figure 1:4  
Figure 1:5  
The objective function (1) of the model seeks to minimize the maximum daily truck-loads (Min-Max), achieving no days with an excess of work for the main problem company. According to their associated frequency, the set of constraints (2) assign several visits on the month to reach customers. For example, for monthly customers, \(F_{i}\) takes the value of 1, that is, they are assigned only one visit in a month, on the other hand, for weekly customers, \(F_{i}\) takes the value of 4, and they are assigned four visits in a month. Note that \(F_{i}\) considers the number of visits each month. Therefore, the model's maximum planning period is a month considering each day's visits (\(F_{i}\) takes the value of 30). In addition, (2) ensures the monthly customers and diary customers must be assigned at least once a month and every day, respectively. The set of constraints (3)-(7) ensures that the frequency is respected according to a pre-established pattern. The customers on a daily basis only need the constraints (2) because they are visited every day of the month. The customers with frequency thrice-weekly need the constraints (2) and (3) to ensure not being allocated on Tuesday and Thursday. The customers with frequency semi-weekly need the constraints (2), (4), and (5) to ensure to be allocated on Monday and Wednesday, or Tuesday and Thursday, but not on Friday. The customers with frequency weekly need the constraints (2) and (6) to be always allocated on the same day of the week. The customers with frequency biweekly need the constraints (2) and (7) to ensure that they are visited every two weeks. The customers with frequency monthly need the constraints (2) to ensure that they are visited once a month. The set of constraints (8) contains the maximal demand of customers for every day. In particular, the demand for each route must be less than the maximal capacity of each truck. Note that the \(capmax\) is used at the objective function to be minimized in a min-max strategy. Therefore, the main goal is to decrease the load of the trucks avoiding their full load. Note that the meaning of the variables on the left-hand side indicates that the value of \(capmax\) must be greater or equal to 0. The set of constraints (9) links the variables \(x_{ij}\) with variables \(y_{ijk}\). These constraints (9) ensure that the one customer is assigned to a day only if an available truck performs the scheduled route. The set of constraints (10)-(12) perform the balance of workload. The set of constraints (10) and (11) are used to obtain scheduled customers' geographic clusters. Each cluster corresponds to a truck; therefore, the customer \(i\) is assigned to day \(j\), and the vehicle \(k\) represents a customer's cluster. The set of constraints (10) determines the lowest and highest angle theta for the set of customers assigned to the day \(j\) and a truck \(k\). Note that the difference must be less than equal to each sector of the customer's maximum angle. These equations restrict the space of each cluster of customers. The set of constraints (11) bounds the maximum dispersion of customers for the tour performed on the day \(j\) by truck \(k\). Indeed, these equations seek to control the number of maximum customers for each cluster.