Calculation of the number of branches of multi-valued decision trees in computer aided importance rank of parameters

An elaborated digital computer programme supporting the time-consuming process of selecting the importance rank of construction and operation parameters by means of stating optimum sets is based on the Quine – McCluskey algorithm of minimizing individual partial multi-valued logic functions. The example with real time data, calculated by means of the programme, showed that among the obtained optimum sets there were such which had a different number of real branches after being presented on the multi-valued logic decision tree. That is why an idea of elaborating another functionality of the programme – a module calculating the number of branches of real, multi-valued logic decision trees presenting optimum sets chosen by the programme was pursued. This paper presents the idea and the method for developing a module calculating the number of branches, real for each of optimum sets indicated by the programme, as well as to the calculation process.


Introduction
Automation and control systems which are currently formed are complex, but many of their construction and operation parameters are interdependent, which in turn affects the quality and/or operating efficiency of these devices.This is why, it is not advisable to omit the above-mentioned dependencies during the machine design and construction process.It is also not possible to ignore them in the process of stating the importance rank of parameters of the analysed device, which should cooperate with testing and improving the device in creation [1,2].The process of ascribing the importance rank was complex and complicated as far as calculations were concerned, and thus a computer programme based on an appropriate algorithm was created to aid the process.During works on the programme, the above-mentioned dependency of parameters was additionally taken into consideration, which led to creating appropriate modules (conditionality and a proxy variable) to protect dependent variables from division.

The algorithm of the programme
The basis of the programme is the Quine -McCluskey algorithm of the minimization of individual partial multivalued logic functions [3,4,5].Its basis is a mathematical equation composed of certain elements calculated on the basis of gathered and encoded data which, for the first stage of the algorithm, can be presented in the following form: x1= ik -iz * wz + iz + p (1) where: x1 -the number of step branches of the analysed decision tree, ik -the number of branches of the k-th level of the decision tree, iz -the number of simplifications of the z-th variable, wz -the valency of the z-th variable, p -the number of branches, out of which the upper branches of the k-th level, which are not subject to simplification, were formed [6].
The main operation principle of the discussed algorithm is finding the so-called primary implicants, i.e. each combination which is not subject to further joining.The number of calculations which are made at the first stage depends on the number of analysed parameters and they are to be made this particular number of times.It is possible to proceed to the next step only after stating all possible minimums at a given stage.The next step consists in making compounds according to the parameter with the smallest value and then calculations for the other variables are repeated.If the minimum value was obtained at a given stage two or more times, the subsequent stages would have to be calculated collaterally, for each of the obtained minimums.

Computer programme
The window of the main programme consists of the main menu (File -the close the programme, Data -the download / save data, Results -save calculations and/or optimum sets, Info -information about the programme and the author), the area with loaded data (KAPN) and function buttons (Add, Erase, Calculate and Check scopes).Buttons Calculate and Check scopes are primarily off and they appear only when the data is loaded.The former causes automated calculation of each step and display of calculations together with interim results in a separate window run by clicking on the button Results (appearing after calculations are made); whereas the latter modifies values of these parameters, the maximum code value of which does not appear in any of the selected sets of parameters [7].Additional downloading of data causes the appearance of two subsequent buttons Conditions and Proxy variable, which start modules of new functionalities.The former imposes appropriate conditions of occurring parameters one after another.
After it has been started, an additional window appears with a list of parameters and additional options, by means of which we may indicate which parameters and in which set should appear in subsequent optimum sets.
The algorithm of the programme, with the function of conditions, works similarly to the basic version of the programme.The only innovation is checking whether a newly calculated minimum is not included in the imposed condition (if it is at least the penultimate parameter).If this is the case, it has to be discarded and a new one has to be found.If, however, the minimum value is a parameter at the end of the imposed condition, the remaining parameters have to be set without additional calculations in an imposed sequence and then we should proceed to subsequent calculation stages.The second functionality of the programme is the possibility of coding an appropriately chosen group of parameters in one or a few proxy variables.An additional advantage of the programme is automation of coding of proxy variables.After choosing appropriate parameters, the programme sets a new value of the proxy variable by itself and assigns appropriately set verses with values of intrinsic parameters to a given code value.This process not only shortens coding time but also protects it from the mistakes resulting from the lack of due care or the plurality of variables and their significant multivalence.The process of calculation in the case of this functionality is based on the same algorithm of the programme as its basic version.After proxy variables have been coded, they are treated as "new" parameters (variables included in them are deleted from the table of parameters memory) and then a classic process of calculation with showing final results at the end takes place.

