test

test preview image

1 collaborator

Default-person Nicole lim (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by everyone
Model was written in NetLogo 6.0 • Viewed 201 times • Downloaded 23 times • Run 0 times
Download the 'test' modelDownload this modelEmbed this model

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


ACKNOWLEDGMENT

This model is from Chapter Eight of the book "Introduction to Agent-Based Modeling: Modeling Natural, Social and Engineered Complex Systems with NetLogo", by Uri Wilensky & William Rand.

  • Wilensky, U. & Rand, W. (2015). Introduction to Agent-Based Modeling: Modeling Natural, Social and Engineered Complex Systems with NetLogo. Cambridge, MA. MIT Press.

This model is in the IABM Textbook folder of the NetLogo Models Library. The model, as well as any updates to the model, can also be found on the textbook website: http://www.intro-to-abm.com/.

WHAT IS IT?

This model is a simple experiment that allows researchers to examine how to best seed a network to maximize the adoption rate of a product by using viral marketing.

Its purpose is to allow you to explore the relationship between different centrality measures, and different network types, and see if the interactions between them make for faster or slower spread of the product.

HOW IT WORKS

When the model is set up, 500 turtles are created and connected in a network of the type selected (preferential attachment or a random network). A number of turtles are seeded with the product at time 0. At each tick, each turtle has a small chance of adopting the product on their own (1%), and a larger chance of adopting the product if any of their friends have adopted the product (0.5 * the ratio of neighbors who have adopted to the number of all neighbors).

The model stops when the whole market is saturated.

HOW TO USE IT

Start by selecting a type of network. Then choose how many turtles are initially seeded and by what centrality measure these turtles are selected.

When you click SETUP, the network will be generated, and when you click GO, nodes will start infecting their neighbors.

THINGS TO TRY

Try to set up different kinds of networks, and select the initially seeded turtles by different centrality measures. Are there particular measures that might result in a faster spread in particular types of networks, but not in others? Why do you think that is?

EXTENDING THE MODEL

The model was inspired by the Local Viral Marketing Problem (Stonedahl, Rand & Wilensky 2010) of an adoption network. Currently the model simply measures how fast a virus spreads on a network, but does not take into account how fast it is spread to each individual node which is one way to calculate the net present value (NPV) of a strategy. If the model were to fully implement the NPV of a model, the value of each infected node would depend on at what time it was infected.

Further, the model currently allows for only two different network types and four centrality measures. These could be extended as well.

Finally, the model only allows users to choose one centrality measure by which to initially infect turtles. Ideally it would be possible to set a number of infected turtles, and choose proportions of centrality measures to infect these turtles.

CREDITS AND REFERENCES

Stonedahl, Forrest, William Rand, and Uri Wilensky (2010), "Evolving Viral Marketing Strategies," Genetic and Evolutionary Computation Conference (GECCO), July 7-11, Portland, OR, USA

Rand, William M. and Rust, Roland T., Agent-Based Modeling in Marketing: Guidelines for Rigor (June 10, 2011). International Journal of Research in Marketing, 2011; Robert H. Smith School Research Paper No. RHS 06-132. Available at SSRN: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=1818543

This model is a simplified model based on another model by Arthur Hjorth (arthur.hjorth@u.northwestern.edu).

HOW TO CITE

This model is part of the textbook, “Introduction to Agent-Based Modeling: Modeling Natural, Social and Engineered Complex Systems with NetLogo.”

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

For the model itself:

Please cite the NetLogo software as:

Please cite the textbook as:

  • Wilensky, U. & Rand, W. (2015). Introduction to Agent-Based Modeling: Modeling Natural, Social and Engineered Complex Systems with NetLogo. Cambridge, MA. MIT Press.

COPYRIGHT AND LICENSE

Copyright 2012 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]

turtles-own [
  adopted?    ;; whether or not the agent has adopted the product
]

to setup
  clear-all
  create-network
  seed
  reset-ticks
end 

;; seed the population with users who have already been given the product
;;  you can either seed randomly or use betweenness centrality

to seed
  if seeding-method = "random" [
    ask n-of budget turtles [
      set adopted? true
      update-color
    ]
  ]
  if seeding-method = "betweenness" [
    ask max-n-of budget turtles [ nw:betweenness-centrality ] [
      set adopted? true
      update-color
    ]
  ]
end 

;; create the social network

to create-network
  if network-type = "random" [ create-random-network ]
  if network-type = "preferential-attachment" [ create-preferential-attachment ]
end 

;; the Barabasi-Albert method of creating a PA graph

to create-preferential-attachment
  nw:generate-preferential-attachment turtles links 500 [
    set size 2
    set shape "circle"
    set color blue
    set adopted? false
  ]
end 

;; generate an Erdos-Renyi random graph

to create-random-network
  nw:generate-random turtles links 500 0.004 [
    set shape "circle"
    set color blue
    set size 2
    set adopted? false
  ]
end 

;; simple loop just check to see if a turtle hasn't adopted then decide if they should adopt

to go
  if all? turtles [ adopted? ] [ stop ]
  ask turtles with [ not adopted? ] [ decide-to-adopt ]
  ask turtles [ update-color ]
  tick
end 

;; the decision rule to adopt which is based on the Bass model of diffusion

to decide-to-adopt
  ifelse random-float 1.0 < 0.01 [
    set adopted? true
  ] [
    if any? link-neighbors [
      let neighbors-adoption count link-neighbors with [ adopted? ] / count link-neighbors
      if random-float 1.0 < 0.5 * neighbors-adoption [
        set adopted? true
      ]
    ]
  ]
end 

;;
;; utility procedures
;;

to update-color
  if adopted? [ set color red ]
end 

to layout
  layout-spring turtles links 1 14 1.5
  display
end 


; Copyright 2012 Uri Wilensky.
; See Info tab for full copyright and license.

There is only one version of this model, created almost 8 years ago by Nicole lim.

Attached files

File Type Description Last updated
test.png preview Preview for 'test' almost 8 years ago, by Nicole lim Download

This model does not have any ancestors.

This model does not have any descendants.