Prediction of the Behaviour from Discharge Points for Solid Waste Management

: This research investigates the behaviour of the Discharge Points in a Municipal Solid Waste Management System to evaluate the feasibility of making individual predictions of every Discharge Point. Such predictions could enhance system management through optimisation, improving their ecological and economic impact. The current approaches consider installations as a whole, but individual predictions may yield better results. This paper follows a methodology that includes analysing data from 200 different Discharge Points over a period of four years and applying twelve forecast algorithms found as more commonly used for these predictions in the literature, including Random Forest, Support Vector Machines, and Decision Tree, to identify predictive patterns. The results are compared and evaluated to determine the accuracy of individual predictions and their potential improvements. As the results show that the algorithms do not capture the individual Discharge Points behaviour, alternative approaches are suggested for further development.


Introduction
Currently, more than 55% of the world's population lives in cities, and according to the United Nations, this percentage will increase to 68% by 2050 [1].This growth is accompanied by significant environmental impacts, including CO 2 emissions, waste production, reduced biodiversity, and resource consumption.Consequently, cities are at the forefront of environmental concerns, drawing the attention of both environmentalists and researchers focused on mitigating environment degradation.
A particular visible environmental impact for city dwellers is the generation of wastes and its potential health implications [2][3][4].Municipal solid waste (MSW) production has prompted national and international regulations aimed at promoting recycling within urban areas.The European Union, for instance, recommended substituting natural resources with recycled materials, especially for critical materials [5,6].To achieve a sustainable society, it is essential to manage well-planned waste strategies.Effective strategy implementation relies on the ability to gather comprehensive information about the system to be optimised, making the monitoring of the MSW system crucial.This monitoring, typically conducted via IoT devices and networks, facilitates real-time data collection on various aspects of the MSW system, thereby enhancing waste collection and recycling efforts.
The existing research on MSW systems has predominantly focused on the overall status, considering only the total amount of waste collected for optimisation [7,8].This information enables the creation of reactive strategies that anticipate the resources needed for efficient waste management.Even with optimal forecasting and management, the uneven distribution of waste filling across Discharge Points (DPs) necessitates a more detailed prediction to achieve better optimisation.
Monitoring MSW can provide valuable data on several process aspects, such as the fill rate of each DP.By refining the granularity to include the fill level of individual DPs, it is possible to optimise collection routing, frequency, scheduling, staff shifts, and redistribution of the DPs more effectively.
Previous research has shed light on MSW management, exploring different aspects like system optimisation and waste management transportation routing.However, there is a notable gap in forecasting the behaviour of individual DPs within MSW systems for more targeted optimisation strategies.
This paper presents a study that leverages data from actual DPs within a MSW system to forecast their individual behaviour over time, establishing a more precise foundation for optimising the key aspects of waste management.To achieve these results, a set of regression algorithms was used across different scenarios to identify the most effective approach for predicting the fill levels.The insight gained from this approach aims to enhance waste collection and management practices.
The paper is organised as follows: First, it starts with a review of related works in this field, followed by a clear outline of the project's objectives.Next, it provides a detailed description of the materials and methods.Finally, a discussion of the results is presented, concluding with the exposition of the main findings and their implications.

Related Works
The related work section provides valuable context for our research objectives by summarising prior studies on MSW systems.It highlights the crucial need to forecast individual DP behaviour for more effective optimisation strategies, which is the primary focus of our study.This review of the literature not only underscores the importance of predicting DP behaviour but also sets the stage for the methodology employed in our research.
In the introduction, it was noted that MSW systems and their optimisation have been studied extensively in many countries, employing various approaches and focusing on different aspects, as evidenced by the literature review [9].Some of these studies have attempted to develop mathematical models of waste management using advanced techniques [10] or have conducted scenario analyses centred on eco-efficiency management [11].While these studies aimed at a global understanding of waste management systems, others have analysed specific factors such as waste generation in particular areas to propose reduction solutions [12] or forecast the amount of waste of different types [13].
Numerous papers on this topic have focused on optimising the routing of waste transportation from DPs to the collection sites [14].Some propose the use of IoT support optimisation [15,16] or applying algorithms like the Ant Colony-Shuffled Frog Leaping Algorithm [17].Other authors have emphasised the benefits of improved logistics, including the reduction of negative impacts [18,19].
Another line of research involves the planning of systems by proposing a better distribution of DPs or collection sites using techniques like the average nearest neighbour and kernel density to reduce uncollected waste [20] or creating a Geographic Information System to enhance collection site locations in post-war installations [21].
A common aspect of these studies is their focus on the overall management of systems, viewing them as integrated environments.They do not prioritise forecasting the behaviour of the system.However, forecasting as a topic has been covered for many years, as shown in the literature review [22].The aim of these works is to use forecasting for planning and managing the MSW [23], to classify and represent system behaviour using time series [13], or to incorporate socioeconomic and geographical factors using a hybrid k-nearest neighbours approach [24].Additionally, some papers applied algorithms like decision trees, SVM, or neural networks to predict waste generation [25].
Based on the analysis of prior research, it is evident that the types and the percentages of waste have been studied for areas ranging from entire countries to city sections to apply optimal planning strategies.This includes the number of trucks, sizes of dumping sites, human resources planning, and the enhancement of recycling policies.Some studies proposed optimisation techniques, while other focused on forecasting as a basis for optimisation.
However, in all cases, predictions are made for the entire installation.When individual DPs are considered, the goal is typically to plan their distribution or enhance routing, not to forecast their behaviour as a key tool for optimisation.
These prior studies provide valuable context for our research objectives, highlighting the crucial need to forecast individual DP behaviour for more effective optimisation strategies, which is the primary focus of our study.This review of the literature not only underscores the importance of predicting DP behaviour but also sets the stage for the methodology employed in our research.
To build on these findings and address the identified gaps, our research seeks to achieve precise predictions of individual DP behaviour.The following section outlines the specific objectives and research questions that guided our investigation, aiming to enhance the efficiency and effectiveness of MSW management through advanced predictive techniques.

