Complex Marriage Stability Problem

Complex Marriage Stability Problem preview image

1 collaborator

Default-person Talha Wani (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 168 times • Downloaded 10 times • Run 0 times
Download the 'Complex Marriage Stability Problem' 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 [males male]
breed [females female]
turtles-own [attract standards married]
links-own [dif age]
patches-own [couple]
globals [breakup]

to setup
  clear-all
  set breakup 0
   create-males c [set color blue
    set shape "person"
  setxy random-pxcor random-pycor
  set attract random-normal attmean 2 set standards random-normal stmean 1]
  create-females c [set color pink
    set shape "person"
  setxy random-pxcor random-pycor
 set attract random-normal attmean 2 set standards random-normal stmean 1]



  reset-ticks
end 

to go
; ask males with [ count my-links > 1] [face one-of in-link-neighbors]
;ask females with [ count my-links > 1] [face one-of in-link-neighbors]

  ask turtles [
    forward 0.001
]

repeat c [
    breakups]

  ask males  [if (count my-links = 0) [create-links-with females  in-radius rad with [attract >= [standards] of myself and [attract] of myself >= standards] [set age 0]]]


  ask turtles [ if (count my-links > 0)[face one-of in-link-neighbors]]

  ask turtles [ if (count my-links > 0)[set color green]]
  ask males [ if (count my-links = 0)[set color blue]]
  ask females [ if (count my-links = 0)[set color pink]]

  linkage
  ask links [ set label age ]

  tick
end 

to breakups
; ask links [ set current abs ([attract] of end1) ]

;   ask males  [if (count my-links = 1) [create-links-with females in-radius rad with [attract > [current] of myself
 ;   and [attract] of myself >= standards and [attract]] [set age 0]]]



ask links [ set dif abs ([attract] of end1 - [attract] of end2) ]

ask turtles [ if (count my-links > 1)
    [ let p min-one-of my-links [dif]
      if [age] of p <= 10
      [ask p [die]]]]

  ask turtles [ if (count my-links > 1)
    [ let p min-one-of my-links [dif]
      if [age] of p > 10
      [ask p [die] set breakup breakup + 1 ]]]
end 

to linkage
  ask links [set age age + 1]
end 

to targetmove
  let target in-link-neighbors
  if (count my-links < 1 ) [face target]
end 

to stud
   create-males 1 [set color yellow
    set shape "face happy"
  setxy random-pxcor random-pycor
  set attract 100 set standards 0]
end 

to labels
  ask turtles [ set label attract
  ]
  ask links [ set label age ]
end 

to hidelabels
  ask turtles [ set label ""
  ]
end 

There are 3 versions of this model.

Uploaded by When Description Download
Talha Wani over 3 years ago Fixed breakups Download this version
Talha Wani over 3 years ago Kills more than one link at a time, hence counts breakups more effectively Download this version
Talha Wani almost 4 years ago Initial upload Download this version

Attached files

File Type Description Last updated
Complex Marriage Stability Problem.png preview Preview for 'Complex Marriage Stability Problem' almost 4 years ago, by Talha Wani Download
DATA.dta data Data from Behavior Space experiment to assess radius's effect on breakups over 3 years ago, by Talha Wani Download
NEW DATA WORKING 2.dta data New Data from Behavior Space experiment to assess radius's effect on breakups over 3 years ago, by Talha Wani Download

This model does not have any ancestors.

This model does not have any descendants.