Complex Quality Improvement Network

Complex Quality Improvement Network preview image

1 collaborator

Default-person Bill Wilson (Author)

Tags

agent networks 

Tagged by Bill Wilson over 1 year ago

continuous improvement 

Tagged by Bill Wilson over 1 year ago

cooperation 

Tagged by Bill Wilson over 1 year ago

Visible to everyone | Changeable by everyone
Model was written in NetLogo 6.1.1 • Viewed 162 times • Downloaded 5 times • Run 0 times
Download the 'Complex Quality Improvement Network' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


THE COMPLEX QUALITY IMPROVEMENT NETWORK (CQIN) AGENT-BASED MODEL

This model explores the behaviour of quality improvement (QI) teams seeking improvement within a complex adaptive system. The starting point is the agent communication and cooperation underpinning the activity. Any improvement (or lack of improvement) is an emergent property of the system arising from this granular cooperative activity.

The CQIN agent-based model treats large-scale improvement activity as a network of adaptive agents cooperating to solve a problem. To cooperate effectively, agents require a shared understanding of the improvement goals, the current state of their actions, and how to progress towards the goal state. The working premise is that maintaining a shared representation of the problems, solution options, problem-solving effectiveness and progress towards goals are prerequisites to the necessary cooperation. These factors drive the probability of success and how quickly the goal state can be achieved within the unique constraints of the problem, the networked participants, and external constraints.

HOW THE CQIN MODEL WORKS

Model function is based on the idea of the spread of a virus through a computer network. In our case, it is information that is shared amongst linked neighbours. This information may then be accepted or rejected. At agent level, the behaviour is 'share', 'update' or 'reject' the information. At the system level, the spreading process, once triggered, cycles through five quality improvement phases analogous to a plan-do-study-act cycle, with the cycles proceeding through a planned number of iterations. Each completed iteration incrementally updates progress towards the 'target state'. 'Information' as used here is an abstract notion - it is whatever the relevant message is in relation to the quality improvement phase and may include acting on the information in a coordinated manner (e.g. "we need to cooperate to do this together"). Stop conditions can be set for reaching the target, maximum number of iterations, or falling below a minimum level of network cooperation.

The process commences with detection of an environmental signal of interest by a pre-determined number of the agents. Each agent with this new information then seeks to share the update with their network neighbours. Sharing follows a transmit and receive format, where the transmission must first succeed, and then also be received (or accepted). Each failed share has a chance of rejection and making the receiving agent uncooperative. For each agent interaction to be successful, a probability threshold must be exceeded. The thresholds are determined by the interaction between the variables that apply to each QI phase. A high value for the product of variable interactions results in a correspondingly high chance of sharing/cooperation; conversely, a low value for the product of the variable interaction increases the chances of rejection and reducing network cooperation.

HOW TO USE THIS MODEL

  • Setup
  • If generating a network, set the number of nodes, network connection type, and node degree
  • If loading a network, use the "Load Network" button (refer code comments for more details)
  • Generate or import the network
  • Layout the network
  • Set desired values for the CQIN composite factors (Initial detection, planned iterations, schema share effectiveness, problem solving capability, coevolution constraints, problem space complexity, learning gain, rejection threshold, rejection chance)
  • Set the base improvement signal level, increments and target level
  • Set maximum level of network dropout (non-cooperation)
  • Trigger
  • To complete one iteration, run Go, Go-1, Go-2, Go-3 Go-4, Go-5.Each phase will stop when all agents are updated or resistant, or a stop condition is reached.
  • To run the next iteration, use 'Cycle', then repeat the 'Go' sequence
  • Use behaviour space to run as an automated sequence

QUESTIONS AND ONGOING WORK

  • The threshold formulas are starting points based on the hypothesised relationships between the CQIN factors, quality improvement theory and literature (please refer to the research that accompanies this model). Whilst plausible and practical, they are almost certainly insufficiently defined and ongoing verification with real-world examples will refine them.

  • This version allows resistant actors to rejoin the network each new iteration. This is premised on each new iteration (if done well) being an opportunity to reset and try again, this time with the learning gain from the previous iteration. It is assumed there will be real-world examples where this reset may not be able to applicable.

