Economic inequality and Islamic charity

Economic inequality and Islamic charity preview image

4 collaborators

Default-person Hossein Sabzian (Author)
Adel Azar (Advisor)
Alireza Aliahmadi (Advisor)
Majid Mirzaee (Domain expert)

Tags

economy 

Tagged by Hossein Sabzian almost 6 years ago

Visible to everyone | Changeable by everyone
Model was written in NetLogo 6.0.1 • Viewed 440 times • Downloaded 28 times • Run 0 times
Download the 'Economic inequality and Islamic charity' modelDownload this modelEmbed this model

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


WHAT IS IT?

As an extension of the simple economy model of Uri Wilensky (2011), This model has been developed to show and explain following issues:

1: How does the economic inequaliy emerge in an economic system?

2: How does sadaqah as an voulntary charity in Islam help reducing this emergent inequality?

3: As entities that receive sadagah from benefactors and allocate it to the needy, how can charity organizations affect the alleviation of the emergent economic inequality?

In this model, each human agent has a tendency towards giving one unit of money to another one (at a random manner), each agent does it until its money gets finished. According to statsitistical mechanics, the interaction of agents gradually widens the distance between five lower decils (bottom 50%) and higest decile (top 10%). When the total amount of top 10% becomes more than or equal to that of bottom 50%, this causes the economic system to go to a critical stage. In such a situation, if there are some charity organizations, they come to scene to help lower economic deciles and economic system to exit the critical stage. Thes entities have two different ways of financing as follows:

1: They have an independent money (in this simulation, one-fifth of total money of all agents)

2: They receive the Islamic charity (sadaqah) that some of agents give and allocate it to lower deciles.

When charities have the first way of resourcing, all of them can just take one of two following strategies for allocating resources among the needy agents:

1) When the system goes to a critical stage, they hlep the poorest agent ( by one unit of money) in each time step until the system exits the critical stage.

2)  When the system goes to a critical stage, they hlep bottom 50%  (by one unit of money for each one) in each time step until the system exits the critical stage.

When charities have the second way of resourcing, all of them can just take one of two following strategies for allocating resources among the needy agents

1) When the system goes to a critical stage, just the richest agnet gives sadaqah ( a unit of money) to the charity entity and it allocates it to the poorest agent

2) When the system goes to a critical stage, just c% of richest decile  gives sadaqah (a unit of money by each agent) to the charity entity and it allocates it randomly to d% of the bottom 50%.

3) When the system goes to a critical stage, just k% of decile-10 (top 10%), p% of decile-9 and v% of dfecile-8 give sadaqah (a unit of money by eah person) to the charity entity and it allocates it as following:

 sadaqah paid by k% of decile-10 is allocated to x% of decile-1
 sadaqah paid by p% of decile-9 is allocated to y% of decile-2
 sadaqah paid by v% of decile-8 is allocated to z% of decile-3

HOW TO USE IT

"setup Button" is for model setup.

"go button" is to run the model.

"sepcified-random-seed switch" is On when a seed can be specified for a specific experimentation and is Off when the system is randomly simulated in each run.

"specified-seed input" is to receive the seed when the sepcified-random-seed switch is On.

"num-of-people slider" is for determining the number of human agents before any run.

"money-amount slider" is for determining the money amount of human agents before any run.

"initial-eqaul-money switch" is On when all agents have the same amount of money in the begining and is Off when all agents dont have the same amount of money in the begining.

"critical-threshold slider" is for determining the critical point before any run (when the difference between total money of top 10% and that of bottom 50% becomes equal to more than this point, the economic system goes to a critical stage).

"num-of-charities slider" is for determining the number of charity entities before any run.

"sadaqah switch" is On when people of the socity tends to pay sadaqah in critical stage of econmoy and is off when no agent pays sadaqah in such a stage.

"tick-threshold input" is for determining the time of run stop.

"compute-class switch" is On for computing the classes otherwise off.This slider has been taken from wealth distribution model of uri Wilensky (1998) .

"compute-Lorenz-and-Gini switch" is On for computing Gini coefficient and Lorenz curve otherwise off.This slider has been taken from wealth distribution model of uri Wilensky (1998).

When people give sadaqah, allocation strategies and related parameters are as follows:

"allocation-strategy? chooser" includes:

   s-one: when the system goes to a critical stage, just the richest agnet gives sadaqah (a unit of money) to the charity entity and it allocates it to the poorest agent.

   s-two: when the system goes to a critical stage, just c% of richest decile  gives sadaqah ( a unit of money by each agent ) to the charity entity and it allocates it randomly to d% of the bottom 50%.

   s-three: when the system goes to a critical stage, just k% of decile-10 (top 10%), p% of decile-9 and v% of dfecile-8 give sadaqah (a unit of money by eah person) to the charity entity that allocates it as following:

 sadaqah paid by k% of decile-10 is allocated to x% of decile-1
 sadaqah paid by p% of decile-9 is allocated to y% of decile-2
 sadaqah paid by v% of decile-8 is allocated to z% of decile-3

"percentage-of-decile-10 slider" is for determining the number of members of decile-10 participating in paying sadaqah to charity entities.

"percentage-of-decile-9 slider" is for determining the number of members of decile-9 participating in paying sadaqah to charity entities.

"percentage-of-decile-8 slider" is for determining the number of members of decile-8 participating in paying sadaqah to charity entities.

"percentage-of-decile-1 slider" is for determining the number of members of decile-1 receiving the sadaqah from charity entities.

"percentage-of-decile-2 slider" is for determining the number of members of decile-2 receiving the sadaqah from charity entities.

"percentage-of-decile-3 slider" is for determining the number of members of decile-3 receiving the sadaqah from charity entities.

"percentage-of-five-lower-deciles slider" is for determining the number of members of five-lower-deciles receiving the sadaqah from charity entities.

When people dont give sadaqah, allocation strategies and related parameters are as follows:

"allocation-strategy? chooser" includes:

   ws-one: When the system goes to a critical stage, charities hlep the poorest agent (by one unit of money) in each time step until the system exits the critical stage.

   ws-one: When the system goes to a critical stage, charities hlep bottom 50% (by one unit of money for each one) in each time step until the system exits the critical stage.

THINGS TO NOTICE

Gini coefficient and Lorenz curve are technically used for distribution of wealth or income. This model deals with distribution of money so It is unnecessary to use these switches for simulation.In addition, they can majorly slow the operation of model runs when lots af human agents and high amount of money are used in simulations.

EXTENDING THE MODEL

Some new agents and beghavioral rules can be added to make this model more realistic some of which are as following:

1- Human agents can directly give and receive sadaqah

2- Other phenomena such as distribution of wealth and income can be simulated

3- other economic reule of Islam such as Zakat and so on can be added to the model

4- Some features such as educational level and tendency to entrepreneurship can be added to agents to enable them to interact productively.

5- Some new agents such as venture capital funds, banks and so on can be added to the model to make the economic system more interactive. One instance for this can be venture capital funds set a priority for entrepreneurial eduacted agents living in poor deciles of the society.

RELATED MODELS

Simple Economy

Wealth Distribution.

CREDITS AND REFERENCES

The author and domain experts who participated in developing this model can be contacted by following emails:

Hossein Sabzian, PhD student, IUST, hossein_sabzian@pgre.iust.ac.ir

Alireza Aliahmadi, Professor, IUST, aliahmadia@iust.ac.ir

Adel Azar, Professor, TMU, AZARA@modares.ac.ir

Madjid Mirzaeei, Assistant professor, KNTU, majidmirza@ut.ac.ir

  • Wilensky, U. (2011). NetLogo Simple Economy model. http://ccl.northwestern.edu/netlogo/models/SimpleEconomy. Center for Connected Learning and Computer-Based Modeling, Northwestern Institute on Complex Systems, Northwestern University, Evanston, IL.

  • Dragulescu, A. & V.M. Yakovenko, V.M. (2000). Statistical Mechanics of Money. European Physics Journal B.

Comments and Questions

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

Click to Run Model

breed [persons person]   ;; people of society
breed [charities charity] ;; charity orgs
directed-link-breed [ sadaqah-links sadaqah-link]  ;; links from rich peolpe (benefactors) to charity organizations (beneficiaries)
directed-link-breed [ allocation-links allocation-link] ;; links from charity organizations (beneficiaries) to the needy
persons-own [ money ]    ;; money of people
charities-own [resources]  ;; resources of charity org
globals [

Bottom-50%-agentset ;; population of all persons of  five low deciles

 ;; economic deciles
decile-1
decile-2
decile-3
decile-4
decile-5
decile-6
decile-7
decile-8
decile-9
decile-10

;; classes
low-class
middle-class
high-class

;; Gini and lorenz
gini-index-reserve
lorenz-points

;; Ratio for each decile population
ratio-a
ratio-b
ratio-c
ratio-d

return-list  ;; A list for when systems go to critical stages
]

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Setup Procedure

