# A Solution for Predicting the Timespan Needed for Grinding Roller Bearing Rings
## 3 Method for Timespan Prediction
### The Comparative Assessment Algorithm  
The comparative assessment algorithm proposes an approach in the analysis of potentially optimal solutions when selecting between two or more process alternatives. It is based on finding rankings, according to a certain criterion, such as cost, timespan, and energy consumption. It is designed to assist the selection of the optimal continuation variant for the manufacturing process at a certain decision level. The application of this algorithm is performed after the causal identification has been completed; that is, after the adoption of a set of cause variables describing the effect variable of interest at the current moment.  
Figure 3 presents the comparative assessment algorithm for the output of the manufacturing process.  
The meanings of the abbreviations presented in Figure 3 are: \(\varepsilon\)--the nearness degree of the cases from a given neighborhood; \(x\), \(y\), and \(z\)--the scalar values of the cause variables of the current case; \(x_{v}\), \(y_{v}\), and \(z_{v}\)--the scalar values of the cause variables of the pivot case; \(T_{v}\)--the scalar value of the effect variable of the pivot case; \(\Delta x\), \(\Delta y\), \(\Delta z\), and \(\Delta T\)--the coordinate differences; \(N_{i}\)--the neighborhood delimitation; mdl--the nonlinear multiple regression; \(P_{i}\)--the parameter vector; and \(\alpha\), \(\beta\), \(\gamma\), \(A\), \(B\), and \(C\)--the parameters of the proximity function.  
The decision block depicted in Figure 3 supports the identification of the nearness vectors and function. The algorithm runs until \(P_{i}=P_{i-1}\) and the current case has the minimum nearness compared to the pivot case selected for the model.  
A key role in the application of the algorithm is played by the so-called \"nearness function\"--with the help of which the nearness between two cases is evaluated. This algorithm involves two main procedures:  
* The neighborhood delimitation procedure--which aims to find the profile of the neighborhood of a potential case through successive comparisons with cases of processes already performed (with known results).
* The nearness modeling procedure--which aims to ensure that, after delimiting a neighborhood, the nearness between its instances is modeled to find an improved form of the proximity function. For modeling, nonlinear multiple regression has been adopted as the general typology of the nearness function. The algorithm (_Comp_) of the method was implemented with the help of MATLAB software.  
The two procedures are executed successively until the structure and form of the nearness function stabilizes. To establish a concrete case, a pivot case is selected from the database of previous cases.  
The steps that must be followed to predict the timespan by applying the HOM are:  
Figure 3: The comparative assessment algorithm.  
* Building the database;
* Performing the causal identification;
* Selecting a case to model for the comparative assessment;
* Selecting a pivot from the database to use in the case for which we want to make the estimation;
* The two procedures of the comparative assessment algorithm are applied until the shape of the nearness modeling functions stabilizes. Based on the final form of this function, the distance between the values of the effect variable in the pivot case and in the analyzed case is calculated. This results in the value of the effect variable in the analyzed case.