HOW TO CITE

If you mention this model or the NetLogo software in a publication, please include the citations below.

  • William Wilson (2020-2023) School of Food and Advanced Technology, Massey University, New Zealand

Related rersearch: William Wilson, Scott McLachlan, Kudakwashe Dube, Kathleen Potter & Nihal Jayamaha (2023) Uncertainty, emergence and adaptation: A complex adaptive systems approach to quality improvement, Quality Management Journal, 30:3, 168-186, DOI: 10.1080/10686967.2023.2211287

This model was inspired and adapted from:

The original code for the two underlying ideas in the Stonedahl and Wilensky model:

;; to spread-virus ;; ask turtles with [infected?] ;; [ ask link-neighbors with [not resistant?] ;; [ if random-float 100 < virus-spread-chance ;; [ become-infected ] ] ] ;; end

;; to do-virus-checks ;; ask turtles with [infected? and virus-check-timer = 0] ;; [ ;; if random 100 < recovery-chance ;; [ ;; ifelse random 100 < gain-resistance-chance ;; [ become-resistant ] ;; [ become-susceptible ] ;; ] ;; ] ;; end

The major feature of the original retained is the idea of the schema-check function as the basis for the agents to determine their state. The CQIN model expands the number of agent states, the spreading activity via phases and iterations, input variables, creates new threshold formulas, stop conditions, output reporting and network measures.

Code for the centrality measures and the ability to import an external network graph is sourced from the Netlogo model library - 'Extensions NW General' Examples

Please cite the NetLogo software as:

COPYRIGHT AND LICENSE

Copyright 2008 Uri Wilensky.

CC BY-NC-SA 3.0

This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License. To view a copy of this license, visit https://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.

Commercial licenses are also available. To inquire about commercial licenses, please contact Uri Wilensky at uri@northwestern.edu.

Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

extensions [nw] ;; This is the netlogo network extension called from the code
directed-link-breed [ directed-edges directed-edge ] ;; category of link. Only used for centrality measures
undirected-link-breed [ undirected-edges undirected-edge ] ;; category of link. Only used for centrality measures

Globals ;; global variables (these are the observer-level variables)

[
  Signal
  Iteration-count
 ]


turtles-own ;; Potential agent states
[
  susceptible?        ;; if true, the turtle will accept the new environmental signal and can be updated
  updated?            ;; if true, the turtle has been updated with the new environmental signal
  agreed?             ;; if true, the turtle has a shared problem-solving schema
  implemented?        ;; if true, the turtle has implemented the agreed problem-solving action
  reviewed?           ;; if true, the turtle has reviewed the problem solving action
  adjusted?           ;; if true, the turtle has adjusted the problem solving action
  resistant?          ;; if true, the turtle will resist/reject the new signal and can't be updated
  schema-check-timer  ;; number of ticks since this turtle's last schema-check
  ]

to setup
  clear-all
   if Network-source = "Generate" ;; This 'if' condition prevents accidently generating a network over the top of an imported network
  [create-network]
    set-current-plot "degree distribution"
   set signal (Signal-base + (0))
  set-default-shape turtles "person"
     reset-ticks
end 

to cycle
  ask turtles
 [ set color blue
  set adjusted? false ;;one of two end states from previous cycle
  set susceptible? true
  set resistant? false ;;one of two end states from previous cycle
  become-susceptible
  set schema-check-timer random schema-check-frequency
    ]
   set Iteration-count Iteration-count + 1 ;; tracking 1 iteration
  set-current-plot "Network Status"
    ask n-of Initial-detection-size turtles ;; this sets the initial update size
    [ become-updated ]
  ask links [ set color yellow ]
end 

;; Load network ;;Only used if importing a network - not used if generating the network