Calculation complexity problems with dependent variables of similar importance
The problem described in [8] is a calculation complexity in the process of determining the importance rank of parameters of similar importance.Additionally, a dependence occurs between parameters and this aids to the difficulty of the process.An example presented in the elaboration is a set of symptoms in thyroid problems.These symptoms were gathered during research and marked with appropriate x values.X parameters are bivalent (1 signifies the occurrence of the symptom, whereas 0 signifies its lack) and are set in eight variables x1, x2, x3, x4, x5, x6, x7, x8 written numerically in Table 1.Basic calculations were first made by means of rough sets, and then by means of bivalent decision logic trees [9].Calculating an example by means of a computer programme was the next stage [10].
576 optimum sets we obtained, the analysis of which showed the lowest importance rank of parameters x1 and x3 as well as the dependency between parameters x2 and x4.This is why an idea of applying such functionalities as proxy variable and conditionality in case of subsequent calculations emerged.The realization of the idea of applying a proxy variable z, in which parameters x1 and x3 are included, with applying the condition of the sequence of parameters x2 and x4 at the same time, has is described in [8].It has been forced in calculations that parameters x2 and x4 always occur in the following order x4x2, whilst parameters x1 and x3 become one variable z.Consequently the process calculation time is reduced along with the number of optimum sets to 120.Such a reduced number of optimum sets makes it possible to make further analysis in an easier way focusing only on remaining variables (x5,x6,x7,x8).A deeper analysis of obtained results would make it possible to assume that remaining parameters are of the same importance rank.It is thus possible to state that they are equivalent and independent.

Problem defining optimum sets of parameters on the basis of the number of real branches 4.1 The need and idea for the realisation of a new module of the computer programme
Although during calculations after drawing exemplary multi-valued logic trees for chosen optimum sets it turned out that they are different from each other in the number of real branches (highlighted on trees).For example, a tree representing a set x6x5x7x2x4x8x1x3 had 21 irreducible real branches, whereas with the set x7x8x4x2x6x5x1x3 it had 23 of them.A further analysis of the trees showed that up to a certain level, all trees are on the same level -possessing the same number of real branches, which is 13 (the fourth floor of the tree counting from the top).

Exemplary trees with the placed set …x1x3 on upper branches
Exemplary trees with the placed set … x3x1 on upper branches Therefore, the choice of the fifth variable was more important.For example, putting the variable x7 after x8 in the first set was beneficial (there are 15 real branches at this tree level), whereas choosing x2 after x6 was not (16 real branches).This problem showed how useful the method of checking irreducible real branches on multivalued logic trees is.It enables finding the best sets of parameters among advantageous ones, even if the difference between them would be minimum.
The new functionality would be a module calculating the number of branches of real, multi-valued, logic decision trees on which optimum sets chosen by the programme will be located.

