Neuro-Fuzzy System for the Evaluation of Soya Production and Demand in Brazilian Ports

. Brazil and the United States account for approximately two thirds of the world soybean production. In 2018, the Brazilian soybean crop was approximately 117 million tons, more than half of which was exported. The Port of Santos is the largest shipper of soybeans, followed by the Port of Paranagu´a. The supply chain involves factors that are dif-ﬁcult to measure, resulting in chaotic and nonlinear activities. Thus, we propose to analyze the relationship between supply (production) and demand (export) using artiﬁcial intelligence techniques in a hybrid model called neuro-fuzzy. Data from 20 years of soybean production and ex-portation were used in the Matlab©R2017b software. The results indicate that the supply tends to be low when the demands of the ports are over-loaded, that is, the ports act in a synergistic and balanced manner.


Introduction
Food supply chains worldwide are directly affected by soybean production.This commodity is important not just for food but for meat production (animal feeding), frying oil production, and different industrial products.Currently, Brazil and the United States are the largest growers of soybean; together, they produce approximately two thirds of the world s production of this commodity [6].
Despite this scenario, obtaining a balance between supply and demand is not an easy task because it depends on many factors, such as market, logistics and economy.
In 2018, the Brazilian soybean crop was approximately 117 million tons [4], and more than half of this production was exported, that is, approximately 68 million tons (US$ 25.7 billion); the main markets were China and the European Union [5].
In Brazil approximately 95% of international trade passes through ports.According to statistical data from the National Waterway Transportation Agency Supported by Paulista University UNIP and Sunsetti Treinamentos e Servic ¸os.
(ANTAQ), in 2018 Brazilian ports moved 1.11 billion tons, and in relation to the flow of agricultural commodities, the Port of Santos is the largest shipper of soybeans, followed by the Port of Paranagua [1].
The Port of Santos is located in São Paulo state (southeast region), and the Port of Paranaguá is located in Paraná state (south region).These regions are near and provide widely available maritime routes, as well as access to the main roads in the country [1] and [2].
With soybean being one of the most important products for the Brazilian economy and the ports of Santos and Paranaguá being the main shippers of this commodity, the main aim of this study is to analyze the relationship between supply (production) and demand (export operation in these ports).
The supply chain involves factors that are difficult to measure, such as consumer behavior, changes in demand, price fluctuations, shortages, and expectations.These factors result in chaotic and nonlinear activities [11].
In [7], the authors corroborate the affirmation that, in the case of demand, obtaining an accurate estimation is a difficult, but vital task for reducing costs and improving service levels, that is, achieving competitive advantages.
Thus, we propose the use of a neuro-fuzzy hybrid model that employs artificial intelligence (AI) techniques in dealing with complex problems and conducting simulations that help decision makers in terms of production and export [8].
In [10], different techniques have been used to solve problems that occur in supply chain management, among them fuzzy logic, artificial neural networks (ANNs), genetic algorithms, and hybrid technologies, such as neuro-fuzzy proposed in this work.

AI for Diagnostics
Currently, AI has been proven effective in several areas, with applications in automation and robotics, as well as in support of decision making, through expert systems.The use of this technology to the detriment of classical methods of analysis does not aim to suppress, classical methods but only to offer more accurate responses to complex problems [14] and [13].Comparison studies between these technologies should be encouraged.

Fuzzy Logic
Fuzzy logic amplifies the potential of classical logic used in computational systems because it enables the grading of values through membership functions.Thus, qualitative terms, such as low, medium, and high, can be used for the functions of the variables, and intersections between the functions can be obtained, giving more precise inferences.Fuzzy logic is a mature and robust technology with applications in thousands of patents [14], [16], [10], [13], and [15].

ANNs
Analogously to biological neural networks, ANNs are able to extract patterns from noisy real data, that is, to learn by means of the complex behavior of variables.An artificial neuron is a computational model that receives the input data and obtains the weighted sum.The result may or may not activate the neuron by propagating the signal to other neurons in a network.Learning takes place through iterations, with the backpropagation algorithm being the most used.This algorithm adjusts the weights and activation variable of the neuron to minimize the learning error.Follow-up can be done through correlation and linear regression [9], [14], [10], [13], and [8].