to load-network
  nw:set-context turtles links
  nw:load-graphml "CQINTest1.graphml" ;;target graphml file must be in C:\Users\bill\OneDrive\Documents\NetLogo ;; (i.e. must be the same folder as the model)
   [
  set size 3
       set shape "person"
    ;; set color blue
    set updated? false
    set susceptible? true
    set resistant? false
     become-susceptible
    set schema-check-timer random schema-check-frequency
  ]
  reset-ticks
end 

;;Generate networks rather than use imported network

to create-network ;; create the agent network - random or preferential attachment
  if network-type = "random"
 [setup-nodes
    setup-spatially-clustered-network ]
   if network-type = "preferential-attachment" [create-preferential-attachment ]
end 

to setup-nodes
  set-default-shape turtles "person"
    create-turtles number-of-nodes
 [
    ; for visual reasons, we don't put any nodes *too* close to the edges
    setxy (random-xcor * 0.9) (random-ycor * 0.9)
    set size 1.5
    become-susceptible
   set schema-check-timer random schema-check-frequency
 ]
end 

to create-preferential-attachment ;; this is the Barabasi-Albert method of creating a preferential attachment graph
    nw:generate-preferential-attachment turtles links (number-of-nodes) (node-degree) ;; N.B for this  preferential attachment code in Netlogo the node degree represents the MINIMUM degree
  [
    set size 2
    set shape "person"
    set color blue
    set updated? false
    set susceptible? true
    set resistant? false
    become-susceptible
    set schema-check-timer random schema-check-frequency
      ]
end 

to create-random-network ;; generate an Erdos-Renyi random graph
    nw:generate-random turtles links (number-of-nodes) (number-of-nodes * node-degree / 2  * 0.5) [
    set size 1.5
    set shape "person"
    set color blue
    set updated? false
    set susceptible? true
    set resistant? false
  ]
end 

to layout ;; visually set out network
 repeat 20 [
;; layout-spring turtles links 1 22 4
   layout-spring turtles links 0.7 20 3
;; layout-radial turtles links (turtle 0)
;; layout-circle turtles 18
;; update-plots
   display
     ]
end 

to setup-spatially-clustered-network
  let num-links (node-degree * number-of-nodes) / 2  ;; for random network node degree is average
  while [count links < num-links ]
  [
    ask one-of turtles
    [
      let choice (min-one-of (other turtles with [not link-neighbor? myself])
                   [distance myself])
      if choice != nobody [ create-link-with choice ]
    ]
  ]
  ; make the network look a little prettier
  repeat 10
  [
   layout-spring turtles links 0.3 (world-width / (sqrt number-of-nodes)) 1
  ]
end 


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; set initial signal detection;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

to trigger
;; Note that this can be repeated if desired
  set Iteration-count Iteration-count + 1 ;; tracking 1 iteration
  set-current-plot "Network Status"
     ask n-of Initial-detection-size turtles ;; this sets the initial update size
    [ become-updated ]
  ask links [ set color yellow ]
  reset-ticks
end 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Underlying process sequence (The Improvement cycle phases);;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

to go  ;; this is the first phase of the learning classifier cycle, detecting and assigning credit to a new environmental signal
  if count turtles with [resistant?] >= count turtles * max-non-co-operating
    [stop]
  if  all? turtles [updated? or resistant?]
    [stop]
      if Iteration-count = Planned-iterations + 1
  [stop]
     if Signal = Signal-target
  [stop ]
  ask turtles
  [
     set schema-check-timer schema-check-timer + 1
     if schema-check-timer >= schema-check-frequency
       [ set schema-check-timer 0 ]
  ]
  spread-signal
   do-schema-checks
    tick
;;  nw:save-graphml "example.graphml" ;; option saves generated network to graphml format for analysis outside netlogo
end 

to go-2  ;; this is the second phase of the learning classifier cycle, determining and agreeing available problem-solving elements and actions
  if count turtles with [resistant?] >= count turtles * max-non-co-operating
  [stop]
  if all? turtles [agreed? or resistant?]
   [ stop ]
 if Iteration-count = Planned-iterations + 1
   [ stop ]
  if Signal = Signal-target
  [stop ]
  ask turtles
   [
     set schema-check-timer schema-check-timer + 2
    if schema-check-timer >= schema-check-frequency
       [ set schema-check-timer 0 ]
  ]
