• No results found

5.3

Specifying Random Variables

As previously described, the ArchiMate language specifies the use of profiles in order to be able to append data to elements within the EA model. This feature, and its implementation within Architect is leveraged by the artefact in order to specify random variables, to be used as input values to the analysis. As stated in section 5.1.3, it is assumed that the user’s analysis script makes use of such profile attributes in order to input the variables of the analysis model on the EA model, and subsequently also store the results of the analysis on profile attributes.

5.3.1

Specifying Random Variables

Once variables have been defined on user’s profiles’, it should be possible to specify them as being random, and provide the necessary information describing the beliefs held about the range of possible values the variable could assume. This can be done via another set of attributes on another profile, which is the purpose of the Random Variables profile, provided as part of the artefact. The first set of structured attributes

on this profile are explained next, corresponding to the example in figure 5.2 and figure 5.3.

Variable Name The first field on this profile which has to be filled out by the user

is the ’Variable Name’. The string value entered here should be name of the attribute which the user wishes to be specified as a random value. The name should be an exact copy of the name as it is shown in the user interface (UI), as can be seen in the example in figure 5.2.

Attribute (auto-filled) As indicated, this field does not have to filled out by the

user as it is automatically filled out during the execution of the Monte Carlo simulation

Distribution Here one of five continuous distribution can be selected, namely the

Normal, Lognormal, Uniform, Triangular or Beta distribution (although other options could easily be added, the selection was limited for the purposes of this artefact to keep the remainder of profile as simplistic as possible).

Parameters Depending on the chosen distribution, between two and four different

parameters need to be provided by the user. Which of these need to be filled out, and what parameter is assigned to which field, is indicated by the numbers

Fig. 5.2 Specifying a Random Variable Example

Variable ⟨Structure⟩

Variable Name ⟨String⟩

Attribute (auto-filled) ⟨String⟩

Distribution ⟨Enumeration⟩

{Normal[1], Lognormal[1], Uniform[2], Triangular [3], Beta[4]}

Mean[1]/Min[2-4] ⟨Real⟩

Std. Deviation[1]/Max[2-4] ⟨Real⟩ Most Likely [3]/Alpha[4] ⟨Real⟩

Beta[4] ⟨Real⟩

Fig. 5.3 Random Variables Profile Attributes

in square brackets, which correspond to the numbers in square brackets behind the names of the distributions as they are provided in the UI.

As it is not known how many random variables will exist on each element, and one cannot assign more than one Random Variables profile to a single element, the attributes have to be structured in such a way that an unspecified number of variables can be specified via the single profile. As such the structure as described above is contained within an attribute of typelist. This allows the user to add any number of

5.3 Specifying Random Variables

Fig. 5.4 Example use of the Random Variables profile

5.3.2

Discrete Random Variables

Besides providing the ability to specify attributes as continuous random variables, it is also possible to specify them as discrete variables. A second structured set of attributes is provided for this purpose on the Random Variable profile. As before, the name of the attribute has to be provided to ’Variable Name’, but instead of specifying a distribution, the user has to provide a list of values and their corresponding probabilities (where the sum of the probabilities for a single variable must equal 1). The profile, as can be seen in Architect, can be seen in the example in figure 5.4.

The complete structure of the attributes on the Random Variables profile, along with their data types, can be seen in figure 5.5. A copy of the profile definition and its translation file can be found in Appendix A.6 and A.7 respectively. Note that the names provided in the figure are as they are seen in the UI of Artefact. The names do not necessarily correspond to the attribute type, but rather were chosen to help the user make sense of it. The variables nr, ndr and ni,vp indicate that multiple instances

of the random variable, discrete random variable, and their values & probabilities can exist.

The complete profile, as represented here, allows the artefact to meet the third requirement identified for its development in 4.4, namely to be able to specify any number of attributes on any given element as random, including all necessary param-

Random Variables ⟨P rof ile⟩

List of Rand. Variables ⟨List⟩

Variable (nr) ⟨Structure⟩

Variable Name ⟨String⟩

Attribute (auto-filled) ⟨String⟩

Distribution ⟨Enumeration⟩

{Normal[1], Lognormal[1], Uniform[2], Tri- angular [3], Beta[4]}

Mean[1]/Min[2-4] ⟨Real⟩

Std. Deviation[1]/Max[2-4] ⟨Real⟩ Most Likely [3]/Alpha[4] ⟨Real⟩

Beta[4] ⟨Real⟩

List of Disc. Rand. Variables ⟨List⟩

Variable (ndr) ⟨Structure⟩

Variable Name ⟨String⟩

Attribute (auto-filled) ⟨String⟩ Values and their probabilities ⟨List⟩

Value & probability (ni,vp) ⟨Structure⟩

Value ⟨Real⟩

Probability ⟨Real⟩

Fig. 5.5 Random Variables Profile eters.