dense network tester

No preview image

1 collaborator

Uri_dolphin3 Uri Wilensky (Author)

Tags

(This model has yet to be categorized with any tags)
Model group CCL | Visible to everyone | Changeable by group members (CCL)
Model was written in NetLogo 4.1pre1 • Viewed 275 times • Downloaded 24 times • Run 1 time
Download the 'dense network tester' 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

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

Click to Run Model

globals [ foo result]

to setup
  clear-turtles
  crt number-turtles
  layout-circle turtles 16
  ask turtles
  [
    if who != 0 and random 100 < link-probability
    [ create-link-with turtle 0]
  ]
end 

to benchmark
  random-seed 337
  reset-timer
  set link-probability 100
  setup
  repeat 5000 [ set foo benchmark-link ]
  set result timer
end 

to full-test
  set link-probability 0
  repeat 100
  [
    setup
    test
    set link-probability link-probability + 1
  ]
end 

to test
  set-current-plot "O"
  set-current-plot-pen "link"
  let dude one-of turtles
  reset-timer
  repeat 5000 [ set foo benchmark-link ]
  plotxy link-probability timer
  set-current-plot-pen "link-neighbor?"
  reset-timer
  repeat 5000 [ set foo benchmark-link-neighbor? dude ]
  plotxy link-probability timer
  set-current-plot-pen "link-neighbors"
  reset-timer
  repeat 5000 [ set foo benchmark-link-neighbors ]
  plotxy link-probability timer
  set-current-plot-pen "link-with"
  reset-timer
  repeat 5000 [ set foo benchmark-link-with dude ]
  plotxy link-probability timer
  set-current-plot-pen "my-links"
  reset-timer
  repeat 5000 [ set foo benchmark-my-links ]
  plotxy link-probability timer
end 

to-report benchmark-link
  report link 0 (1 + random (number-turtles - 1))
end 

to-report benchmark-link-neighbor? [dude]
  report [link-neighbor? dude] of turtle 0
end 

to-report benchmark-link-neighbors
  report [link-neighbors] of turtle 0
end 

to-report benchmark-link-with [dude]
  report [link-with dude] of turtle 0
end 

to-report benchmark-my-links
  report [my-links] of turtle 0
end 

There are 3 versions of this model.

Uploaded by When Description Download
Uri Wilensky almost 14 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky almost 14 years ago dense network tester Download this version
Uri Wilensky almost 14 years ago dense network tester Download this version

Attached files

No files

This model does not have any ancestors.

This model does not have any descendants.