Neuro-fuzzy Hybrid System
Fuzzy systems are expert systems.Hence, to obtain information, such as membership functions and rule base, professionals with tacit knowledge should be consulted [14] through surveys or interviews.This work requires the technical, subjective opinion of different people and demands a significant and consistent sample to increase objectivity.
However, when the cobination of fuzzy system and ANN is trained with a real dataset, it is able to quickly and efficiently provide the membership functions and rule base [14], [11], and [17].
In addition, each technology has its advantages and disadvantages.Table 1 shows the main differences between fuzzy logic and ANN.The use of hybrid systems has been shown to be promising because one technology can compensate for deficiency of another technology and vice versa.Thus, the Adaptive neuro-fuzzy inference system (ANFIS) is an interesting solution that supports important decision making [10], [17], and [11].

Methodology
Data from the national movement (export) of soybean through the ports of Santos and Paranaguá in the past 20 years (1999-2018) in thousand tons were used.Data were extracted from the Ministry of Industry, Foreign Trade and Federal Government Services (COMEX STAT) [3].
For the national production of soybeans in the past 20 years (1999-2018), data were taken from the National Supply Company (CONAB) [4], which is also related to the Brazilian federal government.
The neuro-fuzzy system was built using the Matlab©R2017Rb software with fuzzy logic toolbox and ANN toolbox as complements.For the initial configuration, the Sugeno inference engine was used [11] with two input variables, that is,input1 (Port of Santos) and input2 (Port of Paranaguá), and one output variable, that is, output1 (soybean production) (see Figure 1).After the initial setup, ANFIS was created.Then, data for the training and final configuration of the hybrid system were loaded.We opted to use five membership functions (Gaussian model) for the input variables and the linear type for the output variable, aiming to achieve high accuracy and smoothness in the transition between inferences.Two input variables with five membership functions generated 25 fuzzy rules (Figure 2).

Fig. 2: ANFIS. Performed on Matlab©R2017b
A total of 3,000 iterations were used through the backpropagation algorithm to train the neuro-fuzzy system.From approximately 1,500 iterations, the error diminished drastically.Afterward, it was possible to draw up the trend and simulation graphs.

Results and Discussions
The trend graphs (Figure 3) illustrate the possible relationships between input and output variables, with the dark blue areas representing the smallest output values and the yellow areas representing the largest output values.The effects of transition (i.e., gradation of values) are evident; this characteristic is favored by fuzzy technology.
The results point to an interesting relationship between the demands (exports) of the ports of Santos and Paranaguá and the supply (soybean production).It is feasible that the supply tends to be low when the demands in the ports are overloaded, that is, when there is much interest in the Port of Paranaguá and low interest in the Port of Santos, and vice versa.When interest in both ports is low, the production tends to be reasonable.Indeed, when the demands of both ports are high, the production is high.The simulations presented in the subsequent paragraphs help elucidate this relationship better.
Afterwards, five simulations were performed (Simulation 1 shown in Figure 4 and the others demonstrated in Table 2).The values of other simulations are listed in Table 2.When comparing simulations 1 and 2, it is evident that, when the demands of the ports are similar, that is, medium or low for both ports, the production does not oscillate, thereby maintaining four decimal places.Notably, when there are significant differences in demand (Simulations 3 and 4), the supply tends to be low, thereby maintaining three decimal places for both cases.Finally, the last simulation performed (Simulation 5) illustrates the high production trend when the demands of the two analyzed ports are high.
It is important to emphasize that the movements of these ports are beyond what are now exported.Moreover, it is possible that both ports absorb the total soybean load for export.In 2018, 53 million tons of solid bulk were shipped in the Port of Santos, that is, 19.6 million tons of soybeans, whereas 25 million tons of solid bulk were shipped in the Port of Paranagua, that is, approximately 10 million tons of soybeans [1] and [3].
Despite this reality, the main result points to a natural tendency to share the work by dividing the export cargo.This fact is interesting because, according to the projections of the Organization for Economic Co-operation and Development (OECD) and the Food and Agricultural Organization of the United Nations (FAO), the Brazilian harvest of 2026/27 will be approximately 129 million tons, an increase of 19% over the 2016/17 production [12].

Conclusions and Outlook
This work proposed a differentiated analysis of the relationship between supply and demand that enabled the simulation of the trend or encouraged the supply of soybeans through variations in the demands of the main ports of the country.It is evident that, despite the fact that the movement of solid bulk in the ports analyzed is beyond what is exported from soybeans, these ports are prepared to meet the increasing demands in a balanced and synergistic manner.The main limitation of this study refers to the analysis of only two ports.For further work, it is intended to perform more complex simulations with a larger number of ports, which will require the creation of more variables and the conduct of more in-depth discussions.

Table 2 :
Other simulations (in thousand tons)