problem-solve
    do-schema-checks-2
  tick
end 

to go-3  ;; this is the third phase of the learning classifier cycle, implementing problem-solving actions
  if count turtles with [resistant?] >= count turtles * max-non-co-operating
  [stop]
  if all? turtles [implemented? or resistant?]
   [ stop ]
  if Iteration-count = Planned-iterations + 1
  [stop]
   if Signal = Signal-target
  [stop ]
    ask turtles
   [
     set schema-check-timer schema-check-timer + 3
    if schema-check-timer >= schema-check-frequency
       [ set schema-check-timer 0 ]
  ]
 implement
  do-schema-checks-3
  tick
end 

to go-4  ;; fourth phase of the learning classifier cycle, check/assess effectiveness, progress, unintended consequences
   if count turtles with [resistant?] >= count turtles * max-non-co-operating
  [stop]
  if all? turtles [reviewed? or resistant?]
   [ stop ]
 if Iteration-count = Planned-iterations + 1
  [stop]
   if Signal = Signal-target
  [stop ]
  ask turtles
   [
     set schema-check-timer schema-check-timer + 4
    if schema-check-timer >= schema-check-frequency
       [ set schema-check-timer 0 ]
  ]
 review
  do-schema-checks-4
  tick
end 

to go-5  ;; fifth phase of the learning classifier cycle, adjusting (within intended parameters)
 if count turtles with [resistant?] >= count turtles * max-non-co-operating
  [stop]
  if all? turtles [adjusted? or resistant?]
   [ stop ]
  if Iteration-count = Planned-iterations + 1
  [stop]
   if Signal = Signal-target
  [stop ] if Signal = Signal-target
  [stop ]
    ask turtles
   [
     set schema-check-timer schema-check-timer + 5
    if schema-check-timer >= schema-check-frequency
       [ set schema-check-timer 0 ]
  ]
 adjust
  do-schema-checks-5
  tick
end 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; turtle procedures (behaviour and actions);;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

to become-susceptible  ;; turtle procedure
  set susceptible? true
  set updated? false
  set agreed? false
  set implemented? false
  set reviewed? false
  set adjusted? false
  set resistant? false
  set color blue
end 

to become-updated  ;; turtle procedure
  set updated? true
  set susceptible? false
  set agreed? false
  set implemented? false
  set reviewed? false
  set adjusted? false
  set resistant? false
  set color red
end 

to become-agreed ;; turtle procedure
  set agreed? true
  set susceptible? false
  set updated? false
  set implemented? false
  set reviewed? false
  set adjusted? false
  set resistant? false
  set color green
end 

to become-implemented  ;; turtle procedure
  set implemented? true
  set susceptible? false
  set updated? false
  set agreed? false
  set reviewed? false
  set adjusted? false
  set resistant? false
  set color brown
end 

to become-reviewed  ;; turtle procedure
  set reviewed? true
  set susceptible? false
  set updated? false
  set agreed? false
  set implemented? false
  set adjusted? false
  set resistant? false
  set color pink
end 

to become-adjusted  ;; turtle procedure
  set adjusted? true
  set susceptible? false
  set updated? false
  set agreed? false
  set implemented? false
  set reviewed? false
  set resistant? false
  set color orange
end 

to become-resistant  ;; turtle procedure
  set susceptible? false
  set updated? false
  set agreed? false
  set implemented? false
  set reviewed? false
  set adjusted? false
  set resistant? true
  set color gray
  ask my-links [ set color gray - 2 ]
end 

to spread-signal
  ask turtles with [updated?] ; n=initial detection size
    [ask link-neighbors with [susceptible? and not resistant?]
              [ if random-float 100  < (schema-share-effectiveness) * (Learning-gain ^ Iteration-count)
            [ become-updated ] ] ]
end 

