Network Exchange Theory

Network Exchange Theory preview image

1 collaborator

Vennbr_small_copy John Margeson (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by everyone
Model was written in NetLogo 5.3 • Viewed 503 times • Downloaded 38 times • Run 0 times
Download the 'Network Exchange Theory' modelDownload this modelEmbed this model

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


Info tab cannot be displayed because of an encoding error

Comments and Questions

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

Click to Run Model

globals [

  ]

turtles-own [
  outreach            ;;Communicability
  receptability       ;;Willingness to be communicated with
  bargain-threshold   ;;How much an agent is willing to offer
  min-profit          ;;Minimum profit agent will accept from negociation
  bank                ;;How much the agent has to bargain with
  offer               ;;What an agent offers
  raise-increment     ;;How much an agent will put in a bargain
  agreed?             ;;Whether the agent agreed to the bargain
  ]

to setup-network
  clear-turtles
  ask patches [set pcolor white]
  create-turtles num-nodes  ;;How many players
  repeat 10 + sqrt num-nodes [layout-spring turtles links 0.2 5 2]  ;;Network layout
  ask turtles [
        set bank random-float 1000 ;; sum [bank] of turtles
    set label who
    set label-color black
    set agreed? false
    set shape "circle"
    set color red
    ]
  calculate-pcomms  ;;Starting probability of agent's willingness to reach out
  calculate-bargain-threshold  ;;Agents decide how much they will risk in bargaining
  layout
  output-show median [bank] of turtles  ;;Shows median bank accounts in interface for possible use in median voter algoithm
  reset-ticks
end 

to cycle-go  ;;Loops the model a preset number of 'cycles'
  repeat cycles [
    setup-network
    loop-model
  ]
end 

to loop-model  ;;Procedure combining bargaining sub-procedures
  loop [
    bargain
    layout
    resize-turtles
    fold
   tick
  if count turtles = 0 [stop]
     ]
end 

to resize-turtles  ;;Visual representation of agent's 'power' in the network
  ask turtles [
    set size sqrt count link-neighbors + (round bank / 1000)  ;;Placeholder for distributing resources across agents
  ]
end 

to calculate-pcomms  ;;Agents decide to reach out
  ask turtles [
    set outreach random-float 1  ;;Placeholder for algorithm where turtles decide how 'social' they will be
    set receptability random-float 1  ;;Placeholder for algorithm where turtles decide how receptive to other turtles they will be
    if outreach <= pcomms [create-link-with max-one-of other turtles [receptability]]  ;;Based on pcomms; agents link with other agents with high communicability
    ]
end 

to calculate-bargain-threshold  ;;Agents decide how much they will risk in bargaining
  ask turtles [
    let risk-percentage random-float 1  ;;How risk averse the agent is; the higher the number the greater the risk tolerance
    set bargain-threshold (bank * risk-percentage) ;;Percentage of bank an agent is likely to risk in bargaining
    ]
end 

to bargain
   ask turtles with [any? link-neighbors = true] [
    set min-profit (bank / .25)  ;;Minimum profit an agent will accept in negociation
    set offer (bargain-threshold / 2)  ;;Set amount an agent is going to offer other agents
    set raise-increment ((offer / 2) + ticks)  ;;Set increment to raise slowly
    ifelse agreed? = false [ ifelse max [offer] of link-neighbors < min-profit  ;;Agents compare their neighbors offer to their own min-profit acceptable and either agree, ...
      [ask link-neighbors [set offer offer + raise-increment set bank bank - offer]] [set agreed? true] ]  ;;...or ask their neighbor to raise until agent agrees...
                           [ die ]  ;;...then are removed from the network
  ]
end 

to fold  ;;Remove a player if they...
  ask turtles [ if size < 1 [die]  ;;...go broke, ...
                if agreed? = true [die]  ;;...agreed to a bargain, or...
                if link-neighbors = nobody [die]  ;;...are not in the network.
  ]
end 

to layout
 ask turtles [ layout-spring turtles links 0.2 5 1 ]
  display
end 

to-report count-within-cycles  ;;Placeholder for a procedure where variables within the cycles are recorded
  report median [outreach] of turtles
end 

There is only one version of this model, created almost 9 years ago by John Margeson.

Attached files

File Type Description Last updated
Network Exchange Theory.png preview Preview for 'Network Exchange Theory' almost 9 years ago, by John Margeson Download

This model does not have any ancestors.

This model does not have any descendants.