to setup
  clear-all
  ;; patches
  if specified-random-seed? [ random-seed specified-seed]  ;; seed od experimentation
  resize-world 0 555 0 600   ;; size of world view
  set-patch-size 1
  ask patches [ set pcolor cyan + 3]
  ;; create a number of persons
 create-persons num-of-people [
    ifelse initial-equal-money? [ set money money-amount ] [set money random money-amount]
      set shape one-of ["woman" "person"]
      recolor
      set size 12
 ;; visualize the persons from up to down in ascending order of money
      setxy random-xcor money
      ]
 ;; create charity organizations
    create-charities num-of-charities [

    ifelse sadaqah?
     [set resources 0] ;; set it 0 and resource from highest deciles
    [set resources (total-money / 5)] ;; one-fifth of total money of population
     setxy (random-float 1 * max-pxcor) (0.95 * max-pycor)
     set shape "house"
     set color green
     set size 15
]

set Bottom-50%-agentset min-n-of (count persons * 0.50) persons [ money ]

;; computation of economic deciles
  decile-compuation

;; classess for calculating lorenz curve
set low-class count persons with [ money >= 0 and money < (0.34 * total-money)]
set middle-class count persons with [ money >= 34 and money < (57 * total-money) ]
set high-class count persons with [ money >= 57 and money <= total-money]

;; Lorenz and Gini
  update-lorenz-and-gini

;; ratios
set ratio-a 0
set ratio-b 0
set ratio-c 0
set ratio-d 0
;; list of times when the economic system goes to a critical stage
set return-list []

reset-ticks
end 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Go Procedure

to go
 if ticks = tick-threshold [ stop]  ;; threshold of exprimentation

clear-links
;; transact and then update your location
  ask persons with [ floor(money) > 0 ] [ transact ]

;; prevent money of turtles from moving too far to the up
  ask persons [ if  floor(money) <= max-pycor [ set ycor floor(money) ] ]

;; setting global variables for bottom %50 agentsets
set Bottom-50%-agentset min-n-of (count persons * 0.50) persons [ money ]

;; computation of economic deciles for following procedures
 decile-compuation

;; the mechanism for operationalization of charity organizations

  ifelse charity-operation? [ if top-10%-money >= (bottom-50%-money - (critical-threshold))  ;;the  critical indicator

  [ output-print ticks  set return-list lput ticks return-list   ifelse sadaqah? [fill-the-gap-with-sadaqah]  [fill-the-gap-without-sadaqah]

    ]  ;; computation of economic deciles for when charities come to scene

]
   [if top-10%-money >= (bottom-50%-money - (critical-threshold)) [output-print ticks ] ]

;;; switchs for computation of classes for Lorens and Gini

 if compute-class? [
set low-class count persons with [ money >= 0 and money < (0.34 * total-money)]
set middle-class count persons with [ money >= 34 and money < (57 * total-money) ]
set high-class count persons with [ money >= 57 and money <= total-money]
  ]

 if compute-lorenz-and-gini? [update-lorenz-and-gini]

  tick
end 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; helper procedures;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;Transact

to transact
  ;; give a unit of money to another person
  set money money - 1
  ask one-of other persons [ set money money + 1 ]
  recolor
end 

to recolor  ;; change color according to money amount
  set color scale-color black money 100 0
end 

;;;;;;;;;;;;;;;;;;;;;;;Computation of deciles

to decile-compuation
let pop count persons
let sorted-pop-based-on-money sort-by [ [i j] -> [money] of i < [money] of j ] persons
   ;; for positions
let p1 (0.10 * pop)
let p2 (0.20 * pop)
let p3 (0.30 * pop)
let p4 (0.40 * pop)
let p5 (0.50 * pop)
let p6 (0.60 * pop)
let p7 (0.70 * pop)
let p8 (0.80 * pop)
let p9 (0.90 * pop)
let p10 (1 * pop)
    ;; for sublists
let b1 sublist sorted-pop-based-on-money 0  p1
let b2 sublist sorted-pop-based-on-money p1  p2
let b3 sublist sorted-pop-based-on-money p2  p3
let b4 sublist sorted-pop-based-on-money p3  p4
let b5 sublist sorted-pop-based-on-money p4  p5
let b6 sublist sorted-pop-based-on-money p5  p6
let b7 sublist sorted-pop-based-on-money p6  p7
let b8 sublist sorted-pop-based-on-money p7  p8
let b9 sublist sorted-pop-based-on-money p8  p9
let b10 sublist sorted-pop-based-on-money p9  p10


