letters

No preview image

1 collaborator

Default-person Abdullah yousaf (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by the author
Model was written in NetLogo 6.0.2 • Viewed 224 times • Downloaded 34 times • Run 0 times
Download the 'letters' modelDownload this modelEmbed this model

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


Overview

  1. Purpose: In this model to show the name in the patches. From created turtle move on this given predefined name.
  2. Entities: There are turtles that are in the format of letter in this model. turtles are randomly generated.
  3. Process: To make a model of letters. first make the defeiend name abdullah yousaf in the patches. then randlomly create turtles that are in the form of letter that move randomly. and these turtles move on the the predefined name. Design Concept 1: Basic principles: The principal assumption of our model is that cognitive agent- based computing methodology is much effective for simulation and modeling of name letters
  4. Emergence: This feature display information regarding the output of the model that is to be modeled i-e the results expected from the model. The significant outputs are the computation of letter name turtles move on the pre defined name. 3 Adaptation: this feature demonstrate the decision making power against the variable letters. The model takes decisions based on well- defined constraints. While make a decision, two rules are applied by the model. To move randomly and on the given name format
  5. Observation: The data regarding number of turltes tarp or not trap., and movement of these turtles data are collected at each step when the simulation is running. Details 1: Initialization: The proposed model is implemented using an agent based modeling tool NetLogo. Initially be sure to model different turtles.make the name on the patches.
  6. Input data: The number of turtles created firstly provided as input to the model.
  7. Sub-models: The parameters of the model and their corresponding values are i) number of runs 20

Comments and Questions

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

Click to Run Model

globals
[
  text
  left-edge
  right-edge
]
breed[abdullah abdullahize]

turtles-own
[
  word-length
  num-word
  leader
  new-line?
]

to setup
  clear-all
  setup-tabels
  set text (word "Abdullah "

                "Abdullah yousaf "
                "Abdullah yousaf")
  create-abdullah 30
  [
    set word-length 0
    set leader nobody
    set new-line? false
    scatter
  ]
  setupname
  reset-ticks
end 

to scatter
  setxy random-xcor random-ycor
end 

to setup-tabels
  ask patches [ set pcolor  red]
end 

to setupname
  let remaining-text text
  let word-count 1

  let prev-letter nobody

  ask turtles
  [
    set label first remaining-text
    set leader prev-letter
    set num-word word-count
    if label = " "
    [
      set word-count word-count + 2
      set num-word num-word + 1
    ]
    set remaining-text but-first remaining-text
    set prev-letter self
  ]

  let index 1
  repeat word-count
  [
    let turtles-in-word turtles with [num-word = index]
    ask turtles-in-word
      [ set word-length count turtles-in-word ]
    set index index + 1
  ]
end 

to go
  ask abdullah
  [
    set new-line? false
    pick-heading
    ifelse trap?
      [ move-to patch-here ]
      [ fd 0.5 ]
  ]
  tick
end 

to pick-heading
  ifelse leader = nobody

    [ face patch left-edge max-pycor ]
    [
      let p [patch-at 1 0] of leader
      if p != nobody
      [ face p ]
      if right-edge - left-edge < word-length
      [

        if [pxcor] of leader >= right-edge
        [
          set new-line? true
          face patch left-edge new-line-pycor

        ]
      ]

  ]
end 

to-report new-line-pycor
  ifelse abs ([pycor] of leader - 2) > max-pycor
    [ report [pycor] of leader ]
    [ report [pycor] of leader - 2 ]
end 

to-report trap?
  if leader = nobody
    [ report (pxcor = left-edge) and (pycor = max-pycor) ]
  ifelse new-line?
    [ report (pxcor = left-edge) and (pycor = new-line-pycor) ]

    [ report patch-at -1 0 = [patch-here] of leader ]
end 

There is only one version of this model, created about 7 years ago by Abdullah yousaf.

Attached files

No files

This model does not have any ancestors.

This model does not have any descendants.