Social Change Hamilton 1851-1861

Social Change Hamilton 1851-1861 preview image

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

1 collaborator

Mfriesen_head_shot_4 Milton Friesen (Author)



"historical social process is being explored"

Tagged by Milton Friesen 26 days ago

social dynamics 

Tagged by Milton Friesen 26 days ago

social inequality 

Tagged by Milton Friesen 26 days ago

social transience 

Tagged by Milton Friesen 21 days ago

Visible to everyone | Changeable by everyone
Model was written in NetLogo 5.0.3 • Viewed 84 times • Downloaded 3 times • Run 0 times
Download the 'Social Change Hamilton 1851-1861' modelDownload this modelEmbed this model

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


This model attempts to simulate a socio-economic structure observed by Michael B. Katz in his 1975 book, "The People of Hamilton, Canada West: Family and Class in a Mid-Nineteenth-Century City". In the book, he discusses how assessment rolls, city directories and other documents from 1851-1861 reflect two key dynamics: inequality and transience. The wealthy, established class of 1%-10% of the population stays largely the same, including the social institutions and structures of the city. The lower class, however, has high turn-over, low economic growth, and low property ownership. As with the original "Sugarscape" models and the secondary "Wealth Distribution" model, this adaptation attempts to set initial conditions that begin with disparity and, amid the dynamics of life, death, and economic activity, leave the economic gap largely unchanged. This is expressed in a near constant Gini index with high lower class turnover, including possible movement with in the lower economic order but very little entry into the upper class.


I've been adapting the model but need help with the following:

  1. It seems the split between the classes should be more clear with a probability function of some kind determining how likely it is that upper-class would move down and lower-class would move up.

  2. The split between classes should somehow record stability - ie. wealthy stay put, stay wealthy, while the lower class is more turbulent internally and in terms of movement in and out of the system. Katz research suggess as many as 2/3 of the population of 14,000 may have experienced moving in out betweeen 1851-1861. That transience takes the form of being in the assessment rolls at one point and then not thereafter.

  3. It would be useful to add a social relation function visible in the form of ties so that the wealthy would have strong, bonding ties with few bridging ties to the lower class. The lower class would have small numbers of close ties (as in a family arrangement of some kind - transience was not a solitary male type but included whole families), fewer ties within the lower class, and many fewer with the upper class.

  4. The wealthy would have a much better economic patch (or patches) to begin with and those patches would remain so. Perhaps a patch that is economically high remains fixed proportional to its value and has the potential to disappear or degrade in proportion with its lower value.

  5. The image of the wealthy is something like a cluster of stable pillars of concrete that the lower class flows between and around. That doesn't quite get it because the water and concrete are two mutually exclusive materials whereas the wealthy and lower class are the same entities but with very different ranges of possibility. The feeling may be as exclusive as water flowing around concrete but the dynamic needs to be different than a straight flow model.


What follows is an adaptation of the original "Wealth Distribution" model. Money is used instead of grain. Each patch has some economic value in terms of money and an ability to generate more. Citizens get money from their patch but also use some up to live. The more money they keep, the wealthier a citizen gets.


The citizens are mobile and can move around. They are trying to earn money and makes a decision about where to go based on the best opportunities they can see. They keep doing this until they die of old age [ ] or they run out of money and die of depravation [ ]. What they leave behind is an offspring. CHANGE IS NEEDED SO THAT WEALTH AND CHARACTERISTICS ARE PASSED TO THE OFFSPRING WITH PERHAPS A SMALL RANDOM VARIATION. IT IS IMPORTANT THAT LACK OR SURPLUS IS PASSED ALONG.

To observe the equity (or the inequity) of the distribution of wealth, a graphical tool called the Lorenz curve is utilized. The population is ranked by their wealth (as a percentage) and the percentage of the population that wealth represents (e.g. 30% of the wealth is owned by 50% of the population). The scales on the axes range from 0% to 100%.

A 45 degree angle means 30% or people have 30% of wealth, 90% have 90% of the wealth, and so on. In an extreme case, one person (1%) could have all the money (100%) in which case the curve would look like an "L" but backwards. This is expressed in the Gini coefficient by a "0" if wealth is equally distributed and "1" if one person has all the wealth - the bigger the value, the more unequal it is.

(0) Communist idealism <---------------> Hyper wealthy (1)


