Sorting Algorithm Applied in Geographical Regions Using Residential Electricity Consumption Indicators

The electricity consumption per capita in Ecuador almost doubled between 1999 and 2017. Although electricity, gas and fuels are subsidized by the state, and thus generate savings for users, this often leads to inefficient use or bad energy consumption habits in the population. The current economic situation in the country has urged reconsidering the continuity of fuel subsidies, so prices have been adjusted. It is evident that the continued elimination of subsidies will negatively impact Ecuadorian low and middleincome families, becoming necessary to find alternatives and possible solutions regarding energy, while also familiarizing with the profile and habits of electricity consumption in residences. A sorting algorithm based on Theory of Decision in Uncertainty is implemented to rank 8 urban-marginal areas in Guayaquil City according to 14 indicators that significantly impact energy consumption. From 700 thousand users of urban-marginal areas of Ecuador, 200 thousand can be found in Guayaquil. The information of some indicators of electrical consumption collected in surveys applied in residences of the areas is used as an ordering criterion. Results will show the differences between those areas and will be useful for later studies or for decision-making processes of competent authorities in order to improve living conditions while maintaining rational indicators of electrical consumption. Los Esteros, Guasmo and Vergeles present the best consumption pattern, in comparison with Bastión Popular and Flor de Bastión, which show the worst results in regards to the consumption among the 8 areas studied. Keywords— electricity consumption indicators; energy consumption; energy demand; ordering algorithm; theory of decision.


I. INTRODUCTION
The Ecuadorian population is constantly growing: according to official National Institute of Statistics and Census (INEC) information, in 1950 the population was 3,202,157 inhabitants and is currently close to 17 million [1]. This growth is correlated with the energy demand of the residential sector that, according to statistical reports [2], shows an increasing consumption trend.
It is worth noting that electricity, gas and fuels are subsidized by the state, which although represents economic savings for users, frequently leads to inefficient use and bad energy consumption habits [3]. The current national economic scenario has urged to reconsider the continuity of subsidies [4]. For instance, the 92-octane gasoline subsidy has been eliminated. However, elimination of subsidies may affect the average cost of other resources, such as energy. So, what would happen if the Ecuadorian State eliminated subsidies with direct residential implications? In general, it is evident that there would be a negative economic impact on low and middle-income Ecuadorian families [5]. It is necessary to consider alternatives and possible solutions in the energy and residential field to face the aforementioned question.
In Ecuador, some feasibility studies of electricity production from renewable energy sources have been carried out [6]- [8]. The use of ecological materials in asphalt mortars and in energetically efficient housing construction has also been studied [9]. In the residential field, studies have been developed to take advantage of intelligent electrical systems to optimize the consumption of electrical energy [10]. To estimate energy consumption in households a questionnaire was applied in a marginal urban area of Guayaquil [11]. The incidence of adolescents on economic, sociodemographic and residential consumption habits indicators has also been assessed [12].
Mathematical models based on deterministic or statistical principles have always been used to solve the most varied problems in natural sciences, both empirically and theoretically. Phenomena of an inorganic or inanimate nature governed by mechanics, physics, or chemistry laws, as well as phenomena of organic or animated nature to which biological principles and laws also bind, whether dynamic or static, have easily assimilated these mathematical models.
Fortunately, recent models and algorithms have gained ground to form the foundations of Numerical and non-Numerical Mathematics with uncertainty. Fuzzy logic has been used as a basis: a tool that allows to model eminently social phenomena with data that it is not reliable enough to assume statistical laws because of its poor structure. Models associated with relationship, grouping, ordering, etc. -some of which have been known for quite some time-can facilitate the path for those who take sides with one alternative over another [13], [14]. These models have been used successfully in recent years in economics and management. Broad treatment with these models can be reviewed in [15].
This study corresponds to the line of research expressed in the previous paragraph. The statistical information used was taken from the research project entitled: Simulation and Projection of the Behavior of the Electric Power Demand in Rural and Urban -Marginal Areas of Guayas -Ecuador, coded as FCI-037-2018, which corresponds to multi-stage works published in the form of preliminary results [6], [16], [17].
This paper aims to organize 8 urban-marginal areas of Guayaquil, based on criteria and indicators taken from a survey of electricity consumption applied to a sample of households in each study area [18], [19]. Given the data obtained includes objective and subjective information, an ordering algorithm based on fuzzy mathematics is used.

II. MATERIAL AND METHOD
To apply the ordering algorithm, groupings E 1 = {P 1 , P 2 , …, P m } of m elements, and E 2 = {C 1 , C 2 , …, C n } of n characteristics or qualities that form the criteria for ordering are needed. These techniques, based on fuzzy mathematics, are the result of the research carried out by Kaufmann & Gil for the approach and solution of economic, management and social problems. The ordering algorithm used in this study is developed in [15], [20]- [22]. In [23]- [25] this algorithm is applied in the solution of practical problems.
On the other hand, E 2 = {C 1 ,C 2 ,C 3 ,C 4 ,C 5 ,C 6 ,C 7 ,C 8 ,C 9 ,C 10 ,C 11 ,C 12 ,C 13 ,C 14 } Where: C 1 = Average social stratification score, C 2 = Average outlet 120 volts per region, C 3 = Average of saving lights per region, C 4 = Average of air conditioning equipment, C 5 = Average of rooms in the home, C 6 = Average years of use of the refrigerator, C 7 = Average years of use of the blender, C 8 = Average years of use of the washing machine, C 9 = Average years of use of sound equipment, C 10 = Average number of years of radio-recorder use, C 11 = Average years of television use, C 12 = Average years of computer use, C 13 = Average years of use of the fan, C 14 = Average number of years of use of the electric iron.
That is, E 2 is made up of 14 characteristics or qualities that have been selected from the survey questionnaire. The following 4 matrix processes must be followed for the application of this ordering algorithm:

1)
Step one: The nxm matrix that contains information on the characteristics or qualities of each of the study areas: These values can be obtained from both measures and assessments. The μ ij values located in each cell represent the degree at which each P i element in E 1 meets the characteristic or quality C j in E 2 .
The two following conditions must be met: • Values should be normalized by converting them to an [0,1] interval, dividing, for each column 1≤ j≤ n, the value µ ij by the maximum value of that column. • Considering the goal is to order from best to worst, the matrix should be made in such a way that the highest values are the most appreciated. In case the higher values of a characteristic or quality are the worst appreciated, the complementary value is taken with respect to 1.

2)
Step two: Once these conditions are met, the following matrix is formed: Where α ij , 1≤ i≤ m, 1≤ j≤ n meet i) and ii).

3)
Step three: Then, the following matrix is formed with C 1 characteristic or quality and its values: This process is repeated with the remaining Cj for j = 2, ..., n and n matrices formed by zeros and ones are obtained. Note that the elements of the main diagonal are not considered because they do not tax the ordering decision.

4)
Step four: The matrices obtained in the previous step only offer information on the degree of preference for E1 pairs of elements for each E 2 characteristic or quality. The following matrix is formed, resulting from the average for each of the n corresponding cells. . .

X
Where 0 ≤ δ ij ≤ 1: A value δ ij = 1 means that P i exceeds P j for all the characteristics of the set E 2 and if δ ij = 0 means that Pi does not exceed P j in any characteristic of E 2 . In general P i exceeds P j for some characteristics of E 2 and for others not, hence 0 ≤ δ ij ≤ 1.
For groupings E 1 and E 2 formed by few elements, this algorithm can be illustrated by a sagittal graph considering threshold values. For groupings composed of many elements, the algorithm can be easily programmed if the following observations are considered: • The first place in the order is the P i for which the entire column of the last matrix is formed of zeros. • The last place in the ordering is formed by the P j for which the entire row of the last matrix is formed of zeros. In this way, the first and last place of the order is obtained. The corresponding rows and columns are eliminated, and the process is repeated with the second and penultimate places, then the third and the third last, until all the elements are exhausted.

III. RESULTS AND DISCUSSION
Once the information collected in the socioeconomic surveys for energy consumption was processed, the μ values were obtained. Table 1 shows the starting values of the nxm matrix. Indicators from 1 to 5 with the highest values are the most appreciated, while 6 until 14 are the least appreciated, given the longer uses of household appliances, lower frequency of its renewal with better, more efficient and lower electrical consumption technology. After performing the 4 matrix processes specified, Table 2 was obtained, in which δ values within the interval [0,1] are specified. With these values, the respective binary ordering arrays are established from a tuner or threshold as a discriminator. Thresholds of 0.7, 0.6 and 0.55 were considered. Table 3 shows the matrix obtained from the threshold 0.55. Table 4 summarizes the order of the areas obtained for each threshold. It is evident that the 0.55 threshold has a better order. In the three proven thresholds, it is observed that the areas 2, 4 and 8 -that is, Los Esteros, Guasmo and Vergeles, respectively-are marginal urban areas with better characteristics or qualities in terms of the 14 socioeconomic indicators considered in this study. Meanwhile, areas 1 and 3, Bastión Popular and Flor de Bastión, display the worst characteristics.   Figure 1 shows the graph diagram of the matrix obtained from the threshold 0.55; the respective ordering is sequentially evidenced, starting with the elimination of the nodes that only have arrow exits.

IV. CONCLUSIONS
This study shows the application of a fuzzy mathematical algorithm for sorting geographical areas based on socioeconomic indicators of residential electricity consumption. Bearing in mind that indicators are directly related to electricity consumption and its efficiency, it is concluded that Los Esteros, Guasmo and Vergeles are the areas with optimal indicators, in comparison with Bastión Popular and Flor de Bastión, which show the worst results in regards to the consumption among the 8 areas studied.
These results could serve as a reference to promote energy efficiency policies at the residential level and apply this methodology in other areas of the country and the region. "Best" or "worst" results do not necessarily represent lower or higher consumption rates. The results were assessed indirectly to determine better levels and quality of life in the inhabitants. This is considered a strength of the study. Statistical tools were accepted for this study, but the fuzzy approach was preferred since it can operate better with information of joint objective or measurable and subjective data which, given household surveys do not always reflect the exact truth, if the case.