Objective and Research Questions
The objective of this paper is to accurately predict the individual behaviour of every DP as a basis for optimising various aspects of MSW management.Achieving this objective requires developing models or techniques to make precise predictions that can be applied individually to each DP.
To support this objective, we have formulated three research questions, referred to as RQ1, RQ2 and RQ3, which will guide our research activities.

•
RQ1: Are the size, reliability, and stability of the available data sufficient to obtain precise results for each individual DP? • RQ2: Is the precision of the prediction sufficient to optimise the MSW management effectively?• RQ3: Is it possible to perform the necessary calculations with the appropriate speed or within the required time frame to be used in real-time systems?
This objective and these questions are centred on predicting the increment in the fill levels of DPs with enough accuracy to anticipate their state at different points in time.The fill state and its evolution represent the behaviour we aim to estimate using the predicted fill increment.
To answer these questions and achieve our objective, we followed the techniques presented in the Related Works section and employed a rigorous methodology.The following section details the materials and methods used in our study, including the dataset, the forecast algorithms applied, and the different scenarios considered to predict the fill levels of each DP.

Materials and Methods
The increment in the fill level of the DPs can be modelled using time series, like how the fill level of a complete facility is modelled.In these time series, the fill values vary over a time scale that can range from hours to minutes.However, the response time is not critical for periods shorter than minutes, as the intervals between interactions, such as people depositing garbage or collection system operating, are typically several minutes.Therefore, time series with a detail level of hours or fractions of hours are enough.This reduces the size of the datasets to be processed but also limits the number of values available for calculations.
To ensure the model's accuracy, we utilised a dataset from a real installation with sufficient DPs and data spanning the last four years.This extensive dataset allows for training and testing algorithms and provides the opportunity to transition waste collection from a reactive to a proactive approach.
The database used to create the models consists of data from a Spanish small-sized city with a population of 18,000 inhabitants and a density of about 500 inhabitants/km 2 .These data include information about 200 filling points for the last four years, with records every 5 min.The data covered the period from January 2019 to mid-March 2023.However, the data from January to June 2020 were excluded from the initial analysis due to the impact of COVID-19, which altered the behaviour of the fill points.The types of waste at each DP vary, as this study aims to assess the feasibility of forecasting rather than achieving the best possible results.
To effectively utilise this extensive dataset, a detailed data preparation phase was conducted.The following subsection outlines this phase and provides a small representation of the dataset structure from the MSW system.This subsection is accompanied by others related to the forecast algorithms and scenarios selected for the study.