to problem-solve
 ask turtles with [updated?]
  ;;ask turtles with [updated? or agreed?] ;;
     [ask link-neighbors with [updated? and not resistant?]
                 [ if random-float 100  < (schema-share-effectiveness) * (learning-gain ^ Iteration-count) * (problem-solving-effectiveness * (Learning-gain ^ Iteration-count)) / problem-space-complexity ;; Option 1: Rationale tbc
            [ become-agreed ] ] ]
end 

to implement
 ask turtles with [agreed?]
;;  ask turtles with [agreed? or implemented?]
      [ask link-neighbors with [agreed? and not resistant?]
                 [ if random-float 100  < (schema-share-effectiveness * (learning-gain ^ Iteration-count)) * ((problem-solving-effectiveness * (Learning-gain ^ Iteration-count)) / problem-space-complexity) * ((100 - coevolution-constraints) / 100) ;; Option 1: Rationale tbc
            [ become-implemented ] ] ]
end 

to review
 ask turtles with [implemented?]
 ;; ask turtles with [implemented? or reviewed?]
      [ask link-neighbors with [implemented? and not resistant?]
           [ if random-float 100  < (schema-share-effectiveness) * (Learning-gain ^ Iteration-count)
                         [ become-reviewed ] ] ]
end 

to adjust
   ask turtles with [reviewed?]
 ;; ask turtles with [reviewed? or adjusted?]
      [ask link-neighbors with [reviewed? and not resistant?]
        [ if random-float 100  < (schema-share-effectiveness) * (learning-gain ^ Iteration-count) * (problem-solving-effectiveness * (Learning-gain ^ Iteration-count)) / problem-space-complexity * (100 - coevolution-constraints) / 100  ;;
             [ become-adjusted ] ] ]
end 

to do-schema-checks
  ask turtles with [updated? and schema-check-timer = 0]
  [
    if random 100 < (rejection-threshold *(0.8 + (problem-space-complexity / 100 ))) ;; Rejection threshold hypothesised as lightly coupled to problem space complexity in this version
    [
    ifelse random 100 < (rejection-chance *(0.8 + (problem-space-complexity / 100 )))
        [become-resistant ]
        [become-updated]
     ]
  ]
end 

to do-schema-checks-2
ask turtles with [updated? and schema-check-timer = 0]
;;  ask turtles with [agreed? or updated? and schema-check-timer = 0]
;; ask turtles with [not resistant? and schema-check-timer = 0]
  [
    if random 100 < (rejection-threshold *(0.8 + (problem-space-complexity / 100 )))
    [
    ifelse random 100 < (rejection-chance *(0.8 + (problem-space-complexity / 100 )))
        [become-resistant]
        [become-agreed]
     ]
  ]
end 

to do-schema-checks-3
   ask turtles with [agreed? and schema-check-timer = 0]
;;  ask turtles with [implemented? or agreed? and schema-check-timer = 0]
 ;;  ask turtles with [not resistant? and schema-check-timer = 0]
  [
    if random 100 < (rejection-threshold *(0.8 + (problem-space-complexity / 100 )))
    [
    ifelse random 100 < (rejection-chance *(0.8 + (problem-space-complexity / 100 )))
        [become-resistant]
        [become-implemented]
     ]
  ]
end 

to do-schema-checks-4
 ask turtles with [implemented? and schema-check-timer = 0]
;;  ask turtles with [reviewed? or implemented? and schema-check-timer = 0]
  ;;  ask turtles with [not resistant? and schema-check-timer = 0]
  [
    if random 100 < (rejection-threshold *(0.8 + (problem-space-complexity / 100 )))
    [
    ifelse random 100 < (rejection-chance *(0.8 + (problem-space-complexity / 100 )))
        [become-resistant]
        [become-reviewed]
     ]
  ]
end 

to do-schema-checks-5
 ask turtles with [reviewed? and schema-check-timer = 0]
