run_city_justice module

Crimninal justice network dynamics modeling.

This example uses 7 modules:
  • Community
  • Arrested
  • Adjudication
  • Jail
  • Prison
  • Probation
  • Parole

and a population balance model is used to follow the offenders population groups between modules.

To run this case using MPI you should compute the number of processes as follows:

nprocs = 7 + 1 cortix

then issue the MPI run command as follows (replace nprocs with a number):

mpiexec -n nprocs run_justice.py

To run this case with the Python multiprocessing library, just run this file at the command line as

run_city_justice.py
run_city_justice.main()[source]

Cortix run file for a criminal justice network.

run_city_justice.n_groups

int – Number of population groups being followed. This must be the same for all modules.

run_city_justice.end_time

float – End of the flow time in SI unit.

run_city_justice.time_step

float – Size of the time step between port communications in SI unit.

run_city_justice.use_mpi

bool – If set to True use MPI otherwise use Python multiprocessing.