ChrisDayal-SexualAssaultUni-project-EECS-372

ChrisDayal-SexualAssaultUni-project-EECS-372 preview image

1 collaborator

Default-person Christian Dayal (Author)

Tags

(This model has yet to be categorized with any tags)
Model group MAM-2016 | Visible to everyone | Changeable by everyone
Model was written in NetLogo 6.0-M5 • Viewed 279 times • Downloaded 19 times • Run 0 times
Download the 'ChrisDayal-SexualAssaultUni-project-EECS-372' 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

extensions [table]

globals [bar school park frat assault-place-count]

turtles-own [
  dict
education? ;; education personality variable that is able to be manipulated.
sex ;; to designate male and female interactions and procedures.
year ;; variable to give turtle respective weight depending on what year of school they are in. the younger a turtle, the more susceptible as a perpetrator and victim.
year-weight ;; 1,2,3,4 correlating with the years of undergraduate for purpose as mentioned above
personality ;; implemented to give turtle university student like personality in terms of preferences and where to interact.
personality-var ;; allows the turtle to move intelligbly whilst being random due to the desire to fulfill a personal longing.
;;For example, if a turtle who likes to go to the fraternity a lot does not for a while, he will want to go and fulfill his desire. Enhances randomness and simulates student mindsets.
]

links-own [
 no-of-interactions-girl
 ;;implemented to track how many times female turtles interact with male turtles due to statistics iterating females have interacted with
 ;;their victim almsot 80% of the time. Again, implemented to mirror real like reference pattern. Create the interactions to be as accurate as possible.
]

to setup
  clear-all ;; clear all existing agents
  set bar patches with [pxcor < 0.5 and pycor > -1] ;; initializes patch-sets that are referred to throughout. Creating them like this makes it a lot easier to reference the enviornments.
  ask bar [set pcolor yellow + 2.5]                 ;; Cleans up the code from below.
  set frat patches with [pxcor > 0.5 and pycor > 0]
  ask frat [set pcolor black]
  set school patches with [pxcor <= 0.5 and pycor < 0]
  ask school [set pcolor white]
  set park patches with [pxcor > 0.5 and pycor < 0]
  ask park [set pcolor green + 2.5]
  set assault-place-count []


  ;ask patches
  ;[;;if pxcor <= 0.5 and pycor < 0 [set pcolor white] ;;old code that was orignally used to demarcate the world.
    ;if pxcor > 0.5 and pycor < 0 [set pcolor green + 2.5]
    ;if pxcor < 0.5 and pycor > -1 [set pcolor yellow + 2.5]]

  set-default-shape turtles "person" ;; defines the turtle shape that will be used. People to represent people.

  create-turtles men  [ ;; slider variable men that adjusts how many men turtles are made
    set sex 0 ;;sets their sex variable to 0 so that they can be distinguished from women.
    setxy random-xcor random-ycor ;;distributes the turtles throughout the world randomly
    set size 1 ;;visually pleasing.
    ]

  create-turtles women  [ ;; slider variable women that adjusts how many women are made
    set sex 1 ;;sets their sex variable to 1 so that they can be distinguished from men.
    setxy random-xcor random-ycor ;;distributes the turtles throughout the world randomly
    set size 1 ;;visually pleasing.
    ]

  ask turtles [
    set dict table:make ;;dictionary that is used to store and keep track of turtle who numbers and subsequent multiple interactons amongst male and female turtles.
    set personality one-of [1 2 3 4] ;;randomly assigns turtles to one of 4 personality types for intelligence and personality. Iterates real life desires and phenomeona.
    ifelse sex = 0 ;; used to color the agents appropiately depending on what year of studies they are in, Light pink to dark pink for females starting from freshman all the way to seniors.
        [set year one-of [1 2 3 4]] ;; light blue to dark blue for all male turtles indicating freshmen all the way to seniors.
        [set year one-of [5 6 7 8]]


      ]
  color-year ;;colors the turtles accordingly.
  vulnerability ;;sets year-weights to respective turtles. takes into account the statistic that younger people are more prone to be perpetrators or victims.
reset-ticks ;; resets counter
end 

to go ;; go function for interaction
  ;ask links [hide-link]
  ask turtles [
    move ;; moves turtles somewhat randomly whilst taking into account their personality.
   ; hostileinteraction] ;; intitial funciton that was used for turtle interaction
  interactfrat ;;interaction procedure unique to relatively statistical replicate prevailing traits and characteristics of sexual assault in a fraternity enviornment.
  interactbar ;;interaction procedure unique to relatively statistical replicate prevailing traits and characteristics of sexual assault in a bar like enviornment.
  interactpark ;;interaction procedure unique to relatively statistical replicate prevailing traits and characteristics of sexual assault in a park enviornment.
  interactschool ;;interaction procedure unique to relatively statistical replicate prevailing traits and characteristics of sexual assault in school enviornment.
  personality-need
  ];; variable that dictates a turtle moving to its personality niche depending on their threshold value.

  tick;;occurs per tick.
end 

