Goal-Oriented BI
Literature review
Formalized algorithm
In this section, we discuss the formal definition of the formula-base algorithm. This algorithm is based on the evaluation algorithm described in Appendix II of the URN standard. To set the context, the core part of the standard algorithm is repeated here (Figures 6 and 7) before the extension points and modifications are illustrated in later figures. The data types used correspond to elements of URN's metamodel.
Figure 6
Forward propagation algorithm, standard version.
Figure 7
Calculate evaluation algorithm – Formula-based algorithm.
The algorithm is a bottom-up forward propagation algorithm that uses the initial values set in a GRL strategy to calculate the satisfaction level of the rest of the GRL elements in the graph shows the forward propagation algorithm from the standard. In this algorithm, totalSourceLink is total number of incoming source links to a node and linkReady is used to track the number of links that have been used in the propagation so far.
The forward propagation algorithm calls the CalculateEvaluation algorithm (found in Figure 7) to calculate the evaluation value of each model element. The calculation method varies depending on the type of the link that is connected to the model elements and for each type of link, a different algorithm is invoked. Prior to looking at the links, the standard algorithm calls PreGetEvaluation to use the initialized values in the GRL strategies if any. If the node is already initialized by the strategy that value is used and the evaluation result is returned immediately.
In the formula-based algorithm, PreGetEvaluation is extended (see Figure 8) to get the formulas definition from the element metadata and to define the math evaluators. Each element can have both evaluation formula and situation formula defined as metadata, i.e., FormulaBasedGRLStrategyAlgorithm_evalFormula and FormulaBasedGRLStrategyAlgorithm_situationFormula respectively. The math evaluator for each formula is implemented using a math library that gets a string math formula as well as name-value pairs as variables used in the formula as input, and returns the result of the formula as output. The implementation in jUCMNav that was done as part of this research uses the math library that was developed by Lai.
Figure 8
PreGetEvaluation – formula-based algorithm.
After the formula is defined, in the CalculateContributions algorithm (not shown here), ComputeContributionResult (Figure 9) is called, which is overridden in the formula-based algorithm to set the name-value pair variables of the formula using the KPI value sets of the source nodes. Therefore, KPI value sets (i.e., evaluation, target, threshold, and worst values) of each source node connected to the KPI that is being evaluated can be used in the formula.
Figure 9
ComputeContributionResult – formula-based algorithm extension.
Furthermore, ComputeSituationResult, Figure 10, is called and initializes the situationMathEvaluator using the elements that are marked with the Situation stereotype as input. This approach also allows using any formula, including the default ones discussed in Table 4, to define a situation that impacts a KPI (Figures 11 and 12).
Figure 10
ComputeSituation – formula-based algorithm extension.
Figure 11
InitFormula – formula-based algorithm extension.
Figure 12
IsSituation – formula-based algorithm extension.
The other extension point that is provided by the standard algorithm is PostGetEvaluation. The standard algorithm calls this method after the evaluation is performed but does not implement anything and just returns the values. This is the extension point (Figure 13) that is used to calculate the result of the formula and finally the satisfaction level of the KPI by calling CalculateIndicatorEvalLevel. CalculateIndicatorEvalLevel maps the KPI value sets to the GRL standard (−100 to 100) satisfaction level. Prior to calling CalculateIndicatorEvalLevel, the evalMathEvaluator and situationMathEvaluator, if defined, are used to calculate the evaluation value and threshold value of the KPI, respectively.
Figure 13
PostGetEvaluation – formula-based algorithm extension.