Data Preparation
To process and analyse this extensive dataset, a systematic data preparation phase was necessary.The most relevant aspect to consider was the frequency and detail of the measurements in relation to the dataset size.In round numbers, the study includes 4 years of data from 200 DPs, with readings taken every 5 min.This results in approximately 84 million tuples (4 × 365 × 200 × 12), each containing information about the timestamp, DP ID, and filling increment.
Before using the data, it was essential to review it.The primary purpose of this review was to manage the large volume of data, which increased the likelihood of encountering outliers.This data preprocessing involved handling missing values, treating outliers, and normalising data to ensure consistency across the dataset.
To handle missing values at different intervals for each DP, interpolation from the last obtained data points was employed.
Regarding outliers, they were identified using boxplot diagrams for each DP.After careful consideration of their impact on the models' performance, these outliers were either corrected or set aside for further analysis in future studies.
Regarding normalising the dataset involved, additional features such as days of the week and public holidays were included to enhance the models' predictive performance, accounting for known factors that influencing waste generation.
Given the dataset size, the feasibility of processing was tested using standard libraries within a reasonable time frame.At this point, a computer with four RTX5000 video cards running 12 algorithms (Decision Tree, Elastic Net, Gaussian Regression, KNN, Lasso Regression, Linear Regression, Logistic Regression, Naïve Bayes, Polynomial Regression, Random Forest, Ridge Regression, and Support Vector Machine) on the entire dataset was used.The total training time extended to 90 h, which was deemed unacceptable.Then, additional tests were conducted, reducing the data size by grouping the data into intervals of 15, 30, 45, and 60 min.The total training time for the 12 algorithms over all the DPs was two days, one and a half days, and one day and 12 h, respectively.
These tests proved that reducing the data size was essential to align with the study's objective.The first step in this reduction process involved grouping the data by hours.This approach decreased the number of daily samples from 288 to 24, simplifying the data processing for most existing algorithms.Grouping was performed by summing all increments in filling from minute 0 to minute 59 and assigning the result to the corresponding hour.Additionally, negative values were replaced with zeroes, as they indicated moments when the DP was emptied.Values representing the capacity filled at each DP were divided by 100, as the original values were stored in the database multiplied by 100 to avoid decimal numbers.
Table 1 presents the first 10 tuples of data in this processed state, providing an example of how the data were received from the MSW system for the DPs.This table illustrates the adjusted data, reflecting the transformation applied to prepare the data for subsequent analysis.In the initial tests, cross-validation (CV) was used to evaluate how the results were building by separating the data from each DP.The data from each DP were divided in sets, ranging from 2 to 10 sets.However, this approach encountered several issues, such as high computational timing and resource usage, leading to poor predictions.This was related to the limited number of records available for some DPs, causing models to overfit or fail to adjust properly, resulting in a coefficient of determination (R 2 ) below 0.5.Additionally, randomising the data within each set sometimes resulted in unrealistic predictions due to non-sequential records.
To address these issues, we revised the prediction methodology.The revised approach is detailed in the following sections.
Subsequently, we reduced the number of DPs to demonstrate the feasibility of forecasting and handling the unique cases of each DP in future studies.By successfully forecasting a small set of DPs, we aim to establish feasibility and pave the way for incorporating more elements and proposing a real-time forecasting architecture.Initially, we considered reducing the number of DPs to four, but additional elements of interest led us to expand the study to six DPs while keeping the number manageable.DPs were discarded based on several criteria, including a reduced number of measures due to sensor malfunctions or locations in unpopulated areas, data series with significant gaps, or unexpected values likely due to sensors malfunctions or outlier behaviour, such as that observed during the COVID-19 pandemic.
The next step involved transforming the raw data into relevant information forecasting.This transformation required utilising the date to generate synthetic fields useful for categorising the measurements.Table 2 provides an overview of this initial transformation step, showcasing the decomposition of the date into several fields to extract relevant information from the data of each DP.Holiday dates were also identified for the different DPs, as this information could distinguish significant changes in behaviour on holidays.Other useful categorisations included the day of the week, day of month, weekend, or weekday.As a result, the dataset for each DP included attributes such as DP number, date and time, real increment, day of the month, day of the week, month, week of the month, week of the year, year, holiday status, season, time of the day, and weekday/weekend.Detailed information about each attribute is provided in Appendix A.
After completing these processes, the data from each DP (32,319 records) were divided into training and testing sets.To ensure consistency, the data were first grouped by date, with all the records from the same date included in the same dataset.The first 70% of the records was used for training (22,608 records for every DP), ordered by date, and the remaining 30% for testing (9711 records).
Next, different ratios were explored for training and testing, ranging from 60% to 80% for training and 20% to 40% for testing.However, the 70% training and 30% testing split proved to be the most effective, yielding the best results.

Forecast Algorithms Selection
Given the variety of algorithms for processing the datasets, it was necessary to select a subset and evaluate their suitability for modelling the behaviour of the DPs .From the range of forecast algorithms available today, we selected twelve of the most used in this study area: Decision Tree, Elastic Net, Gaussian Regression, KNN, Lasso Regression, Linear Regression, Logistic Regression, Naïve Bayes, Polynomial Regression, Random Forest, Ridge Regression, and Support Vector Machine.Appendix B contains a list and brief description of all the considered algorithms, included those not ultimately selected.Neural networks are also included in this list, despite their structural differences from the selected forecast algorithms, and are reserved for future studies.
Since each DP can show different behaviours, applying algorithms to the dataset as a whole might produce predictions that deviate from the actual results.Therefore, we applied the algorithms individually to each DP, allowing them to better understand and adapt to each DP's specific behaviour.
In the initial tests, each algorithm underwent extensive hyperparameter tuning using grid search and cross-validation techniques to optimise their performance, ensuring that the models were well-calibrated to the characteristics of the DPs' datasets.However, due to the poor results obtained and high execution time, as presented in subsection 'Data Preparation', we decided to adopt another way to obtain the predictions for each DP using each forecast algorithm for every scenario selected.
The selected algorithms were applied to the training dataset from each DP and then validated using the testing dataset from the same DP to assess the precision in their predictions.Each algorithm's computational complexity was assessed, considering factors such as training time (with Gaussian Regression, Naïve Bayes, Random Forest, and Support Vector Machine having the longest execution times between 5 and 20 min); memory requirements; and scalability, to ensure feasibility and efficiency in real-world deployment.
For executing the different algorithm on the DPs across various scenarios, the parameters were primarily set to the default values, as defined by the Python library used.While alternative parameter settings were explored for each algorithm, the results were consistently less favourable compared to those obtained using the default parameter values.

