amalmodel 11

No preview image

1 collaborator

Default-person amal zaher (Author)

Tags

(This model has yet to be categorized with any tags)
Model group uhaifa-modeling-11 | Visible to everyone | Changeable by everyone
Model was written in NetLogo 4.1.2 • Viewed 193 times • Downloaded 18 times • Run 0 times
Download the 'amalmodel 11' 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?

Agentsets in NetLogo are always in random order. This code example demonstrates that visually. It also shows how to make the turtles execute in a particular order if you want.

NETLOGO FEATURES

SORT and SORT-BY are used to specify ordering.

View updates are set to "continuous", so when you slow the model down far enough you can see the turtles moving one at a time.

Comments and Questions

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

Click to Run Model

to setup
  clear-all
  crt-tr
end 

to crt-tr
 create-turtles floor (world-width / 3) [
    set xcor 1 + who * 3  ;; space out the turtles in order by who number
    set size 3
    set heading 180
    set label who
 ]
end 

to go-random
  ask turtles
    [ forward 2 ]
  tick
end 

There is only one version of this model, created over 13 years ago by amal zaher.

Attached files

No files

This model does not have any ancestors.

This model does not have any descendants.