4.1. Detailed Description of Metadata in FRAM
A FRAM Function represents an activity, or process that changes something in the system; and this change can have an effect on any other Function in the system with which it interacts. The metadata facility sets out to allow us to see that effect of these changes and follow the consequences of these events.
Consider a Function has a property that can be modified after its interaction with another Function. Call this property / parameter a “value” and identify it with a “key”.
The FMV allows us to specify these key–value pairs as metadata (
Figure 2).
In this way, the metadata can be defined for different types of data, including:
Fixed constants that represent properties of a specific Function, like a name, description, or other properties.
Variable properties of a specific Function that can be modified using equations based on other metadata available from upstream Functions.
Global constants that are set by the starting Function and passed on through the couplings.
Global variables that are passed on through the couplings but can be modified by Functions using equations as they pass through.
Consider the Function “To boil water”, using an electric kettle.
One of the parameters of critical interest would be the TEMPERATURE of the water being boiled.
There would need to be then a KEY label for this Temperature, which would have a VALUE calculated from an EQUATION relating the Power supply wattage, the Quantity of water in the kettle and the Time allowed for the kettle to boil.
These extra parameters, POWER, QUANTITY and TIME, can be VALUES for these new KEYS, transmitted by the interaction with upstream, or background Functions. So, the FMV does not just check that these upstream aspects are present, it can also read and process the information from the interaction as a measurable (calculable) effect on the Function’s OUPUT.
The Temperature of the water produced by that Function could thus have a calculated VALUE as a mathematical function of the VALUE of the strength of the power supplied, the VALUE of the quantity of water, and the VALUE of the time that the kettle is allowed to take.
Figure 3.
TEMPERATURE equation on Function “To boil water”.
Figure 3.
TEMPERATURE equation on Function “To boil water”.
Further, the TEMPERATURE of this water could have a direct effect on the QUALITY of the tea produced, if this “boiled water” OUTPUT is an ASPECT for a Function “To pour on to Tea leaves”. So, we can have a KEY–VALUE pair for the quality of the tea produced by this Function. This can then be calculated from the TEMPERATURE of the water received and perhaps a TIME VALUE from an upstream Function “To control the time it is allowed to stew”.
In a conventional FRAM analysis, the possible effects of cooler water, or shorter times could be flagged as a variability to be noted. With the metadata we can now follow / predict the development and the quantitative effect of the ripples produced by this variability, right throughout the instantiation; and track any “emergence” of unexpected effects, or “resonances”.
Because the Metadata is defined by the user, the FMV does not direct any particular method of analysis, but rather, by maintaining an open configuration allows for the possible use of many different forms of interpretation and analysis. This is in keeping with the purpose of the FRAM, which is a method to build a model of how things happen, not to interpret what happens in the terms of a pre-existing model. By combining FRAM with the FMV and Metadata, it should be possible to model any complex system and define a meaningful analysis.
Figure 4.
The “Boil Water” FRAM Model.
Figure 4.
The “Boil Water” FRAM Model.
4.2. Examples of Metadata
4.2.1. Boil Water
If we take the Boil Water model used in the previous section, taking the equations as they are and setting aside any discussion about the physics and assumptions made, we can examine this as an example of how the metadata can be used to calculate and display results, and how the model can be used to simulate the system under varying conditions.
The formula used to calculate the temperature of the water after a given heating time is based on a simple specific heat formula shown here as it is represented in the FMV using somewhat descriptive key names:
Where:
TEMP_Start_C is the starting temperature of the water in degrees Celsius (°C)
POWER_W is the power rating of the electric kettle in Watts (W), which is the same as Joules per second (J⋅s-1)
TIME_s is the time that the water is allowed to heat, in seconds (s)
QUANTITY_g is the quantity of the water that is being heated, in grams (g)
Capacity_J_gC is the specific heat capacity of water, at 4.184 Joules per gram, per degree Celsius (J⋅g-1⋅°C-1)
The calculation is entered into the Metadata for the Function <To boil water>. The data used in the calculation is ‘supplied’ by other background Functions, initially as constants that represent properties of the water, kettle, and time, as shown in the following table:
Figure 5.
Initial Key-Value pairs for the “Boil Water” model.
Figure 5.
Initial Key-Value pairs for the “Boil Water” model.
When the FMI interpretation is advanced, on Cycle 0, the background Functions supply this data through their couplings to the aspects of the <To boil water> Function. The Entry Function <To make a cup of tea> also activates and supplies the need for boiled water through the Output [boil water] that couples with the Input of the <To boil water> Function. On the next FMI Cycle, 1, the conditions for the activation of <To boil water> have been fulfilled, such that the aspects are all present and an Input has been received. The TEMPERATURE equation is calculated (91.7°C) and the Output [hot water] is created.
At this point we can display the results of the TEMPERATURE equation by activating the display results panel that allows for the selection of a Metadata key, with the corresponding value displayed as a configurable colour scale. Advancing the FMI interpretation to Cycle 2, the next downstream Function activates <To pour on to tea leaves>.
Figure 6.
FMV Display Results Setup.
Figure 6.
FMV Display Results Setup.
To complete the example model, this function has an equation that takes the temperature value supplied by the [hot water] Input together with a [stewing time] constant (3 minutes) to calculate the quality of the tea produced, where the result is either “Weak”, “Good”, or “Strong”. These results can also be displayed against a second colour scale.
The FMI interpretation concludes on the next Cycle, 3, with the Exit Function <To drink tea>.
The results of the completed interpretation are displayed in the FMV as shown in
Figure 7, with a water temperature of 91.7°C and a tea quality of “Good”, displayed on their Functions as a red bar and green bar respectively.
The results can also be output as a data table, as shown in
Figure 8.
Now that the model is able to simulate a set of specific conditions, an instantiation, we can now vary the initial data to create different scenarios for alternative instantiations of the model.
For the second instantiation, let’s double the amount of water supplied in the kettle, where
QUANTITY_g now equals 2000 grams (about 2 litres). If the heating time is still constrained to five minutes (
TIME_s equals 300 seconds) then executing the model yields a water temperature of 55.85°C and a quality of tea that is “Weak”, shown in
Figure 9 by the orange and pale-yellow results bars, respectively.
For a third instantiation, let’s return the water quantity to 1000 grams, but increase the stewing time on the Function <To control the time it is allowed to stew>, from 3 minutes to 7 minutes. Now the results return a water temperature the same as the first instantiation of 91.7°C, but the quality of the tea is now “Strong”, as shown by the brown results bar in
Figure 10.
This modelling could be used in a situation where the total time to boil the water, allow the tea to stew, and then enjoy drinking the tea, is constrained: but other parameters such as the quantity of water and the electrical power of the kettle could be optimised to produce quality tea.
One of the background Functions, <To set the target temperature>, has not been used so far in this example. This is provided as an alternative Control aspect where the time is unconstrained, and the kettle would be allowed to continue heating until a set temperature has been achieved. In this case the formula is rearranged to calculate the time required, where:
Given the starting values of the initial instantiation, the time required to reach 100°C would be 5.58 minutes. This could then be passed on to downstream Functions for other calculations, such as, the time remaining to enjoy drinking the tea before the break time is over. An application of this type of time calculation is outlined in the Formula 1 Pit Stop model in section 4.3.
It should be noted that the starting temperature of the water in the kettle is another factor that could introduce variability into the results, but so far has been set as a constant at 20°C. As already demonstrated for other parameters, we could manually change this value for subsequent instantiations to model the effects of a range of different values.
Another option for modelling this type of variation in start parameters is to set the model to cycle repeatedly but with different Metadata values. The model takes 3 FMI Cycles to progress from the Entry Function to the Exit Function, so if we set the Entry Function to activate every 3rd Cycle, then the model will restart every time it completes a full interpretation. We also set the FMI Control to ignore the default stop conditions and run continuously.
Next, we have five different options for varying the starting temperature of the water automatically for each instantiation:
For the Metadata key TEMP_Start_C on the Function <To fill with a quantity of water>, the value can be changed to 0, to set the starting point for the first instantiation, and then an equation added, where TEMP_Start_C = TEMP_Start_C + 1. This will start with 0°C and increase the temperature by one degree every instantiation.
The equation can be set to a pseudo-random number within a given range. For example, to start an instantiation with a random integer between 10 and 30 (inclusive), the equation would be TEMP_Start_C = rndi(10,31). Double precision floating point numbers can also be generated using rnd().
The equation can be set to return a pseudo-random number that, on repetition, approximates a normal distribution. For example, a normal distribution with a mean of 20 and a standard deviation of 10 would be TEMP_Start_C = rnorm(20,10)
A table of values can be imported into the model, and an equation used to return a value from the table, such as lookup(row number,column number). In our example, the row number can be set from the available system variable that contains the current Cycle number, Cycle, and the first column of the data table, such that: TEMP_Start_C = lookup(Cycle/3,0)
Similar to the previous case, a value can be referenced from a data table, but using a cross reference between a row name contained in the first column, and returning data from another column referenced by a column header name, such as TEMP_Start_C = xref(Cycle,”Temp”). In this case the data table does not need to be sorted or sequential.
After allowing the interpretations to run for the desired number of Cycles and repetitions, the results table can be Interrogated (and exported) to analyse the results, for example, to find the minimum starting temperature that would produce quality tea within the given time constraint (this happens at about 19°C, and at Cycle 56 using option 1).
This example has been kept intentionally limited with only two foreground Functions, to the point where the analysis conclusion above could be calculated directly without modelling. However, the intention is to demonstrate the basics of modelling that can be extended to more complex models. Even given the premise in this example, the boundaries of the model could be expanded so that the background Functions themselves become foreground Functions and the parameters discussed are influenced by other upstream Functions. In this way we could begin to model variability that is influenced by numerous interrelated couplings with the possibility of discovering unexpected emergent results.
4.2.2. Plan A or Plan B
It is not uncommon in FRAM models for a Function to have more than one Output, that may collectively couple with a single downstream Function, or the different Outputs may couple with different downstream Functions. The realisation of these potential couplings into actual couplings during an instantiation could differ based on the conditions of the specific instantiation, in effect causing conditional branching of the model during the instantiation.
In the basic FMI, a Function that receives an Input then considers the presence of its aspects according to its defined FMI profile before activating and producing its Outputs. If it activates then all Outputs are created and become actual couplings with downstream Functions. If it does not activate then no Outputs are created. This basic default setup does not consider the Metadata available from upstream couplings before making the ‘decision’ to activate, and if it does activate, it cannot choose to only create one Output over another.
If the interpretation analysis of a model requires this more complex functionality of conditional activation and branching, then it is extended through the use of a special Metadata key named Activate. To illustrate, consider the following “Plan A or Plan B” model that under default conditions will progress the FMI interpretation to the stop conditions with the activation of two Exit Functions, <To carry out Plan A> and <To carry out Plan B>.
Figure 11.
The default “Plan A or Plan B” model.
Figure 11.
The default “Plan A or Plan B” model.
First consider the Function <To meet the critical conditions>. To model an instantiation where the Output of this Function is never realised, and does not create an actual coupling with the downstream Function, then we can add the special Metadata key Activate with a value of 0. If the value is 0 or false, then the Function will not activate.
Figure 12.
The Activate Key with a value of 0.
Figure 12.
The Activate Key with a value of 0.
When the FMI interpretation is run, it stops at Cycle 2 with no Functions activated. The Function <To meet the critical conditions> is on “hold” because of the
Activate key as shown by the yellow highlight in
Figure 13. The downstream Function <To execute the critical function> does not activate because the conditions of the default FMI profile for this Function are not satisfied, in that the Precondition aspect is not present.
For the next illustration we will set this Activate key to a value of 1, which means that all Outputs will be created. This has the same result as the initial model with the activation of the two Exit Functions.
Next, take the other background Function <To provide the required materials> and create a Metadata Key named Materials with a value of 100.
Now consider the Function <To execute the critical function>. We can model an instantiation where this Function looks at the materials available, and makes a decision on which Output to create. For example, if the Materials are greater than or equal to 70 then [Execute Plan A], otherwise [Execute Plan B]. This is achieved by adding an
Activate key to the Function with a conditional formula. If the value of an
Activate key (either fixed or calculated) is any other text that is not 0, 1, or false, then it looks for an Output name that is contained within the text, and activates that Output specifically. For this example we enter the formula:
The first part of the formula up to the question mark is evaluating a statement that can be true or false: “Is the value of the Materials key available on the Resource aspect (R) from the upstream Function (id=4) greater than or equal to 70?”. If this statement is true then the next value (or formula result) up to the colon (:) is returned, in this case the text “Execute Plan A”. Otherwise the remaining value or formula after the colon is returned “Execute Plan B”.
Figure 13.
The Activate Key with a conditional formula.
Figure 13.
The Activate Key with a conditional formula.
When the interpretation is run, only one Exit Function is activated on Cycle 3, <To carry out Plan A>, and the interpretation stops on Cycle 4 with no more Functions activated.
If the Materials key on background Function <To provide the required materials> is changed to a value that is less than 70, and the interpretation re-run, then only the Exit Function <To carry out Plan B> will be activated.
4.2.3. Resilience Potentials
In creating a model, the FRAM method focuses primarily on describing the Functions, with the mutual couplings between Functions emerging from the increasing understanding of the Functions themselves. As a model becomes increasingly complex, it more often resembles a neural network rather than a linear process flow, and some Functions may be both upstream and downstream of others. Since Hollnagel published his Resilience Potentials in 2018 (to respond, to monitor, to learn, and to anticipate), many users of FRAM models have used these as a basis to describe the feedback and feedforward loops in their models. In some cases, like the Patient Management application described later on, they have been added to a model as new Functions to intentionally create new feedback and feedforward loops and introduce resilience into an existing process.
A generic model of the resilience potentials is provided as an example of how the FMI profile handles looping, and how the metadata can be used for iterative calculations.
Figure 15.
A generic FRAM model of the resilience potentials.
Figure 15.
A generic FRAM model of the resilience potentials.
The model has an Entry Function <To cause an event>, that will activate on Cycle 0 of an FMI interpretation. There are two downstream Functions, <To Monitor> and <To Respond>, that would receive Inputs and potentially activate on Cycle 1. However, both Functions have other aspects that are coupled with other downstream functions, that in this case are also upstream of these two Functions. Because the default FMI profile requires that ‘All’ aspects are present before a Function produces an Output, the interpretation hangs at Cycle 1 and no further progress is visualised. This is a valid response, as one of the purposes of the FMI, as described previously, is to identify this type of mutual dependence, and to confirm if it is valid for the given model.
To continue the interpretation, it is necessary to consider the initial activation conditions for the Functions that are waiting for downstream aspects. Take the Function <To Respond> for example, which has a Control aspect of [Better Predicted Response] and a Resource aspect of [Resources needed]. If it is initiated by the event on its Input, can it produce an Output if adequate controls and resources have not yet been established, or is there an initial unprepared reaction that will be later refined by downstream learning? An initial set of controls and resources can be added to the model as additional background Functions, and the FMI profile of the Function set to activate on ‘Any’ Control aspect and ‘Any’ Resource aspect, allowing it to activate if one or the other coupling on each of the aspects is present. For this example, we will take this as assumed and more simply set the FMI profile on both the Control and Resource aspect to ‘none’, so that the Function can activate on the first instance with no other aspect couplings present so that it does not wait for all of its aspects. Similarly, we will also set the Time aspect on the Function <To Monitor> to ‘none’, representing an initial monitoring schedule that will be later refined by downstream learning.
When the FMI is run under these conditions, the interpretation progresses to Cycle 3 with the activation of the Exit Function <To Act>. If we were to advance the interpretation one more Cycle (4), the fourth resilience potential <To Anticipate> would activate for the first time and provide the Control aspect [Better Predicted Response] to the Function <To Respond>. Now, if the Entry Function activated again with a new [External Events] coupling, the model is prepared with more resources and controls for a better response. At this point the FMI interpretation has shown that all Functions can activate and that all potentially couplings are capable of being realised.
Next, we can model the second and subsequent recurring events by setting the FMI profile of the Entry Function to repeat every 4 Cycles, effectively pulsing the model at the same frequency that it takes to activate all Functions. Metadata can be used to represent and display the expected quality of the response based on the number of times the model has iterated through the resilience potentials.
In a very simple case, we can show this by adding a Metadata key of OutputDisplay to each Function. For the Entry Function <To cause an event>, we set the starting value at 1. For all of the remaining Functions, we set them to the same formula, Aavg_OutputDisplay. This is a built-in formula that calculates the average of all of the OutputDisplay values on all of the Aspects. If the aspect is not present, then the value will default to 0. For the <To Monitor> function on Cycle 1, the value coming from the upstream Entry Function is 1, while the Time aspect is not present and evaluates to zero, so the average that is then passed to the Output is 0.5. In this way, the calculated values start at 0.5 and approach 1 on subsequent cycles, as values from looping aspects are added to the calculations.
Finally, we setup the display results for the OutputDisplay key on an orange to blue scale from 0.5 to 1.
Figure 16.
FMV Display Results Setup.
Figure 16.
FMV Display Results Setup.
The first time all Functions produce an output on Cycle 4, their results are all less than or equal to 0.5 and show orange. As the OutputDisplay values approach 1 on subsequent iterations of the model, the display results move from orange, through pale-yellow to blue, with all Functions eventually displaying blue, such as the <To Respond> Function calculating an OutputDisplay value of about 0.9 on Cycle 16.
Figure 17.
“Resilience Potentials” results on Cycle 4, 8, 12 and 16.
Figure 17.
“Resilience Potentials” results on Cycle 4, 8, 12 and 16.
In practice this type of model could represent learning how to monitor for precursors, so that unwanted outcomes can be anticipated, and responses can be preventative or interventionary, as opposed to reactionary.
The principles of repeatedly cycling a model with loops can also be used for other types of iterative calculations, such as modelling steady-state conditions, optimising parameters, or even machine learning algorithms.
4.3. Current Applications of the Metadata
4.3.1. Formula 1 Pit Stop
An interesting application of the metadata option in FRAM was developed to explore its usefulness in assessing overall times taken for a process, in which a series of independent, but linked functions had to combine to complete the process. The example chosen was a to build a FRAM of a Formula 1 pit stop process and specifically, the tyre changing instantiation. The results are detailed in the paper, (Slater (2022)) and show an interesting confirmation of the applicability of the approach.
The process as prescribed (proscribed) by the official rules (Work as Imagined), was modelled, and predicted “average” times obtained, of around 2.5 seconds. It was then noted, that in actual racing scenarios, (Work as Done), times as low as 1.8 seconds had been achieved. Careful examination of videos of actual situations were studied, and showed that the fastest teams were achieving the result by anticipating key events, such as moving the wheel guns towards the cars before they had stopped in their “boxes”, so that the wheel nuts were being untightened before the car was jacked up: and similarly, the teams were anticipating and releasing the cars as the wheel nuts were being tightened and before the jack had been fully lowered.
The validity of the analysis was confirmed by an actual racing incident in which this anticipation in releasing the car, broke the leg of the front jack man who did not have time to get out of the way. The rules were changed after that event, adding interlocks and monitoring; and the pit stop times then reverted to nearer the FRAM predicted 2.5 seconds for the work as “should have been done”.
4.3.2. Patient Management / Safety
Bed availability and assignment is a critical daily problem for hard pressed hospital staff trying to cope with increasing demand against a background of reducing bed provision nationally. A morning meeting has to assemble all the staff responsible for operating and nursing the inevitably oversubscribed waiting lists, to allow them to update the meeting on the latest situation. The process involves the interaction and negotiation of numerous considerations, to enable a consensus view of what is to be done. The next day exactly the same thing happens afresh.
A FRAM model of this process of bed assignment was built and analysed with medical professionals involved. MacKinnon (2023)) It quickly became clear that although theoretically, the meeting decided the (imagined) allocations for the day, there was a continuous process throughout the day of adapting to emerging situations, which gave them the resilience to cope not always “as imagined”, or as decided in the meeting.
Figure 18.
The current Bed Allocation system.
Figure 18.
The current Bed Allocation system.
Everyone agreed that this was not only inefficient, meaning estimates always individually erred on the side of their own personal degrees of caution, but it also resulted in elective surgery patients (in this case children) being prepared for surgery, waiting around most of the day, only to be sent home to try another day. It was also apparent that there was no single source of integrated information, perhaps because it became out of date very quickly.
The FRAM analysis and capabilities allowed an alternative proposal. (
Figure 19)
All the data/ information needed was already recorded and was recoverable from the hospital computer system as patient data records. Not only retrievable, but available for predicting trends and learning patterns. The paper proposed using the FRAM model to visualise and track the bed data as metadata, through another option provided by Hill in the FMV, to import data from an external source. Thus, a new role (function) of Bed coordinator could now preprocess and continuously update all the relevant staff immediately with current and predicted demands and usages. It is further planned to utilise the FRAM with metadata to learn patterns of demand and availability, not just seasonally, but in response to learned precursors or “weak signals”.