Forecast Scenario Selection
Even though all fields from each record could be used at any of the selected algorithms, we used different perspectives in the forecast.Using fewer input parameters also makes the predictions easier to interpret in relation to the actual increment of the DP at a given time.
The initial predictions were also made using the entire set of available parameters.However, the poor forecast results and the complexity of the patterns obtained led us to defer this approach to future studies.
For this initial study, we decided to work with the following subsets of fields as input for the forecast using all the selected algorithms (each subset includes the increment and the date): Regarding the different scenarios presented, one of the unique challenges was accounting for fluctuating waste volume during different periods, which might require adjusting the seasonal components and introducing additional control variables in the model.For this study, it was considered not relevant to have a first perspective on how well the forecast models adjust to the datasets of each DP in each scenario, and it will be considered in a future study.
This selection resulted in four scenarios, twelve algorithms, six DP, and 32,319 records for each DP (divided into two sets for training and testing).We conducted all the planned tests, and the results are discussed in the following sections.

Discussion
To evaluate the predictive accuracy of each algorithm for the behaviour of the DP in each of the proposed scenarios, several metrics were obtained to assess how closely the results align with the expected outcomes.The findings are presented with an initial overview using graphs, followed by a quantitative analysis of the selected metrics and a comparison of the results across different algorithms.Finally, a new approach is proposed to continue the research.

Predictions vs. Real Values
Time series plots were generated to visually compare actual waste generation patterns with model forecasts, providing intuitive insights into the models' ability to capture temporal dynamics and trends.
To present a clear view of the findings, Figure 1 illustrates a summarised version of one of the generated graphs.This analysis examines the filling process with respect to the day of the month, date, time, and filling value.The graph compares the actual values over three consecutive days to the hourly predictions provided by two algorithms used in the study: Decision Tree and KNN.These algorithms were selected for the detailed presentation because including all of them would have made the graph difficult to interpret, and several results were covered by giving exactly the same behaviour.Conversely, other algorithms deviated significantly from the real values and were not included.The presented algorithms, Decision Tree and KNN, offer the most promising results.In the graph, alongside the actual values and the predictions from both algorithms, the error from each algorithm at each instant of time is also represented.This error is calculated as the absolute value of the difference between the actual and predicted values, depicted as negative to provide a separate view of the errors from the time series predicted.This representation offers a clear perception of the error magnitude and its distribution across the entire prediction.
The predictions shown in the graph were obtained from the regression algorithms.They do not perfectly align with the real values, although they are relatively close in some cases.
This graph facilitates a direct comparison between the actual values and the predicted values.The inclusion of errors offers a comprehensive understanding of the algorithms' performance.The predictions shown in the graph were obtained from the regression algorithms.They do not perfectly align with the real values, although they are relatively close in some cases.
This graph facilitates a direct comparison between the actual values and the predicted values.The inclusion of errors offers a comprehensive understanding of the algorithms' performance.
Examining the error, it is evident that the prediction results from the forecast algorithms deviate significantly from the actual values, indicating that the predictions lack the desired accuracy and reliability.This suggests that, while the algorithms capture some trends, they are not yet refined enough to provide precise forecasts for practical applications, at least for the interval of time selected.Consequently, further enhancements and optimisations are necessary to improve the predictive performance and bring the forecasted values closer to the actual data.
This graph shows a small portion of the existing dataset, serving as the first evaluation of the results.Analysing the results in detail for the entire dataset and all the scenarios and algorithms requires the use of analytic mechanisms and metrics that generate objective and measurable results.
Considering this, a further study was undertaken to determine if the behaviour seen in the graphs is representative of the dataset or if it reflects outlier behaviours for the selected periods of time at different DPs.Examining the error, it is evident that the prediction results from the forecast algorithms deviate significantly from the actual values, indicating that the predictions lack the desired accuracy and reliability.This suggests that, while the algorithms capture some trends, they are not yet refined enough to provide precise forecasts for practical applications, at least for the interval of time selected.Consequently, further enhancements and optimisations are necessary to improve the predictive performance and bring the forecasted values closer to the actual data.
This graph shows a small portion of the existing dataset, serving as the first evaluation of the results.Analysing the results in detail for the entire dataset and all the scenarios and algorithms requires the use of analytic mechanisms and metrics that generate objective and measurable results.
Considering this, a further study was undertaken to determine if the behaviour seen in the graphs is representative of the dataset or if it reflects outlier behaviours for the selected periods of time at different DPs.

