voterid

No preview image

1 collaborator

Txstgeo Russell Weaver (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by everyone
Model was written in NetLogo 5.1.0 • Viewed 251 times • Downloaded 30 times • Run 0 times
Download the 'voterid' modelDownload this modelEmbed this model

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


Info tab cannot be displayed because of an encoding error

Comments and Questions

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

Click to Run Model

;;Title: A Simple Model of the Voting Market with and without Voter ID
;;Author: R. Weaver, Department of Geography, Texas State University
;;Email: rcweaver@txstate.edu
;;Twitter: @russell_weaver
;;Date: 07 October 2014

globals [
  maxdistpoll      ;;max distance from a voter to the nearest polling station
  mindistpoll      ;;min distance from a voter to the nearest polling station
  maxdistid        ;;max distance from a voter to the nearest ID provider
  turnout-no-id    ;;aggregate voter turnout under null conditions (no id)
  turnout-voter-id ;;aggregate voter turnout under changed conditions (id)
]

turtles-own [
  distpoll       ;;distance between a given voter and the nearest polling station
  distid         ;;distance between a given voter and the nearest ID provider
  cost-noid      ;;cost of voting under null conditions (no id)
  cost-id        ;;cost of voting under new conditions (id)
  benefit-noid   ;;analogous to cost-noid
  benefit-id     ;;analogous to cost-id
  veblen?        ;;binary: is veblen type
  votenoid?      ;;binary: does vote under null conditions
  voteid?        ;;binary: does vote under changed conditions
]

patches-own [resource-type]

breed [ voterids voterid]
breed [ noids noid]

;;configure hypothetical polity

to setup
  clear-all
  set-default-shape turtles "default"
  if (voters-with-id + voters-without-id) > count patches
    [ user-message (word "This space only has room for " count patches " voters.")
      stop ]

  ;; create voter types on random patches
  create-voterids voters-with-id [
    set color red
  ]
  create-noids voters-without-id [
    set color blue
  ]
  ask turtles [
    setxy random-pxcor random-pycor
  ]
  ask n-of (voters-with-id * (percent-veblen / 100)) turtles with [color = red]
   [set veblen? 1]
  ask turtles [if veblen? = 1 [set color green]]
  ask n-of num-polling-stations patches
    [set resource-type "polling"]
  ask n-of num-id-stations patches
    [set resource-type "id"]
  ask patches [update-patches]
  reset-ticks
end 

to go
  update-variables
end 

to update-patches
  ifelse (resource-type = "polling")
    [ set pcolor yellow ]
  [ ifelse (resource-type = "id")
      [ set pcolor white ]
      [ set pcolor black ]
  ]
end 

to update-variables
  update-turtles
  update-globals
end 

;;refer to Table 1

to update-turtles
  ask turtles [
    set distpoll distance (min-one-of patches with [resource-type = "polling"] [distance myself]) 
    set distid distance (min-one-of patches with [resource-type = "id"] [distance myself])
  ]
  set maxdistpoll max [distpoll] of turtles
  set mindistpoll min [distpoll] of turtles
  set maxdistid max [distid] of turtles with [color = blue]
  ask turtles [  
    set cost-noid (distpoll - mindistpoll) / (maxdistpoll - mindistpoll)
    set benefit-noid random-float 1
    ifelse (color = blue)
    [set cost-id cost-noid + id-cost-all + (2 * (distid / maxdistid))]
    [set cost-id cost-noid + id-cost-all]
    ifelse veblen? = 1
    [set benefit-id benefit-noid + (veblen-multiplier * id-cost-all)]
    [set benefit-id benefit-noid]
    set voteid? benefit-id > cost-id
    set votenoid? benefit-noid > cost-noid
  ]
end 

to update-globals
  let votersnoid count turtles with [votenoid?]
  let votersid count turtles with [voteid?]
  set turnout-no-id (votersnoid / (voters-with-id + voters-without-id)) * 100
  set turnout-voter-id (votersid / (voters-with-id + voters-without-id)) * 100
end 

to iterate
  ca
  repeat n [
    setup
    go
    output-print turnout-no-id
    output-print turnout-voter-id
  ]
end 

There is only one version of this model, created about 10 years ago by Russell Weaver.

Attached files

No files

This model does not have any ancestors.

This model does not have any descendants.