to color-year ;; used this list to color the turtles based on their gender and years.
  ask turtles[
     if sex = 0 [
       if year = 1 [set color 108] ;; light blue (freshman male)
       if year = 2 [set color 107] ;; sophomore male
       if year = 3 [set color 106] ;; junior male
       if year = 4 [set color 105]];; dark blue (senior male)
     if sex = 1 [
       if year = 5 [set color 138] ;;light pink (freshman female)
       if year = 6 [set color 137] ;;sophomore female
       if year = 7 [set color 136] ;;junior female
       if year = 8 [set color 135]]];;dark pink (senior female)
end 

to personalityinitial ;;sets the original personality variable to 100. This fluctuates and dictates a turtles movement as turtles move away and from their niche.
  ask turtles [ set personality-var 100 ]
end 

to personality-need ;;creates 4 personality types depending on the 4 enviornment types in the world. Each personality has a preference to an enviornment.
  if personality = 1 [
    ifelse patch-here = one-of bar
      [set personality-var personality-var + 20]
      [set personality-var personality-var - .05]]
  if personality = 2 [
    ifelse patch-here = one-of frat
      [set personality-var personality-var + 20]
      [set personality-var personality-var - .05]]
  if personality = 3 [
    ifelse patch-here = one-of school
      [set personality-var personality-var + 20]
      [set personality-var personality-var - .05]]
  if personality = 4 [
    ifelse patch-here = one-of park
      [set personality-var personality-var + 20]
      [set personality-var personality-var - .05]]
end 

to vulnerability ;; playing with weight variables here for status in undergrad and possibility of being / perpotrating sexual assault.
  ask turtles[
      if sex = 0 [
       if year = 1 [set year-weight 4] ;; statistically based off of the fact that latter years decrease significantly in perpetrating or becoming a victim of assault (4 times less)
       if year = 2 [set year-weight 4]
       if year = 3 [set year-weight 1]
       if year = 4 [set year-weight .8]]
      if sex = 1 [
       if year = 5 [set year-weight 4]
       if year = 6 [set year-weight 4]
       if year = 7 [set year-weight 1]
       if year = 8 [set year-weight .8]]]
end 

to move ;; moves function for turtles. if the value is less than the defined threshold, the turtle will move towards its desired patch based on its personality type.
        ;; Allows for intelligence and personality types in agents and behavior.
    if personality = 1 [
      ifelse personality-var <= 0
       [face one-of bar
         fd 1]
         [rt random 90
           lt random 90
           fd 1]]
    if personality = 2 [
      ifelse personality-var <= 0
      [face one-of frat
        fd 1]
      [rt random 90
        lt random 90
        fd 1]]
    if personality = 3 [
      ifelse personality-var <= 0
      [face one-of school
         fd 1]
      [rt random 90
        lt random 90
        fd 1]]
    if personality = 4 [
      ifelse personality-var <= 0
      [face one-of park
         fd 1]
      [rt random 90
        lt random 90
        fd 1]]
end 

to assault
  set color red
  set assault-place-count fput pcolor assault-place-count
end 

to interactfrat ;; probability that sexual assault occurs based on relative weights derived from
                ;;statistically supported research that indicates prevailing sexual assault causes/characteristics in this enviornment as defined in paper.
    if pcolor = black [
      if sex = 0 [
        let target one-of turtles in-radius 3
          ifelse (table:has-key? dict ([who] of target)) [ ;; turtle checks in dictionary to see if the who number of the target within the radius is present, the number of target interactions is represented by the
            ;; notargetinteractions variable. it then takes the past interaction of the turtles and factors it into the probabililty of a female turtle being assaulted.
            let notargetinteractions (table:get dict ([who] of target))
            ask target [
              let awareness education?
              if (sex = 1 and random-float 10 < ((.4 * notargetinteractions) + (hostility * .4) + (alcohol * .8) - (empathy * .2) - (awareness * 2 * .45) + (year-weight)))
          [assault]]
            table:put dict [who] of target table:get dict [who] of target + 1]
          [table:put dict [who] of target 1
            ]]]
end 

to interactbar ;; probability that sexual assault occurs based on relative weights derived from
                ;;statistically supported research that indicates prevailing sexual assault causes/characteristics in this enviornment as defined in paper.
    if pcolor = yellow + 2.5 [
      if sex = 0 [
        let target one-of turtles in-radius 3
          ifelse (table:has-key? dict ([who] of target)) [ ;; turtle checks in dictionary to see if the who number of the target within the radius is present, the number of target interactions is represented by the
            ;; notargetinteractions variable. it then takes the past interaction of the turtles and factors it into the probabililty of a female turtle being assaulted.
            let notargetinteractions (table:get dict ([who] of target))
            ask target [
              let awareness education?
              if (sex = 1 and random-float 10 < ((.20 * notargetinteractions) + (hostility * .2) + (alcohol * .8) - (empathy * .2) - (awareness * 2 * .45) + (year-weight)))
          [assault]]
            table:put dict [who] of target table:get dict [who] of target + 1]
          [table:put dict [who] of target 1
            ]]]
end 