Results for the Selected Metrics
The analytic tools used to evaluate the forecasts were obtained from the different libraries used to execute the algorithms.Appendix C provides a list and brief explanation of these tools.Although a total of 11 metrics were considered, we focused on those most frequently used in the related literature [9,23,82] to facilitate a comparison of the results with those presented in previous studies.The metrics considered are the Mean Absolute Error (MAE), Mean Squared Error (MSE), Root Mean Squared Error (RMSE), coefficient of determination (R 2 ), and Maximum Error (ME).
These metrics were chosen because they provide a comprehensive evaluation of the prediction algorithms, capturing different aspects of the predictive performance, such as accuracy, variance, and worst-case scenarios.Their values signify how well the models perform in terms of the average error (MAE), sensitivity to large errors (MSE and RMSE), goodness of fit (R 2 ), and worst prediction errors (ME).
Considering all the scenarios for the different DPs and applying the different regression algorithms selected for the study, a total of 288 records were generated to indicate the accuracy of the predictions.
Upon analysing the results, it was evident that the predictions did not align well with the actual values in the different cases studied.This was demonstrated by the generally high values of MSE and ME (typically greater than 100) and R 2 values lower than 0.5, indicating poor predictive accuracy.
A deeper analysis was conducted by averaging the results obtained across all cases.Table 3 shows the average results, the range of values, and their standard deviations.As seen in Table 3, the average results across all the cases were suboptimal, particularly with the R 2 values not only being below 0.5 but also below 0. This indicated that the models failed to capture the underlying patterns in the data accurately.
To further understand these results, an average of the outcomes from all the cases for each algorithm was calculated.This analysis aimed to identify which algorithms produced the worst results and understand the overall performance presented in Table 3.The findings are detailed in Table 4 and are discussed in the following subsection.

Algorithms Comparison
Taking a closer look at the average results obtained, the Naïve Bayes and Logistic Regression algorithms performed the worst, followed by Elastic Net, Lasso, Linear Regression, and Ridge Regression, all of which had similar results and R 2 values close to 0.
The poor performance of Naïve Bayes and Logistic Regression can be attributed to their underlying assumptions and suitability for the type of data used.Naïve Bayes, for instance, assumes independence between predictors, which might not hold true in this context, leading to significant errors.Logistic Regression, typically used for classification, may not be well-suited for continuous output predictions in this scenario.
Elastic Net, Lasso, Linear Regression, and Ridge Regression, despite being widely used, showed subpar performance, potentially due to their linear nature, which might not capture the complex, non-linear relationships in the data effectively.
The Gaussian Process and Support Vector Regression (SVR) algorithms also performed suboptimally but showed slightly better results compared to the aforementioned models.Gaussian Procession Regression, while flexible and capable of capturing non-linear relationships, might suffer from computational inefficiency and sensitivity to hyperparameter settings in high-dimensional spaces, which can lead to suboptimal predictions.SVR, on the other hand, is generally effective for regression tasks but requires extensive tuning of its parameters (such as the kernel type and regularisation parameter) to achieve optimal performance.In our study, the tuning might not have been sufficient to handle the variability in the data.
Polynomial Regression, while better than some linear models, still failed to provide high accuracy.This can be attributed to the potential overfitting of higher-degree polynomials, especially with limited data points or noisy data, leading to poor generalisation to new data.
The k-nearest neighbours (KNN) algorithm, although performing better than many linear models, also showed limitations.KNN's performance is sensitive to the choice of k (the number of neighbours) and the distance metric used.In this study, KNN demonstrated moderate accuracy, with an average MAE of 8.8 and R 2 of 0.2, indicating that it was somewhat effective in capturing patterns but still fell short of providing highly accurate predictions.The relatively higher error rates could be due to the algorithm's susceptibility to noise and its computational intensity, especially with larger datasets, as is the case in our study.
At a more detailed level, we examined the prediction results using the Decision Tree and Random Forest algorithms, which had the best average forecast results.We analysed the average results by grouping the data by DP and scenario to check if these results were close to the global average values.The results, included in Tables 5 and 6, show the average results grouped by algorithm and DP and by algorithm and case studied.These values confirm the global averages, as they are quite similar and indicate that the results are not good enough for our goals.It appears that these algorithms do not perfect well for the studied system.However, we conducted a final study of the prediction results for all the cases regarding Tables 5 and 6.The prediction results for all the DPs using the Random Forest and Decision Tree algorithms for the four situations studied are included as Appendix D. Table 7 presents the 10 best results obtained by R 2 in descending order.These results follow the previous trend, showing that, while there are cases where R 2 can reach up to 0.44, most results are below 0.3, and none reach a value of 0.5 for R 2 .While the Decision Tree and Random Forest algorithms outperformed others, their performance still leaves room for improvement.The results suggests that even the bestperforming algorithms struggle to provide highly accurate predictions, indicating a need for more advanced models or additional features engineering to enhance the predictive accuracy.
In summary, the comparative analysis of the algorithms revealed that tree-based models like Decision Tree and Random Forest show promise but are not yet fully adequate for precise forecasting in this context.Further research and development, including exploring advanced machine learning techniques and refining the model parameters, are essential to achieve the desired level of accuracy in predictions.
To complete this review of results, we validated if the results were homogeneous across the DPs used in the experiment and if adding extra information about the day of month, week, or weekend enhanced the results.The same behaviour was observed across scenarios with slight differences in DP, but the trends remained the same, with values far from acceptable. Figure 2   At this point, we can reflect on the use of these results.Although they are not g enough for our goal, they may be effective for predictions in a system that considers lar aggregates, such as the total amount of filling across the installation or longer time p ods.Using this approach of considering every single DP will yield better values, even w the current metrics.
While our study focused on a specific geographical region, the methodologies insights gained are likely transferable to similar urban environments, highlighting broader applicability of the proposed approach beyond the study area.