The NUM-PEOPLE slider controls size of initial population and limits can be set in code. The LIFE-EXPECTANCY-MAX slider is the oldest a citizen can be (number of ticks). The LIFE-EXPECTANCY-MIN slider is the earliest point at which a citizen can die (fewest ticks). The PERCENT-MOST-MONEY slider says how many citizens initially can have maximum wealth. The MONEY-GROWTH-INTERVAL is a probability for how often economic opportunity occurs on a patch. The NUM-MONEY-GROWN slider determines how big new economic opportunities are. The MAX-OPPORTUNITY slider determines how good far beyond their own patch a citizen can see. The SPENDING-MAX is the maximum amount a citizen can spend in one time interval.


Examine how the landscape of color is created --- note the use of the scale-color reporter. Each patch is given a value, and scale-color reports a color for each patch that is scaled according to its value.

Note the use of lists in drawing the Lorenz Curve and computing the Gini index.


This original model is based on a model described in Epstein, J. & Axtell R. (1996). Growing Artificial Societies: Social Science from the Bottom Up. Washington, DC: Brookings Institution Press.

For an explanation of Pareto's Law, see

For more on the calculation of the Gini index see:

  • Deltas, George (2003). The Small-Sample Bias of the Gini Coefficient: Results and Implications for Empirical Research. The Review of Economics and Statistics, February 2003, 85(1): 226-234.

In particular, note that if one is calculating the Gini index of a sample for the purpose of estimating the value for a larger population, a small correction factor to the method used here may be needed for small samples.


If you mention this model in a publication, we ask that you include these citations for the model itself and for the NetLogo software:


This version of the model: Non-commercial. Copyright Milton Friesen,, August 2017


Original copyright 1998 Uri Wilensky.


This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License. To view a copy of this license, visit or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.

Commercial licenses are also available. To inquire about commercial licenses, please contact Uri Wilensky at

The "Wealth Distribution" original model was created as part of the project: CONNECTED MATHEMATICS: MAKING SENSE OF COMPLEX PHENOMENA THROUGH BUILDING OBJECT-BASED PARALLEL MODELS (OBPML). The project gratefully acknowledges the support of the National Science Foundation (Applications of Advanced Technologies Program) -- grant numbers RED #9552950 and REC #9632612.

The original model was converted to NetLogo as part of the projects: PARTICIPATORY SIMULATIONS: NETWORK-BASED DESIGN FOR SYSTEMS LEARNING IN CLASSROOMS and/or INTEGRATED SIMULATION AND MODELING ENVIRONMENT. The project gratefully acknowledges the support of the National Science Foundation (REPP & ROLE programs) -- grant numbers REC #9814682 and REC-0126227. Converted from StarLogoT to NetLogo, 2001.

Comments and Questions

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

Click to Run Model

  max-money    ; maximum amount any patch can hold

  money-here      ; the current amount of money on this patch
  max-money-here  ; the maximum amount of money this patch can hold

  age              ; how old a citizen is
  wealth           ; the amount of money a citizen has
  life-expectancy  ; maximum age that a citizen can reach
  spending         ; how much money a citizen spends
  opportunity      ; how many patches ahead a citizen can see


to setup
  ;; set global variables to appropriate values
  set max-money 100 ;; this can be tuned
  ;; call other procedures to set up various parts of the world

;; set up the initial amounts of money each patch has

to setup-patches
  ;; give some patches the highest amount of money possible --
  ;; these patches are the "most money" where economic benefit is greatest
  ask patches
    [ set max-money-here 0
      if (random-float 100.0) <= percent-most-money
        [ set max-money-here max-money
          set money-here max-money-here ] ]
  ;; spread that money around the window a little and put a little back
  ;; into the patches that are the "most money" found above
  repeat 5
    [ ask patches with [max-money-here != 0]
        [ set money-here max-money-here ]
      diffuse money-here 0.25 ]
  repeat 10
    [ diffuse money-here 0.25 ]          ;; spread the money around some more
  ask patches
    [ set money-here floor money-here    ;; round money levels to whole numbers
      set max-money-here money-here      ;; initial money level is also maximum
      recolor-patch ]

to recolor-patch  ;; patch procedure -- use color to indicate money level
  set pcolor scale-color orange money-here 0 max-money

;; set up the initial values for the citizen variables

to setup-turtles
  set-default-shape turtles "dot"
  crt num-people
    [ move-to one-of patches  ;; put citizens on patch centers
      set size 1.5  ;; easier to see
      set age random life-expectancy ]

to set-initial-turtles-vars
  set age 0
  face one-of neighbors4
  set life-expectancy life-expectancy-min +
                        random (life-expectancy-max - life-expectancy-min + 1)
  set spending 1 + random spending-max
  set wealth spending + random 50 
  set opportunity 1 + random max-opportunity

