mona 1,2,3,4,5,11

No preview image

1 collaborator

Default-person mona adawi (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by everyone
Model was written in NetLogo 4.1.2 • Viewed 258 times • Downloaded 26 times • Run 2 times
Download the 'mona 1,2,3,4,5,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?

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

to setup
  clear-all
  create-turtles 100
   ask turtle 3 [ pendown]
  ask turtles [ setxy random-xcor random-ycor ]
  create-turtles floor (world-width / 3) [
    set xcor 1 + who * 3  ;; space out the turtles in order by who number
    set color color - 2   ;; darker
    set size 1 + random-float 3
    set heading 0
    set label who
  ]
end 

to setup-patches
ask patches
  [ ifelse pxcor > 0
      [ set pcolor blue ]
      [ set pcolor yellow ] ]
;; the left half of the world turns yellow and
;; the right half turns blue
end 

to go-random
  ask turtles
    [ fd 1 ]
  tick
end 

to go
 ;; move-patches
  move-turtles
end 

;;to move-patches
  ;;ask patches [
    
    ;;  ]
;;end
;;show sum [count turtles-here] of neighbors
  ;; prints the total number of turtles on the eight
  ;; patches around this turtle or patch
;;show count turtles-on neighbors
  ;; a shorter way to say the same thing
;;ask neighbors4 [ set pcolor red ]
  ;; turns the four neighboring patches red

to move-turtles
  ask turtles [
    right random 360
    forward 1
  ]
end 
globals [halfedge]

to setup-corner
  ca                                              ;; clear everything
  ask patches[
    ;; if patches are between (0,0) to (0,edge)...
    if ( pxcor = 0 and pycor >= 0 and pycor <= edge )
      [set pcolor red]                                 ;; ... draws left edge in red
    ;; if patches are between (edge,0) to (edge,edge)...
    if ( pxcor = edge and pycor >= 0 and pycor <= edge )
      [set pcolor red]                                 ;; ... draws right edge in red
    ;; if patches are between (0,0) to (edge,0)...
    if ( pycor = 0 and pxcor >= 0 and pxcor <= edge )
      [set pcolor red]                                 ;; ... draws bottom edge in red
    ;; if patches are between (0,edge) to (edge,edge)...
    if ( pycor = edge and pxcor >= 0 and pxcor <= edge )
      [set pcolor red]                                 ;; ... draws upper edge in red
    ]
end 


;; setup procedure for case where point (0,0) is in the center of Box

to setup-center
  ca                                              ;; clear everything
  ;; set halfedge as edge divided by two. in case edge is an odd number,
  ;; halfedge get the integer value of the division.
  set halfedge int (edge / 2)
  ask patches[
    ;; if patches are between (-halfedge,-halfedge) to (-halfedge,halfedge)...
    if (pxcor = (- halfedge) and pycor >= (- halfedge) and pycor <= (0 + halfedge) )
      [set pcolor blue]                                ;; ... draws left edge in blue
    ;; if patches are between (halfedge,-halfedge) to (halfedge,halfedge)...
    if ( pxcor = (0 + halfedge) and pycor >= (- halfedge) and pycor <= (0 + halfedge) )
      [set pcolor blue]                                ;; ... draws right edge in blue
    ;; if patches are between (-halfedge,-halfedge) to (halfedge,-halfedge)...
    if ( pycor = (- halfedge) and pxcor >= (- halfedge) and pxcor <= (0 + halfedge) )
      [set pcolor blue]                                ;; ... draws bottom edge in blue
    ;; if patches are between (-halfedge,halfedge) to (halfedge,halfedge)...
    if ( pycor = (0 + halfedge) and pxcor >= (- halfedge) and pxcor <= (0 + halfedge) )
      [set pcolor blue]                                ;; ... draws upper edge in blue
    ]
end 





There is only one version of this model, created about 14 years ago by mona adawi.

Attached files

No files

This model does not have any ancestors.

This model does not have any descendants.