set decile-1 turtle-set b1
set decile-2 turtle-set b2
set decile-3 turtle-set b3
set decile-4 turtle-set b4
set decile-5 turtle-set b5
set decile-6 turtle-set b6
set decile-7 turtle-set b7
set decile-8 turtle-set b8
set decile-9 turtle-set b9
set decile-10 turtle-set b10
end 

to-report money-of-decile-one
  report sum [money] of decile-1
end 

to-report money-of-decile-two
  report sum [money] of decile-2
end 

to-report money-of-decile-three
  report sum [money] of decile-3
end 

to-report money-of-decile-four
  report sum [money] of decile-4
end 

to-report money-of-decile-five
  report sum [money] of decile-5
end 

to-report money-of-decile-six
  report sum [money] of decile-6
end 

to-report money-of-decile-seven
  report sum [money] of decile-7
end 

to-report money-of-decile-eight
  report sum [money] of decile-8
end 

to-report money-of-decile-nine
  report sum [money] of decile-9
end 

to-report money-of-decile-ten
  report sum [money] of decile-10
end 


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;resorce allocation

;; when charities dont have independent resources and do resourcing based on money of the highest decile (sadaqah)

to fill-the-gap-with-sadaqah
;; In each tick,  take money frome rihest person of decile 10 and allocate resource to poorest person of lowest 5 deciles
  if allocation-strategy? = "s-one" [ ask charities
    [ help-with-sadaqah max-n-of 1 decile-10 [money] no-turtles no-turtles no-turtles no-turtles no-turtles  min-n-of 1 Bottom-50%-agentset [money] ] ]

;; In each tick, take money from all persons of decile 10 and  randomly allocate it to 20% of lowest 5 deciles

  if allocation-strategy? = "s-two" [

    let a ((percentage-of-decile-10 / 100) * count decile-10)
    let w ((percentage-of-five-lower-deciles / 100) * count Bottom-50%-agentset)

    ask charities  [ help-with-sadaqah n-of (a) decile-10  no-turtles no-turtles no-turtles no-turtles no-turtles  n-of(w) Bottom-50%-agentset    ]
  ]
;;;
  if allocation-strategy? = "s-three" [
      let a ((percentage-of-decile-10 / 100) * count decile-10)
      let b ((percentage-of-decile-9 / 100) * count decile-9)
      let c ((percentage-of-decile-8 / 100) * count decile-8)

      let aa ((percentage-of-decile-1 / 100) * count decile-1)
      let bb ((percentage-of-decile-2 / 100) * count decile-2)
      let cc ((percentage-of-decile-3 / 100) * count decile-3)

ask charities  [ help-with-sadaqah n-of(a) decile-10  n-of(b) decile-9  n-of(c) decile-8  n-of(aa) decile-1  n-of(bb) decile-2   n-of(bb) decile-3   no-turtles ]

  ]
end 

;; when charities have independent resources

to fill-the-gap-without-sadaqah
  ;;;;;;; strategies of  resource allocation to lower income deciles (lower 5 deciles)
  ;; In each tick,  allocate resource to poorest person of lower 5 deciles and subtract its resources by one unit
  if allocation--strategy? = "ws-one" [ ask charities [ if resources >= 1 [
    help-without-sadaqah no-turtles no-turtles no-turtles no-turtles no-turtles no-turtles  min-n-of 1 Bottom-50%-agentset [money]
    set resources resources - 1] ] ]

  ;; In each tick,  allocate resource to all of lowest 5 deciles and subtract its resources by number of lowest 5 deciles persons
  if allocation--strategy? = "ws-two" [ ask charities [ if resources >= 1 [
    help-without-sadaqah no-turtles no-turtles no-turtles no-turtles no-turtles no-turtles  Bottom-50%-agentset

    set resources resources - (count Bottom-50%-agentset) ]]]
end 

 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;help with sadaqah

to help-with-sadaqah [ decile10  decile9  decile8    decile1  decile2  decile3  five-lower-deciles]
  ;;;; benfactor deciles
     let rich-target-10 decile10
     let rich-target-9 decile9
     let rich-target-8 decile8

  ;;;;; the needful deciles
      let bottom50%-target  five-lower-deciles
      let poor-target-1 decile1
      let poor-target-2 decile2
      let poor-target-3 decile3
 ;;;; the ratios of subtraction

  if rich-target-10 != no-turtles and bottom50%-target != no-turtles [ set
   ratio-a ( count rich-target-10 / count bottom50%-target) ;; for strategy 2
  ]
  if rich-target-10 != no-turtles and poor-target-1 != no-turtles [
    set  ratio-b ( count rich-target-10  / count poor-target-1) ;; for strategy 3
  ]

  if rich-target-9 != no-turtles and poor-target-2 != no-turtles [
   set ratio-c ( count rich-target-9  / count poor-target-2) ;; for strategy 3
    ]

    if rich-target-8 != no-turtles and poor-target-3 != no-turtles [
   set ratio-d ( count rich-target-8  / count poor-target-3) ;; for strategy 3
    ]