;; ask turtles with [adjusted? or reviewed? and schema-check-timer = 0]
  ;;  ask turtles with [not resistant? and schema-check-timer = 0]
  [
    if random 100 < (rejection-threshold *(0.8 + (problem-space-complexity / 100 )))
    [
    ifelse random 100 < (rejection-chance *(0.8 + (problem-space-complexity / 100 )))
        [become-resistant]
        [become-adjusted]
     ]
  ]
  if count turtles with [resistant?] < count turtles * max-non-co-operating
    [set signal (Signal-base + (Signal-increment * Iteration-count))]
show-signal
end 

to show-signal
  output-show Signal
end 

;;;;;;;;;;;;;;;;;;;;;;;;
;; Centrality measures;;
;;;;;;;;;;;;;;;;;;;;;;;;

;; This section of code is from the Netlogo model library - 'Extensions NW General' Examples

to-report get-links-to-use ;; Reports the link set corresponding to the value of the links-to-use combo box
 report ifelse-value links-to-use = "directed"
   [ directed-edges ]
    [ undirected-edges ]
end 

to betweenness
  centrality [ -> nw:betweenness-centrality ]
end 

to eigenvector
  centrality [ -> nw:eigenvector-centrality ]
end 

to closeness
 centrality [ -> nw:closeness-centrality ]
end 

; Takes a centrality measure as a reporter task, runs it for all nodes
; and set labels, sizes and colors of turtles to illustrate result

to centrality [ measure ]
  nw:set-context turtles links
 ask turtles [
    let res (runresult measure) ; run the task for the turtle
    ifelse is-number? res [
      set label precision res 2
     set size res ; this will be normalized later
    ]
   [ ; if the result is not a number, it is because eigenvector returned false (in the case of disconnected graphs
      set label res
     set size 1
   ]
 ]
  normalize-sizes-and-colors
end 

; We want the size of the turtles to reflect their centrality, but different measures
; give different ranges of size, so we normalize the sizes according to the formula
; below. We then use the normalized sizes to pick an appropriate color.

to normalize-sizes-and-colors
  if count turtles > 0 [
    let sizes sort [ size ] of turtles ; initial sizes in increasing order
    let delta last sizes - first sizes ; difference between biggest and smallest
    ifelse delta = 0 [ ; if they are all the same size
      ask turtles [ set size 1 ]
    ]
    [ ; remap the size to a range between 0.5 and 2.5
      ask turtles [ set size ((size - first sizes) / delta) * 2 + 0.5 ]
    ]
    ask turtles [ set color scale-color red size 0 5 ] ; using a higher range max not to get too white...
  ]
end 

;;;;;;;;;;;;;
;; Clusters;;
;;;;;;;;;;;;;

;; This section of code from the Netlogo model library - Extensions NW General Examples

; Colorizes each node according to the community it is part of

to community-detection
  nw:set-context turtles get-links-to-use
  color-clusters nw:louvain-communities
end 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Highlighting and coloring of clusters ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; This section of code from the Netlogo model library - Extensions NW General Examples

to color-clusters [ clusters ]
  ; reset all colors
  ask turtles [ set color gray ]
  ask links [ set color gray - 2 ]
  let n length clusters
  ; Generate a unique hue for each cluster
  let hues n-values n [ i -> (360 * i / n) ]

  ; loop through the clusters and colors zipped together
  (foreach clusters hues [ [cluster hue] ->
    ask cluster [ ; for each node in the cluster
                  ; give the node the color of its cluster
      set color hsb hue 100 100
      ; Color links contained in the cluster slightly darker than the cluster color
      ask my-links with [ member? other-end cluster ] [ set color hsb hue 100 75 ]
    ]
  ])
end 

;; Bill Wilson Complex Quality Improvement Network (CQIN) Massey University Research Project 2020-2023

; Reference Model: 'Virus on a network'
; Copyright 2008 Uri Wilensky.
; See Info tab for full copyright and license.

There is only one version of this model, created over 1 year ago by Bill Wilson.

Attached files

File Type Description Last updated
Complex Quality Improvement Network.png preview Preview for 'Complex Quality Improvement Network' over 1 year ago, by Bill Wilson Download

This model does not have any ancestors.

This model does not have any descendants.