Presentación del caso

Para este ejercicio se utilizó el caso 6.7 del libro Small System Dynamics Models for Big Issues de Erik Pruyt, el cual se titula Unintended Family Planning Benefits.

El caso se muestra a continuación:

Let’s focus on families with multiple problems only, and let’s assume that individuals born in families with multiple problems are indeed trapped, but that they do not necessarily resort to crime. Model an aging chain of kids, youngsters, adults and retirees. Initially, there are 1 million kids, 1 million youngsters, 3 million adults, and 750000 retirees within these families with multiple problems. Suppose for the sake of simplicity that only retirees die, on average after an average time as retiree of 15 years, i.e. deaths equals retirees divided by average time as retiree. Similarly, adults flow after an average time as adult of 40 years from adults to retirees, youngsters after an average time as youngster of 12 years from youngsters to adults, and kids after an average time as kid of 12 years from kids to youngsters. Both adults and youngsters give birth: the birth inflow is thus the sum of the adults times the annual fertility rate of adults of 3 percent per adult per year and the youngsters times the annual fertility rate of youngsters of 0.3% per youngster per year.

Suppose 6 million crimes are committed annually by others, that is, by criminals that are not part of families with multiple problems. Apart from these crimes by others, crimes are committed by criminal kids at a rate of 2 criminal acts per criminal kid per year, by criminal youngsters at a rate of 4 criminal acts per criminal youngster per year, by criminal adults at a rate of 12 criminal acts per criminal adult per year, and by criminal retirees at a rate of 4 criminal acts per criminal retiree per year. Suppose that, in these families with multiple problems, the percentage of kids with criminal behavior amounts to 5%, the percentage of youngsters with criminal behavior amounts to 50%, the percentage of adults with criminal behavior amounts to 60%, and the percentage of retirees with criminal behavior amounts to 10%.

Diagrama causal

Primeramente, se realizó el diagrama causal, el cual se muestra a continuación:

En este diagrama, se observan 2 ciclos de reforzamiento relacionados a la natalidad en el sistema, sin embargo, no se identificaron ciclos de balanceo. Esto indica que la dinámica del sistema será de crecimiento exponencial, tanto para la población como para los crimenes.

Diagrama de flujo

En segundo lugar, se realizó el diagrama de flujo, el cual se muestra a continuación:

En este caso, se identifica que el sistema tiene un flujo principal de entrada (que son los nacimientos o births) y un flujo principal de salida (que son las muertes o deaths). Esto, como se mencionó en el apartado previo, está en linea con el comportamiento esperado de crecimiento exponencial.

Modelado del caso a 50 años

library(deSolve)
## Warning: package 'deSolve' was built under R version 4.2.3
criminal.system <- function(t, state, parameters) {
  with(as.list(c(state,parameters)), {
    #Endogenous auxiliary variables
    criminal.kids <- kids * 5/100
    criminal.youngsters <- kids * 50/100
    criminal.adults <- kids * 60/100
    criminal.retirees <- kids * 10/100
    
    crimActs.kid <- 2 * criminal.kids
    crimActs.adult <- 4 * criminal.youngsters
    crimActs.youngster <- 12 * criminal.adults
    crimActs.retiree <- 4 * criminal.retirees
    crimActs.other <- 6000000
    
    crimes <- crimActs.kid + crimActs.youngster + crimActs.adult + crimActs.retiree + crimActs.other 
      
    #Flow variables
    births <- adults*annual.fertility.adults + youngsters*annual.fertility.youngsters 
    average.time.kid = 12
    average.time.youngster = 12
    average.time.adult = 40
    average.time.retiree = 15
    
    #State (stock) variables (d)
    dkids <- births
    dyoungsters <- kids/average.time.kid
    dadults <- youngsters/average.time.youngster
    dretirees <- adults/average.time.adult
    ddeaths <- retirees/average.time.retiree
    
    
    list(c(dkids,
           dyoungsters,
           dadults,
           dretirees,
           ddeaths
           ))
  })
}

parameters<-c( 
  annual.fertility.adults = 3/100,
  annual.fertility.youngsters = 0.3/100
  )

InitialConditions <- c(
  kids = 1000000,
  youngsters = 1000000,
  adults = 3000000,
  retirees = 75000,
  deaths = 0
  )

times <- seq(0,  #initial time
             50, #end time
             1 ) #time step


intg.method<-c("rk4")

out <- ode(y = InitialConditions,
           times = times,
           func = criminal.system,
           parms = parameters,
           method =intg.method )

plot(out,
     col=c("blue"))

Referencias

Pruyt, E. (2013). Small system dynamics models for big issues: Triple jump towards real-world complexity. Delft: TU Delft Library.