RismanNetworkEffects

No preview image

1 collaborator

Default-person Alexander Risman (Author)

Tags

(This model has yet to be categorized with any tags)
Model group EECS 372-Spring 2011 | Visible to everyone | Changeable by everyone
Model was written in NetLogo 4.1.2 • Viewed 180 times • Downloaded 26 times • Run 3 times
Download the 'RismanNetworkEffects' modelDownload this modelEmbed this model

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


WHAT IS IT?

This section could give a general understanding of what the model is trying to show or explain.

HOW IT WORKS

This section could explain what rules the agents use to create the overall behavior of the model.

HOW TO USE IT

This section could explain how to use the model, including a description of each of the items in the interface tab.

THINGS TO NOTICE

This section could give some ideas of things for the user to notice while running the model.

THINGS TO TRY

This section could give some ideas of things for the user to try to do (move sliders, switches, etc.) with the model.

EXTENDING THE MODEL

This section could give some ideas of things to add or change in the procedures tab to make the model more complicated, detailed, accurate, etc.

NETLOGO FEATURES

This section could point out any especially interesting or unusual features of NetLogo that the model makes use of, particularly in the Procedures tab. It might also point out places where workarounds were needed because of missing features.

RELATED MODELS

This section could give the names of models in the NetLogo Models Library or elsewhere which are of related interest.

CREDITS AND REFERENCES

This section could contain a reference to the model's URL on the web if it has one, as well as any other necessary credits or references.

Comments and Questions

Click to Run Model

undirected-link-breed [phonelines phoneline]
undirected-link-breed [friendships friendship]
breed [towers tower]
breed [persons person]
persons-own [
  money
  utility
  friends]

to setup
  clear-all
  create-persons number-of-people
   ask persons [
     move-to one-of patches
     set shape "person"
     set color red
     set money initial-money
     set utility money ]
   create-towers 1
   ask towers
   [set color blue
     set shape "circle"]
   recolor-phonelines
end 

to setup-friends
  ask persons [
    set friends count friendship-neighbors
    ifelse friends < number-of-friends 
    [create-friendship-with one-of other persons]
    [ifelse friends > number-of-friends
      [ask one-of my-friendships  [die] ]
      [stop]]]
  ask friendships [hide-link]
end 

to setup-phones
  ask persons [
    if random-float 100 < initial-percentwith-phones
    [create-phoneline-with one-of towers] 
    ]
  recolor-phonelines
end 

to go
  update-utility 
  ask persons [
   
    consider-phone
  ]
  recolor-phonelines
  if mingling [mingle]
end  

to update-utility
  ask persons
  [
    ifelse count phoneline-neighbors != 0
    [set utility money + count friendship-neighbors with [phoneline-neighbors != 0] ]
    [set utility money]
  ]
end 

to consider-phone
  if count friendship-neighbors with [phoneline-neighbors != 0] != 0
  [if money > cost-of-phone
  [if count friendship-neighbors with [phoneline-neighbors != 0] > cost-of-phone
    [create-phoneline-with one-of towers set money money - cost-of-phone]
  ]
  ]
 update-utility
end 

to recolor-phonelines
  ask phonelines [set color orange]
end 

to mingle
  ask persons [rt random-float 360 fd 1
    let friend-prospect one-of other persons-here
    if random-float 100 < sociability [if friend-prospect != nobody [create-friendship-with friend-prospect]
  ]]
end 

to super-setup
  setup
  ifelse count persons with [count friendship-neighbors != number-of-friends] > 0
  [loop [setup-friends]]
  [stop]
  setup-phones
end 
     

There are 3 versions of this model.

Uploaded by When Description Download
Alexander Risman almost 13 years ago No description provided Download this version
Alexander Risman almost 13 years ago No description provided Download this version
Alexander Risman almost 13 years ago Initial upload Download this version

Attached files

No files

This model does not have any ancestors.

This model does not have any descendants.