Income-Spatial dynamics of informal neighborhoods

Income-Spatial dynamics of informal neighborhoods preview image

This model is seeking new collaborators — would you please help?

1 collaborator

Default-person Aashish Panwar (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by everyone
Model was written in NetLogo 6.1.1 • Viewed 29 times • Downloaded 0 times • Run 0 times
Download the 'Income-Spatial dynamics of informal neighborhoods' modelDownload this modelEmbed this model

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


Comments and Questions

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

Click to Run Model

breed [roads road]
breed [households household]

households-own [ income ]

globals [
  formal-patches          ;; agentset of green patches representing the formal sites
  informal-patches        ;; agentset of blue patches representing the informal site
  mainways                ;; agentset for roads surronding informal-patches
]

to setup
  ca
  set-default-shape households "house"
  set-default-shape roads "square 2"


  set formal-patches patches with [pxcor < 3]
  ask formal-patches [ set pcolor green ]

  set informal-patches patches with [pxcor > 3 and pycor > 0 and pxcor < 36 and pycor < 36]
  ask informal-patches [ set pcolor blue ]

  set mainways patches with [pcolor = black]
                                      ;; creating formal patches and informal patches and boundary roads patches

  create-roads 138 [move-to-empty-one-of mainways]
  create-roads 5 [setxy 4 random 36]
  create-roads 5 [setxy 35 random 36]
  create-roads 5 [setxy random 36 1]
  create-roads 5 [setxy random 36 35]
  ask roads [if pcolor = green [die]]
  ask roads [set color grey]
                                       ;; creating roads agents as single line

  create-households initial-population [ set color brown
    move-to-empty-one-of informal-patches
    set income random 30 + 15
  ]                                  ;; creating intial houses as slider
                                     ;; creating inital income for households

  display-labels
  reset-ticks
end 

to move-to-empty-one-of [locations]                  ;; turtle procedure
  move-to one-of locations
  while [any? other turtles-here] [
    move-to one-of locations
  ]
end 

to go


  ask households [
    set income income + income-growth + 2 - random 5   ;distributing growth in range of numbers
  ]                                                   ;; distribute income in household as per income gowth

  ask households [
    if income > rich-person [
      die]
  ]                                                    ;; remove rich households from model


  ask households [if count roads-on neighbors4 >= 1 [set color pink]]



  ifelse (111 - count turtles-on formal-patches) > (count households with [income > income-threshold and color = 35])  [
    ask households [if color = brown [
      if income > income-threshold  [
        set color pink
        move-to-empty-one-of formal-patches]
  ]]]
  [ask n-of (111 - count turtles-on formal-patches) (households with [income > income-threshold and color = 35])
      [
        set color pink
          move-to-empty-one-of formal-patches]]   ; move household to formal patch acc to income threshold


  ask roads [if pcolor = blue [
    if count turtles-on neighbors4 < 4 [
      if count roads-on neighbors4 <= 3 [
        hatch-roads 1 [
          move-to-empty-one-of neighbors4
          set color grey
        ]
      ] ] ] ]


  ask roads [
    if pcolor = blue [
      if (count roads-on neighbors > 5) [die]
    ]
  ]


 ifelse in-rate < (1120 - count turtles-on informal-patches) [             ;; in-rate is less than vacant place
    create-households in-rate [
    set color brown
    move-to-empty-one-of informal-patches
    set income random 15 + 15                                                ;; add household from in rate
  ]] [ create-households (1120 - count turtles-on informal-patches) [
    set color brown
    move-to-empty-one-of informal-patches
    set income random 15 + 15                                               ;; add household from in rate
  ]]

  ask households [if count roads-on neighbors4 >= 1 [set color pink]]
  ask households [if pcolor = blue [
    if count roads-on neighbors4 = 0 [set color brown]]]

  if count households with [color = 35] = 0 [stop]


  display-labels

  tick
end 

to display-labels
  ask households [ set label "" ]
  if show-income [
    ask households [ set label round income ]
  ]
end 

There is only one version of this model, created about 1 month ago by Aashish Panwar.

Attached files

File Type Description Last updated
Income-Spatial dynamics of informal neighborhoods.png preview Preview for 'Income-Spatial dynamics of informal neighborhoods' about 1 month ago, by Aashish Panwar Download

This model does not have any ancestors.

This model does not have any descendants.