# Dynamic Multi-Compartment Vehicle Routing Problem for Smart Waste Collection +
## 4 Mathematical Modelling  
In this problem, some vehicles visit several bins during working hours. Unlike static M-CVRP, where all stations are defined at the beginning of the operation, DM-CVRP allows newly arriving stations during working hours (i.e., the stations alarmed during the time slice). When a new station comes, the dispatcher or the company must decide whether to accept or reject the service request. At each time slice, getting a new order means the station will be called in the following time slices. On the other hand, the refusal means it will be called during the work slices on the next day.  
In this paper, a DM-CVRP is modeled as sequences of the time slice. Let H is the total working hours. A time slice divides the H time into several time intervals b, such that each time slice is considered a static M-CVRP  
Where:  
* \(t_{1}:\) Considers the well-known stations from the previous working day; these stations are overcarried to the next working day.
* \(t_{l}\) /\(l\in\{\;2,\ldots,\;b\}\): Consider the stations received during the previous time slices and some of the stations received on the last working day.  
Each time slice contains a continuity period, and a decision period (see Figure 6). The system will enter the decision period at the end of the time slice to redefine the itineraries of the following time slices, and consider the new stations that have arrived in the current time slice. The decision period can be divided into preprocessing phase and the solution phase.  
The preprocessing phase is used to determine whether new requests can be added or rejected, and the solution phase is used to reschedule the routes of all vehicles in subsequent time slices. Each resolution phase will be considered all the stations already programmed in the time slices and the new stations that have arrived and can be visited.  
At the end of each time slice, the vehicle's position current is marked, and the last stations visited are considered fictitious depots in the next time slice.  
A static M-CVRP is applied to obtain the optimal route based on the current information. Figure 3 illustrates this approach.  
At the beginning of the working hours, all vehicles start from the depot. Thus, the initial point of all vehicles for the time interval \(t_{1}\) is \(\{0\}\). For the other time intervals, \(t_{l}\), \(l=2\), \(\ldots,b\), each vehicle starts from its current position. During the time interval \(t_{l}\), \(l=1,\ldots,b\), the constructed route must consider all the stations which have already been programmed and the new stations that arrived during the previous time slices which can be visited. In addition, \(\{0\}\) and \(n+1\) are also taken into account since it is the last station visited before each vehicle's destination.  
Some stations may not be served, due to limited hours working. In this case, these stations will be served during the next working hours. Thus, the problem not only determines the optimal route for all stations but also selects which stations should be performed, and what waste types can be collected during the current hours of the working day.  
The proposed formulation is based on the following assumptions:  
Figure 6: Proposed strategies for DM-CVRP.  
* The fleet is homogeneous.
* Vehicles have multiple compartments.
* Each vehicle starts its tour, and the end returns to the depot.
* Each station is visited only once by a vehicle in a time slice. But it can be called more than once in a working day.
* Each compartment is dedicated to one type of waste.
* The number of compartments is equal to the number of waste types.