Scenarios Analysis
To further understand the performance of the models, a detailed analysis of spec situations was conducted (independently of which scenario and the DP were stud where the models performed particularly well or poorly.This approach helps to highl common characteristics or anomalies that might explain the differences in prediction curacy.
The best-case scenarios typically occurred in cases with: 1. Low Variability in Data: Scenarios with relatively stable and low variability in w generation patterns led to more accurate predictions.For instance, DP locations had consistent usage patterns and fewer fluctuations showed better prediction ac racy.2. Higher Data Quality: DPs with more complete and higher-quality data tended produce better results.This included fewer missing values and more consistent d recording practices.3. Effective Feature Relevance: Scenarios where the selected features (like day of week or weekend) had a strong correlation with the waste generation patte yielded more accurate predictions.
These best-case situations underscore the importance of several key factors in ach ing high prediction accuracy:

•
Stability in Patterns: DPs with predictable and stable waste generation patterns lowed the models to learn and generalise more effectively.Consistency in data he in identifying clear trends and reduces the noise that can obscure the underlying terns.

•
Data Completeness and Quality: High-quality data with minimal missing values consistent recording practices provided a solid foundation for model training.Ac rate and complete datasets ensure that the models are trained on reliable informat enhancing their predictive capabilities.

•
Relevance of Features: The selection of relevant features that strongly correlate w waste generation patterns proved crucial.At this point, we can reflect on the use of these results.Although they are not good enough for our goal, they may be effective for predictions in a system that considers larger aggregates, such as the total amount of filling across the installation or longer time periods.Using this approach of considering every single DP will yield better values, even with the current metrics.
While our study focused on a specific geographical region, the methodologies and insights gained are likely transferable to similar urban environments, highlighting the broader applicability of the proposed approach beyond the study area.

Scenarios Analysis
To further understand the performance of the models, a detailed analysis of specific situations was conducted (independently of which scenario and the DP were studied) where the models performed particularly well or poorly.This approach helps to highlight common characteristics or anomalies that might explain the differences in prediction accuracy.
The best-case scenarios typically occurred in cases with: 1.
Low Variability in Data: Scenarios with relatively stable and low variability in waste generation patterns led to more accurate predictions.For instance, DP locations that had consistent usage patterns and fewer fluctuations showed better prediction accuracy.

2.
Higher Data Quality: DPs with more complete and higher-quality data tended to produce better results.This included fewer missing values and more consistent data recording practices.

3.
Effective Feature Relevance: Scenarios where the selected features (like day of the week or weekend) had a strong correlation with the waste generation patterns yielded more accurate predictions.
These best-case situations underscore the importance of several key factors in achieving high prediction accuracy:

•
Stability in Patterns: DPs with predictable and stable waste generation patterns allowed the models to learn and generalise more effectively.Consistency in data helps in identifying clear trends and reduces the noise that can obscure the underlying patterns.

•
Data Completeness and Quality: High-quality data with minimal missing values and consistent recording practices provided a solid foundation for model training.Accurate and complete datasets ensure that the models are trained on reliable information, enhancing their predictive capabilities.

•
Relevance of Features: The selection of relevant features that strongly correlate with waste generation patterns proved crucial.
These insights highlight the importance of focusing on data quality and feature relevance to achieve the best possible model performance.The successful situations, provide a roadmap for improving predictions in more challenging contexts by emphasising the need for stability, completeness, and relevance in the data used for model training.
Conversely, the worst-case scenarios were characterized by: 1.
High Variability in Data: High variability in the waste generation data, possibly due to erratic usage patterns or inconsistent data collection, led to poor prediction accuracy.For instance, DPs in areas from the city with fluctuating population density or irregular events had significant prediction errors.

2.
Incomplete Data: Scenarios with many missing values or inconsistencies in data recording practices negatively impacted the model performance.The lack of a complete and clean dataset made it challenging for the algorithm to learn accurate patterns.

3.
Weak Feature Relevance: When the selected feature did not strongly correlate with the waste generation patterns, the models struggled to make accurate predictions.This was evident in DPs where external factors like special events or holidays significantly influenced waste generation but were not included in the feature set.4.
Small Dataset: DPs having this characteristic, where only a limited amount of data were available, posed significant challenges for the algorithms.A small dataset can lead to overfitting, where the model performs well on the training data but fails to generalise to new data.Additionally, small datasets often lack the diversity needed to capture all possible variations in waste generation patterns.For example, DPs in newly established or low-traffic areas may not have accumulated enough data to train robust models, resulting in less reliable predictions.
These worst-case scenarios underscore the importance of comprehensive data collection and the inclusion of relevant features in the predictive modelling process.This also highlights the need for advanced data handling techniques to mitigate the effects of variability and noise and for strategies to augment small datasets, such as synthetic data generation or transfer learning, from similar contexts.

Exploring Alternative Approaches
Considering the results obtained, it was decided to explore alternative approaches to understand the data structure, aiming to improve the forecast accuracy for each DP.
Upon examining the results shown in Figure 1, three interesting details emerged: 1.
Pattern Similarity: The predictions from the two algorithms displayed a pattern like actual DP values, suggesting that the models capture some underlying trends despite the overall prediction errors.2.
Significant Upturns: The substantial differences between the upturns and the other values, which typically do not exhibit regular behaviour and have noticeable fluctuations, might explain why the forecasting algorithms struggled to match the DP values accurately.

3.
Recurring Daily Patterns: The recurring daily pattern in the data could be a clue as to why the algorithms fail to predict the next hour accurately.A broader approach, predicting the next 24-h pattern and then adjusting it with real-time data, might be required.
Therefore, it was proposed to classify the dataset into different clusters to verify if the data indeed follow regular patterns.Figures 3-5 illustrate the daily behaviour of the data classified into varying numbers of clusters (10, 5, and 2, respectively).The ordinate axis represents the DP fill level, ranging from 0 (empty) to 1 (full), while the abscissa axis represents the time in hours over a single day.In all graphics, the first cluster, number 0, is a control line over value 1 on the ordinate axis to ensure that the proportions are kept.As shown in Figure 3, using ten clusters, the algorithm produced similar shapes with minor adjustments.The number of clusters was subsequently reduced to observe if fewer clusters could still capture the shape, ultimately using just two clusters.
Despite the promising results, it is important to acknowledge limitations such as simplifying assumptions.
This insight provides a valuable starting point for future research.Further studies could explore more sophisticated modelling techniques and incorporate additional exogenous variables to further enhance the forecasting accuracy.

Conclusions
Regarding the proposed research questions, we can conclude the following:

•
For RQ1, the answer is positive, as we were able to perform calculations without major issues related to data size or quality.

•
For RQ2, the answer is negative, as the forecasts were not accurate enough to optimise management effectively.

•
For RQ3, we found that the time required for calculations is substantial and would need enhancements and optimisations, such as pre-calculations or other techniques, to be feasible in a real-time scenario.
Our first conclusion is that predicting individual behaviours for DPs seems feasible, as the numeric results support.However, since the values are not sufficiently accurate, the algorithms cannot be used directly and need enhancements through other approaches.The base information for these forecasts is limited to the filling rate, but as the behaviour of people contributing to this filling could be influenced by other factors, it is necessary to explore climate factors to determine if they impact behaviour.
Although the results are not valid for individual forecasts, they could improve forecasts for an entire installation by combining forecasts from each DP.This could lead to more efficient waste collection schedules, reducing operational costs and the environmental impact.As shown in Figure 3, using ten clusters, the algorithm produced similar shapes with minor adjustments.The number of clusters was subsequently reduced to observe if fewer clusters could still capture the shape, ultimately using just two clusters.
Despite the promising results, it is important to acknowledge limitations such as simplifying assumptions.
This insight provides a valuable starting point for future research.Further studies could explore more sophisticated modelling techniques and incorporate additional exogenous variables to further enhance the forecasting accuracy.

Conclusions
Regarding the proposed research questions, we can conclude the following:

•
For RQ1, the answer is positive, as we were able to perform calculations without major issues related to data size or quality.

•
For RQ2, the answer is negative, as the forecasts were not accurate enough to optimise management effectively.

•
For RQ3, we found that the time required for calculations is substantial and would need enhancements and optimisations, such as pre-calculations or other techniques, to be feasible in a real-time scenario.
Our first conclusion is that predicting individual behaviours for DPs seems feasible, as the numeric results support.However, since the values are not sufficiently accurate, the algorithms cannot be used directly and need enhancements through other approaches.The base information for these forecasts is limited to the filling rate, but as the behaviour of people contributing to this filling could be influenced by other factors, it is necessary to explore climate factors to determine if they impact behaviour.
Although the results are not valid for individual forecasts, they could improve forecasts for an entire installation by combining forecasts from each DP.This could lead to more efficient waste collection schedules, reducing operational costs and the environmental impact.
Regarding the algorithms used, we conclude that only Decision Tree and Random Forest should be used in future works related to this subject, as they perform significantly better than all the others.
Based on our findings, it is recommended that policymakers encourage the adoption of advanced predictive models in MSW management.Investing in robust data infrastructure can further enhance the accuracy and reliability of these models.
Engaging key stakeholders such as waste management authorities, environmental agencies, and community representatives is crucial for the successful implementation and adoption of advanced forecasting solutions, fostering collaboration and knowledge sharing across diverse stakeholders.
The continuous monitoring and evaluation of the forecasting system's performance are essential for identifying areas for improvement and adapting to evolving waste management challenges and regulatory requirements.
Future works should examine the feasibility of studying the behaviour of a large group of DPs simultaneously to create a general real-time response system.This system would generate predictions at the same frequency to determine the most probable behaviour of each DP throughout the day.
Moreover, based on the results obtained, we will consider developing a new methodology to better understand the behaviours of the different DPs and to achieve more accurate forecasts with optimal execution times.
Finally, we will continue to use the data from the different DPs used in this study.Additionally, we will explore other methods to ensure high-quality data, providing relevant information and enough to make useful predictions.Defining the criteria to validate and accept these data as a basis for calculations could be beneficial for this work.
Based on the observed performance of the predictive models, the following specific areas for future research are suggested: 1.
Incorporating External Factors: While this research considered aspects related to the time of day, week, month or year, and local holidays, future research could investigate the impact of other external factors such as weather conditions and local events on the waste management generation patterns at DPs.This could enhance the predictive accuracy of the models.

2.
Improving Algorithm Performance: Explore additional forecast algorithms not used but analysed in this study and investigate others that may offer a better performance for time series predictions.

3.
Real-Time Data Integration: Develop methods to integrate real-time data from the IoT sensors from the DPs into the predictive models to improve the timeliness and accuracy of forecasts.4.
Cost-Benefit Analysis: Conduct a detailed cost-benefit analysis of implementing advanced predictive models in MSW management to quantify the economic and ecological benefits.5.
Scalability Studies: Assess the scalability of the predictive models for larger datasets and more extensive municipal areas to ensure that the proposed solutions can be effectively applied in diverse urban settings.6.
User Behaviour Analysis: Study the behaviour of residents and businesses contributing to the waste stream to identify patterns and trends that could inform more targeted waste management strategies.7.
Optimisation of Collection Routes: Investigate the integration of predictive models with dynamic route optimisation algorithms to enhance the efficiency of waste collection operations.
By addressing these areas, future research can build upon the findings of this study to develop more robust and effective waste management solutions.

•
Day of the week and hour • Day of the month and hour • Weekend and hour • Holiday and hour

Figure 1 .
Figure 1.Real values, predictions from Decision Tree and KNN algorithms, and errors from both algorithms' predictions over 3 days (day of the month + hour).

Figure 1 .
Figure 1.Real values, predictions from Decision Tree and KNN algorithms, and errors from both algorithms' predictions over 3 days (day of the month + hour).
illustrates these data for the Decision Tree MAE averages across DPs and scenarios (DM-Day of Month, DW-Day of Week, H-Hour, Hol-Holyday, and Wnd-Weekend).

Figure 2 .
Figure 2. Average MAE for Decision Tree across the selected scenarios and DPs.

Figure 2 .
Figure 2. Average MAE for Decision Tree across the selected scenarios and DPs.

Figure 3 .
Figure 3. Clustering of one day's data from a DP divided into ten clusters.

Figure 4 .
Figure 4. Clustering of one day's data from a DP divided into five clusters.

Figure 3 .
Figure 3. Clustering of one day's data from a DP divided into ten clusters.

Figure 3 .
Figure 3. Clustering of one day's data from a DP divided into ten clusters.

Figure 4 .
Figure 4. Clustering of one day's data from a DP divided into five clusters.Figure 4. Clustering of one day's data from a DP divided into five clusters.

Figure 4 .
Figure 4. Clustering of one day's data from a DP divided into five clusters.Figure 4. Clustering of one day's data from a DP divided into five clusters.

Figure 5 .
Figure 5. Clustering of one day's data from a DP divided into two clusters.

Figure 5 .
Figure 5. Clustering of one day's data from a DP divided into two clusters.

Table 1 .
Initial structure from the data.

Table 2 .
Initial date field decomposition from the records.

Table 3 .
Average results regarding the predictions from all the cases studied.

Table 4 .
Average results for predictions from the different forecast algorithms applied to the various cases of the DPs studied.

Table 5 .
Average results for predictions grouped by selected forecast algorithms and selected DPs.

Table 6 .
Average results for predictions grouped by selected forecast algorithms and situations studied.

Table 7 .
Top 10prediction results for the selected DPs using the Decision Tree and Random Forest algorithms by R 2 in a descendant order.

Table A4 .
Prediction results from the cases studied for the DPs selected using the Decision Tree and Random Forest algorithms.