Modification of the basic algorithm
The creation of a new module requires modification of the basic algorithm and new software.The number of real branches has to be counted by summing their number on each level.In order to get to know the number of branches on each level, it is necessary to calculate the difference in the number of branches of k-th level of a decision tree and the number of simplifications of z-th variable multiplied by the valency of z-th variable for a given stage.Only the last stage should be calculated completely according to the basic algorithm.Sums obtained in this way have to be juxtaposed against each other.The smallest ones will indicate the most beneficial sets.Therefore, the pattern of the basic equation ( 1) has to be modified to the following form (for all stages, except the final one, it will be counted according to the basic pattern): (2) where: x1 -the number of step branches of the analysed decision tree, ik -the number of branches of the k-th level of the decision tree, iz -the number of simplifications of the z-th variable, w -the valency of the z-th variable.
The value of each substage (each tree level) has to be counted according to the formula above.The value for the whole set will be used for comparisons.For example, for the set x8x7x6x5x4x2x3x1 it is necessary to count values for particular x at a given stage as indicated below: Step Clearly, only the part of the equation which is included in the modified formula (the part in bold print) is to be taken into consideration in calculations.Finally, the following values will be obtained for each stage and their sum will give 21: The resulting value (21) is the number of all real branches for the calculated example.In this way, it is necessary to calculate values for each of optimum sets indicated by the programme and then compare these values.These sets which obtained the minimum value (or values) will be the most beneficial, even if their number is slightly different.

New functionality -data for a chosen device
An axial-flow vortex pump, which is a kind of a centrifugal rotary pump, was chosen for exemplary calculations.This pump is characterised by the following physical quantities (which influence its work efficiency):  Q -describing the volume flow,  H -describing the head,  N -describing the power,  η -describing the efficiency,  n -describing the rotational speed,  φ -describing the angle of setting the impeller blades.
Knowing the model construction we may connect the parameters describing its operation and elements responsible for its values.This, in turn, makes it possible to carry out a better analysis of the set of pump parameters from with a view to determine particular importance ranks and thus, an optimal set of construction and operation parameters.As calculated.there should be three optimum (best) sets.However, further calculations (the calculation of the number of real branches for each set) show better and worse sets among them.Calculations for particular sets are presented below: Certainly, knowing the construction and the process of pump operation, it is obvious that parameters φ and n should occur one after another because of their interactivity (requires applying an appropriate condition here).However, for the needs of the analysed problem it was resolved not to in order not to overshadow the calculation results.

Conclusion
An example described in this article shows how a computer programme can facilitate the process of calculating and how useful it can be in determining the importance rank of construction and operation parameters.A complex and time-consuming process lasts from a few to several dozens of seconds, it does not draw the user's attention and it eliminates many potential mistakes.Additional functionalities of the programme (such as the possibility of imposing conditionality of the set of parameters and creation of proxy variables) are equally important and useful.However, as shown, sometimes even these elements of the programme are insufficient, which is why the creation of the described module determining the number of real branches is an important solution recommended for proper functioning of the process of determining the importance rank of construction and operation parameters.A new module will facilitate the calculating process and confirm the credibility of obtained results.It will also solve the problem of obtaining a huge number of beneficial sets differing in the minimum number of real branches.This is why in subsequent stages, the described idea should be programmed and the obtained solution should be tested and described.

Fig. 1 .
Fig. 1.Basic window of the programme with an option of downloading data.

Fig. 2 .
Fig. 2. The view of the programme with a condition and result window.

Fig. 3 .
Fig. 3.The view of the programme with proxy variable and result windows.

Fig. 4 .
Fig. 4. Construction of the propeller pumpPumps of this type are mainly used in industrial and energetic installations, particularly in power plants (most often in small water power plants).The research was carried out on the model turbine (designed and built with the use of construction elements of the serial axial-flow vortex pump 25P21-2 of the Warsaw Factory of Pumps and Valves -Fabryka Pomp i Armatury WAFAPOMP SA).The actual results had to be selected and coded in an appropriate way in order to make it possible to present it by means of a multi-valued logic function.Final values got an appropriate code number: φ,n=0,l,2,3; Q=0,1,2,3,4,5; H,N=0,1,2,3,4,5,6[11].

Table 1 .
A digital record of coding variables.

Table 2 .
Exemplary optimum sets presented on shortened logic trees.

Table 3 .
Coded results of parameter values