CHAPTER 6: ABMS MODEL IMPLEMENTATION AND SIMULATION
6.2.4 AGENTS AND AGENTS’ BEHAVIOUR
The implementation of an agent’s behaviour in the ABMS_A&E model was done in two steps. The first step considered the development of the A&E simulation model with simple behaviours. The agent’s behaviour was assumed to be purely reactive in this step, which means the agents react to their current percepts and the information received from the environment. The second step included some deliberative behaviour of the agents implemented using PECS framework.
100
6.2.4.1 ABMS using simple reactive behaviour
This section will describe the first step of reactive behaviour. In the previous section, it was seen that all agents are subclasses of the “Agent” class. It can be seen from Appendix B, Table B1 that the class Agent has one method which is inherited by each agent: moveTo (GridPoint). This method receives a location in the grid and moves the agent to that point in the grid. Other methods do not define the agent’s behaviour but are used to obtain information about the agents and the environment. For instance, the class agent has a method called getMyResource(), which returns to the resource where an agent is at a particular time. For instance, let us suppose that a Nurse is seeing a Patient in a triage cubicle, then the method nurse.getMyResource() and patient.getMyResource() will return the location of the triage cubicle of the nurse and the patient. There is some behaviour which is specific to each type of agent. Appendix B, Table B2, presents a description of the agents in the model and their respective variables. The Patient agent, besides moving, has two additional methods that define their behaviour: joinQueue(Queue) that defines the way a patient joins a particular queue and decideWhereToGo() that allows the patients to decide if they should continue in the department until the end of the treatment or leave at any point of the process.
The staff represents the clerks, nurses and doctors, each of whom has a specific working shift, and that defines when to start or end work. The methods scheduleWorkShift(), startShift() and endShift() define when to start and finish a shift. The methods engageWithPatient() and releaseFromPatient(), define what staff need to do when they interact with patients. The method findCubicle(), allows the staff to search specific cubicles, and the method decideWhatToDo() allows the staff to decide what to do at the end of any activity.
Each member of staff has the responsibility for seeing patients in different processes. Clerks register patients, nurses can triage patients or stay with them during the treatment process, and doctors treat patients.
6.2.4.2 ABMS using deliberative behaviour
It was mention in chapter 5 that if agents have deliberative behaviour, they use a more complex decision-making process where they need to use a perception system that depends on agents’ internal states and goals. Deliberative behaviour here is done by implementing the PECS framework. The following section will explain this framework and how it is implemented to model doctors’ behaviour in the ABMS_A&E model.
101
PECS framework
As introduced in chapter 4, PECS is a Multi-purpose reference model that considers human beings as “psychosomatic units with cognitive facilities embedded in a social environment” (Urban and Schmidt,2001; Brailsford & Schmidt, 2003; Schmidt, 2005b), in which behaviour needs to be defined considering four state dimensions: Physical conditions (Physis), Emotional state, Cognitive capabilities and Social status.
The PECS agent architecture consists in three different layers in an extension of an input:output framework (Urban and Schmidt, 2001) as shown in Figure 6-3. The input layer is defined by a sensor component that receives the information from the environment and sends it to the perception component. The information in the input layer is processed by the perception component and transferred by a set of functions represented by F to the internal layer, which contains the set of the PECS state variables represented by Z. The actor and behaviour components define the output layer. The behaviour can be reactive or goal-directed, and the actors are responsible for executing the actions ordered by the behaviour component.
Figure 6-3. PECS architecture (Urban and Schmidt, 2001, pp.2)
In order to implement PECS framework in simulation models developed in this thesis, it is necessary to define for each entity or agent that makes decisions the functions that allow the transformation from the information received by the input layer to the actions defined by the actor component. Figure 6-4 shows a Pictorial representation of the implementation of PECS in the simulation model and the variables are defined below.
102
Figure 6-4. Pictorial representation of the implementation of PECS in simulation models
Firstly, at a time t, each agent or entity receives information from the sensor in the form of the input variables 𝑋1, 𝑋2, … , 𝑋𝑚 and from the internal layer receives the values of the state variables 𝑍1, 𝑍2, … , 𝑍𝑛 at the same time. F represents the set of functions 𝐹1, 𝐹2, … , 𝐹𝑛 in the perception layer that transform the input and state variables in time t to the state variables 𝑍′1, 𝑍′2, … , 𝑍′𝑛 at time 𝑡′= 𝑡 + Δ𝑡, as shown in Equation 6-1. That is, F is the state transition function that transforms the state variables at time t into subsequent state at time t’ as a result of inputs.
𝐹: 𝑆𝑇𝐴𝑇𝐸𝑆 × 𝐼𝑁𝑃𝑈𝑇𝑆 → 𝑆𝑇𝐴𝑇𝐸.
𝐹((𝑍1, 𝑍, … , 𝑍𝑛), (𝑋1, 𝑋2, … , 𝑋𝑚)) = (𝑍′1, 𝑍′2, … , 𝑍′𝑛) Equation 6-1 Behaviour is not directly trigged by state variables Z. Schmidt defines other variables, known as dependent variables represented by W, that are responsible for an agent’s behaviour. The dependent variables in this research represent the intensity of each state variable, so it is possible to compare all dependent variables and define the possible behaviour for each agent or entity. The relationship between state variables Z and dependent variables W can be defined by a set of functions represented by H. The H functions transform the state variables 𝑍′1, 𝑍′2, … , 𝑍′𝑛 at time t’ into dependent intensity variables 𝑊′1, 𝑊′2, … , 𝑊′𝑛at t’, as shown in Equation 6-2.
𝐻: 𝑆𝑇𝐴𝑇𝐸𝑆 → 𝐷𝐸𝑃𝐸𝑁𝐷𝐸𝑁𝑇.
𝐻(𝑍′1, 𝑍′2, … , 𝑍′𝑛) = (𝑊′1, 𝑊′2, … , 𝑊′𝑛) Equation 6-2
Finally, the actor component is responsible for executing the actions ordered by the behaviour component through a G function as presented in Equation 6-3. G is the output function, that transforms the state variables and the dependent variables at time t’ into the outputs or observable behaviour 𝑌′1, 𝑌′2, … , 𝑌′𝑛 at the same time.
𝐺: 𝑆𝑇𝐴𝑇𝐸𝑆 × 𝐷𝐸𝑃𝐸𝑁𝐷𝐸𝑁𝑇 → 𝑂𝑈𝑇𝑃𝑈𝑇𝑆
103
Schmidt suggests that the adaptation of this structure to specific cases can be made by defining the parameters, the specific state variables and the functions F, H and G. The assignation of the parameters of the functions defines the personality of the agents.
PECS framework for doctors
Although the behaviour of all the people that take part of an A&E process affect its performance, in order to demonstrate how human behaviour can be included in simulation models of A&E departments PECS framework will be implemented to model doctors’ behaviour in the ABMS_A&E model. As it was stated in the research design, the A&E models built in this thesis do not attempt to realistic simulations instead to gain insight into how human behaviour can be incorporated into those models.
The assumption considered in the PECS framework is that a human being can be represented as a system and therefore, the system-theoretical principles apply to define the structure of an agent. In this framework, each agent behaves accordingly to the intensity of motives which depend on the state of the PECS variables. Although for many years, researchers have tried to measure different factors of human behaviour such as fatigue, emotions, learning and social status, there is no universal approach to measure those factors (Ajzen & Fishbein, 1980; Beurskens et al., 2000; Chang, 1998; Conrad & Kellar-Guenther, 2006; Lee, Dziadkowiec, & Meek, 2014; Maytum, Heiman, & Garwick, 2004; Perlovsky, 2014; Sterman, 2000).
Previously, it was mentioned that in the PECS framework, behaviour needs to be defined considering four state dimensions: Physical conditions (Physis), Emotional state, Cognitive capabilities and Social status. In this research, the physical condition (P) will be defined later by a state variable that represents doctor’s energy level, the emotional state (E) will be defined by state variable that represents doctor’s calmness level, the knowledge level (C) will be defined by a state variable that represents the level of knowledge that a doctor has about a patient and the social status (S) will be defined by two state variables one represent doctor’s level of experience and the other doctor’s reputation. As mentioned earlier, the behaviour is not directly trigged by state variables but by the dependent variables. The dependent variables are calculated through the state variables, and they can drive to an output that defines the agents’ behaviour.