# Smart Waste Collection System with Low Consumption LoRaWAN Nodes and Route Optimization
## 4 Case Study: Region of Salamanca
### Optimization Route Results  
This section describes a simulation of the route optimization process using the data of waste production from the current waste plan of the regional administration of Castilla y Leon [85], the technical document of the public tender procedure of 2016 [87] and a report about selective collection of paper [92] which will be the waste collected in this case study. Waste collection scenarios were generated for 1 year with a total of 26 waste collection days. These scenarios were generated, taking into account the population of each town and the mean rate of waste production per inhabitant and day for each town. In the simulation, we assumed that a visit to a town implies the collection of every container in that town; in this case study, the displacement produced by the truck in each town did not significantly penalize the total amount of kilometers of the route. Figure 10 shows the simulation and selection of the towns on the left side. Firstly, the populations of all towns were obtained. Secondly, the waste generation was performed for each town to obtain a random value of waste that follows a normal distribution [93] considering the inhabitant waste generation ratio which has previously been mentioned:  
\[[W_{t11},\ \ldots,\ W_{tK1}]=randomNormalValue(u=townwaste_{t},\sigma=townwaste _{t}/10) \tag{10}\]  
where \([W_{t11},\ \ldots,\ W_{tK1}]\) is the waste generation of \(K\) towns for the first day of collection, and \(townwaste_{t}= inhabitantWasteRatio*daysBetweenCollection*population_{t}\). Thirdly, a selection node process was performed in order to include the towns considered for calculating the next waste collection routes. In this simulation, the variable employed was the weight of the waste produced by the whole town. However, in a real production environment the node selection would involve measurements of volume, and then, the weight of each container would be used for the definition of the CVRP problem. In this work, we only had data about the weight, so a estimation of volume using a paper density of 46.47 kg/m\({}^{3}\)[92] was employed in the calculation. The selection criteria for each node was as follows:  
\[CurrentPopulationWaste+PopulationWasteUntilNextDay\geq\ 0.80*PopulationWasteCapacity \tag{11}\]  
where, in Equation (11), \(CurrentPopulationWaste\) is the total demand up to this day and \(PopulationWasteUntilNextDay\) is waste generation for the following days until the next collection day. Figure 10: Simulation of waste, node selection, CVRP generation and solutions. If this is higher than the 80% of a population's waste capacity, that population will be selected for collection. This percentage was extracted from the technical public tender document [87]. The \(Population WasteCapacity\) was calculated from the total population of the town and the number of containers available for that town. The previous process was performed for each collection day. The waste generation step considered the previous selection of nodes in order to add to the pending demand of every node which has not previously been visited. As a result of this simulation process, the selected town nodes and their waste demands for the M collection days were obtained. The next step was generating the CVRP instances employing the selected nodes, the available vehicle fleet and the distance matrix of the selected town nodes. Once the instances of CVRP were obtained, these were sent to the solver in order to solve it. The solve stage employed different heuristics and local search methods in order to find a feasible solution with the best score in a limited time of 24 h.  
The results of the 26 collection days over a year are displayed in Figure 11. The distance in km are shown for each CVRP instance against the consumption of the permanent route approach. We can observe that the permanent routes have a cost of 3050.725 km (horizontal red line Figure 11) for each collection day whereas with the route optimization, as we expected, there are savings in the total cost of distance for all cases.