to interactpark ;; probability that sexual assault occurs based on relative weights derived from
                ;;statistically supported research that indicates prevailing sexual assault causes/characteristics in this enviornment as defined in paper.
    if pcolor = green + 2.5 [
      if sex = 0 [
        let target one-of turtles in-radius 3
          ifelse (table:has-key? dict ([who] of target)) [ ;; turtle checks in dictionary to see if the who number of the target within the radius is present, the number of target interactions is represented by the
            ;; notargetinteractions variable. it then takes the past interaction of the turtles and factors it into the probabililty of a female turtle being assaulted.
            let notargetinteractions (table:get dict ([who] of target))
            ask target [
              let awareness education?
              if (sex = 1 and random-float 10 < ((.15 * notargetinteractions) + (hostility * .1) + (alcohol * .2) - (empathy * .4) - (awareness * 2 * .45) + (year-weight)))
          [assault]]
            table:put dict [who] of target table:get dict [who] of target + 1]
          [table:put dict [who] of target 1
            ]]]
end 

to interactschool ;; probability that sexual assault occurs based on relative weights derived from
                ;;statistically supported research that indicates prevailing sexual assault causes/characteristics in this enviornment as defined in paper.
    if pcolor = white [
      if sex = 0 [
        let target one-of turtles in-radius 3
          ifelse (table:has-key? dict ([who] of target)) [ ;; turtle checks in dictionary to see if the who number of the target within the radius is present, the number of target interactions is represented by the
            ;; notargetinteractions variable. it then takes the past interaction of the turtles and factors it into the probabililty of a female turtle being assaulted.
            let notargetinteractions (table:get dict ([who] of target))
            ask target [
              let awareness education?
              if (sex = 1 and random-float 10 < ((.15 * notargetinteractions) + (hostility * .1) + (alcohol * 0) - (empathy * .4) - (awareness * 2 * .45) + (year-weight)))
          [assault]]
            table:put dict [who] of target table:get dict [who] of target + 1]
          [table:put dict [who] of target 1
            ]]]
end 







;;;;;;;;
;old functions that were used to compute probability without taking into account past interactions. Just so you can see the mental process I engaged in as I developed the model and
;shaped it to mirror real life phenomena.
;;;;;;;;

;to interactbar ;; probability that sexual assault occurs based on relative weights derived from
                ;;statistically supported research that indicates prevailing sexual assault causes/characteristics in this enviornment as defined in paper.
 ;   if pcolor = yellow + 2.5 [
  ;    if sex = 0 [
   ;     let target one-of turtles in-radius 3
    ;    ask target [ let awareness education?
     ;     if (sex = 1 and random-float 10 < ((hostility * .002) + (alcohol * .008) - (empathy * .002) - (awareness * 2 * .40) + (year-weight)))
      ;    [assault]]]]
;end


;to interactpark ;; probability that sexual assault occurs based on relative weights derived from
 ;               ;;statistically supported research that indicates prevailing sexual assault causes/characteristics in this enviornment as defined in paper.
  ;  if pcolor = green + 2.5 [
   ;   if sex = 0 [
    ;    let target one-of turtles in-radius 3
     ;   ask target [ let awareness education?
      ;    if (sex = 1 and random-float 10 < ((hostility * .001) + (alcohol * .002) - (empathy * .004) - (awareness * 2 * .40) + (year-weight)))
    ;      [assault]]]]
;end



;to interactschool ;; probability that sexual assault occurs based on relative weights derived from
 ;                 ;;statistically supported research that indicates prevailing sexual assault causes/characteristics in this enviornment as defined in paper.
  ;  if pcolor = white [
   ;   if sex = 0 [
    ;    let target one-of turtles in-radius 3
     ;   ask target [ let awareness education?
      ;    if (sex = 1 and random-float 10 < ((hostility * .001) + (alcohol * 0) - (empathy * .004) - (awareness * 2 * .40) + (year-weight)))
       ;   [assault]]]]
;end




;to hostileinteraction ;; probability that sexual assault is ar result in male hosility,alcohol intoxication, empathy, and awarness. ORIGINAL procedure that was developed and improved.
 ;if sex = 0 [
  ;let target one-of turtles in-radius 3
   ;ask target [ let awareness education?
    ;if (sex = 1 and random-float 10 < ((hostility * .001) + (alcohol * .008) - (empathy * .002) - (awareness * 2 * .30)))
     ;[set color red]]]
;end


;; This was the original function that I was working on implementing to track past turtle interaction and ultimately use to influence future interactions of other turtles given the
;; role of multiple prior interactions between female victims of sexual assault to males..

to go-and-count1
  ask turtles [
    if sex = 1 [
      fd 1
      if any? other turtles-here with [sex != 1] [
        ask one-of other turtles-here with [sex != 1] [
          ask link who [who] of myself [set no-of-interactions-girl no-of-interactions-girl + 1]]
          ]]]
end 

There is only one version of this model, created over 8 years ago by Christian Dayal.

Attached files

File Type Description Last updated
ChrisDayal-SexualAssaultUni-project-EECS-372.png preview Preview for 'ChrisDayal-SexualAssaultUni-project-EECS-372' over 8 years ago, by Christian Dayal Download

This model does not have any ancestors.

This model does not have any descendants.