;; Set the class of the citizens -- if a citizen has less than a third
;; the wealth of the richest citizen, color it brown. If over three quarters, color it blue
;; Otherwise, leave the 'middle class' as green

to recolor-turtles
  let max-wealth max [wealth] of turtles
  ask turtles
     [ ifelse (wealth <= max-wealth / 3)
        [ set color brown ]
      [ ifelse (wealth <= max-wealth * 3 / 4)
        [set color green]
        [ set color white ]]]


to go
  ask turtles
    [ turn-towards-money ]  ;; choose direction holding most money within the citizen's opportunity
  ask turtles
    [ move-eat-age-die ]

  ;; grow money every money-growth-interval clock ticks
  if ticks mod money-growth-interval = 0
    [ ask patches [ grow-money ] ]


;; determine the direction which is most profitable for each citizen in 
;; their environment. The 'opportunity index' represents the entrepreneurial 
;; vision and/or how much the structure of their world limits or gives 
;; economic opporunity to them

to turn-towards-money  ;; citizen procedure
  set heading 0
  let best-direction 0
  let best-amount money-ahead
  set heading 90
  if (money-ahead > best-amount)
    [ set best-direction 90
      set best-amount money-ahead ]
  set heading 180
  if (money-ahead > best-amount)
    [ set best-direction 180
      set best-amount money-ahead ]
  set heading 270
  if (money-ahead > best-amount)
    [ set best-direction 270
      set best-amount money-ahead ]
  set heading best-direction

to-report money-ahead  ;; citizens procedure
  let total 0
  let how-far 1
  repeat opportunity
    [ set total total + [money-here] of patch-ahead how-far
      set how-far how-far + 1 ]
  report total

to grow-money  ;; patch procedure
  ;; if a patch does not have it's maximum amount of money, add
  ;; num-money-grown to its money amount
  if (money-here < max-money-here)
    [ set money-here money-here + num-money-grown
      ;; if the new amount of money on a patch is over its maximum
      ;; capacity, set it to its maximum
      if (money-here > max-money-here)
        [ set money-here max-money-here ]
      recolor-patch ]

;; each citizens accumulates the money on its patch.  if there are multiple
;; citizens on a patch, divide the money evenly among the citizens

to harvest
  ; have citizens accumulate money before any other citizen sets the patch to 0
  ask turtles
    [ set wealth floor (wealth + (money-here / (count turtles-here))) ]
  ;; now that the money has been accumulated, have the citizens make the
  ;; patches which they are on have no money
  ask turtles
    [ set money-here 0
      recolor-patch ]

to move-eat-age-die  ;; citizen procedure
  fd 1
  ;; consume some money according to spending
  set wealth (wealth - spending)
  ;; grow older
  set age (age + 1)
  ;; check for death conditions: if you have no money or
  ;; you're older than the life expectancy or if some random factor
  ;; holds, then you "die" and are "reborn" (in fact, your variables
  ;; are just reset to new random values)
  if (wealth < 0) or (age >= life-expectancy)
    [ set-initial-turtles-vars ]

;; this procedure recomputes the value of gini-index-reserve
;; and the points in lorenz-points for the Lorenz and Gini-Index plots

to update-lorenz-and-gini
  let sorted-wealths sort [wealth] of turtles
  let total-wealth sum sorted-wealths
  let wealth-sum-so-far 0
  let index 0
  set gini-index-reserve 0
  set lorenz-points []

  ;; now actually plot the Lorenz curve -- along the way, we also
  ;; calculate the Gini index.
  ;; (see the Info tab for a description of the curve and measure)
  repeat num-people [
    set wealth-sum-so-far (wealth-sum-so-far + item index sorted-wealths)
    set lorenz-points lput ((wealth-sum-so-far / total-wealth) * 100) lorenz-points
    set index (index + 1)
    set gini-index-reserve
    gini-index-reserve +
    (index / num-people) -
    (wealth-sum-so-far / total-wealth)

; Copyright 1998 Uri Wilensky.
; See Info tab for full copyright and license.

There are 2 versions of this model.

Uploaded by When Description Download
Milton Friesen 21 days ago Changed to a Wealth Distribution approach Download this version
Milton Friesen 26 days ago Initial upload Download this version

Attached files

File Type Description Last updated
Social Change Hamilton 1851-1861.png preview Cover of Katz - Hamilton 1851 26 days ago, by Milton Friesen Download

This model does not have any ancestors.

This model does not have any descendants.