;;;;; benefactors

if  rich-target-10 != no-turtles  [

if show-help? [ ifelse count rich-target-10 = 1 [ask rich-target-10 [create-sadaqah-link-to myself[set color red set thickness 3]]]
      [ask rich-target-10 [create-sadaqah-link-to myself [set color red set thickness 2]]]  ]

ask rich-target-10 [set money money - 1]
]

if  rich-target-9 != no-turtles  [

if show-help? [ ifelse count rich-target-9 = 1 [ask rich-target-9 [create-sadaqah-link-to myself[set color blue set thickness 3]]]
      [ask rich-target-9 [create-sadaqah-link-to myself [set color blue set thickness 2]]]  ]

ask rich-target-9 [set money money - 1]
]

if  rich-target-8 != no-turtles  [

if show-help? [ ifelse count rich-target-8 = 1 [ask rich-target-8 [create-sadaqah-link-to myself[set color yellow set thickness 3]]]
      [ask rich-target-8 [create-sadaqah-link-to myself [set color yellow set thickness 2]]]  ]

ask rich-target-8 [set money money - 1]
]

;;;;;the needful deciles

if  bottom50%-target != no-turtles [

if show-help? [ ifelse count bottom50%-target = 1 [create-allocation-link-to one-of bottom50%-target [set color green set thickness 2]]
      [create-allocation-links-to bottom50%-target [set color green]] ]

ask bottom50%-target [set money money + ratio-a ]
]


if  poor-target-1 != no-turtles [

if show-help? [ ifelse count poor-target-1 = 1[create-allocation-link-to one-of poor-target-1 [set color green set thickness 2]]
      [create-allocation-links-to poor-target-1 [set color green]] ]

ask poor-target-1 [set money money + ratio-b ]
]

if  poor-target-2 != no-turtles [

if show-help? [ ifelse count poor-target-2 = 1 [create-allocation-link-to one-of poor-target-2 [set color green set thickness 2]]
      [create-allocation-links-to poor-target-2 [set color green]] ]

ask poor-target-2 [set money money + ratio-c ]
]

 if  poor-target-3 != no-turtles [

if show-help? [ ifelse count poor-target-3 = 1 [create-allocation-link-to one-of poor-target-3 [set color green set thickness 2]]
      [create-allocation-links-to poor-target-3 [set color green]] ]

ask poor-target-3 [set money money + ratio-d ]
]
end 
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;help without sadaqah

to help-without-sadaqah [ decile10  decile9  decile8    decile1  decile2  decile3  five-lower-deciles]

  let bottom50%-target five-lower-deciles

  if  bottom50%-target != no-turtles [

if show-help? [ ifelse count bottom50%-target = 1 [create-allocation-link-to one-of bottom50%-target [set color green set thickness 2]]
      [create-allocation-links-to bottom50%-target [set color green]] ]

ask bottom50%-target [set money money + 1 ]
]
end 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; reporters

 ;; report total ealth of population

to-report total-money
  report sum [money] of persons
end 
  ;; report the money of top 10

to-report top-10%-money
  report sum [ money ] of decile-10
end 
  ;; report the money of bottom 50

to-report bottom-50%-money
  report sum [ money ] of Bottom-50%-agentset
end 

;;;;; critical value

to-report difference
  let diff (bottom-50%-money - top-10%-money)
  report diff
end 

to-report one-thousandth-of-diff
let diffth  (difference / 1000)
 report diffth
end 

;;;;;; Lorenz curve and Gini Coefficient

to update-lorenz-and-gini
let sorted-moneys sort [money] of persons
let all-money sum sorted-moneys
let money-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-of-people [
    set money-sum-so-far (money-sum-so-far + item index sorted-moneys)
    set lorenz-points lput ((money-sum-so-far / total-money) * 100) lorenz-points
    set index (index + 1)
    set gini-index-reserve
      gini-index-reserve +
      (index / num-of-people) -
      (money-sum-so-far / all-money)
  ]
end 

There is only one version of this model, created almost 6 years ago by Hossein Sabzian.

Attached files

File Type Description Last updated
Economic inequality and Islamic charity.png preview Preview for 'Economic inequality and Islamic charity' almost 6 years ago, by Hossein Sabzian Download

This model does not have any ancestors.

This model does not have any descendants.