Counterbalance Economics

No preview image

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

1 collaborator

Default-person Peter Malliaros (Author)

Tags

(This model has yet to be categorized with any tags)
Model group Counterbalance Economics | Visible to everyone | Changeable by group members (Counterbalance Economics)
Model was written in NetLogo 6.1.1 • Viewed 373 times • Downloaded 25 times • Run 0 times
Download the 'Counterbalance Economics' 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?

This model simulates the distribution of wealth. “The rich get richer and the poor get poorer” is a familiar saying that expresses inequity in the distribution of wealth. In this simulation, we see Pareto’s law, in which there is a large number of “poor” or RED people, fewer “middle class” or GREEN people, and many fewer “rich” or BLUE people.

HOW IT WORKS

This model is adapted from Epstein & Axtell’s “Sugarscape” model. It uses grain instead of sugar. Each patch has an amount of grain and a grain capacity (the amount of grain it can grow). People collect grain from the patches and eat the grain to survive. How much grain each person accumulates is his or her wealth. The model begins with a roughly equal wealth distribution. The people then wander around the landscape gathering as much grain as they can. Each person attempts to move in the direction where the most grain lies. Each cycle is termed TICK. TIME is represented as the number of ticks. During each time tick, each person eats a certain amount of grain. This amount is called their Metabolism. People also have a Life Expectancy. When their lifespan runs out, or they run out of grain, they die and produce a single offspring. The offspring has a random metabolism and a random amount of grain, ranging from the poorest person’s amount of grain to the richest person’s amount of grain (There is no inheritance of wealth).

To observe the equity (or the inequity) of the distribution of wealth, a graphical tool called the Lorenz curve is utilised. We rank the population by their wealth and plot the percentage of the population that owns each percentage of the wealth (e.g. 30% of the wealth is owned by 50% of the population). Hence the ranges on both axes are from 0% to 100%.

Another way to understand the Lorenz curve is to imagine a society of 100 people with a fixed amount of wealth available. An individual is 1% of the population. Rank the individuals in order of their wealth from greatest to least: the poorest individual would have the lowest ranking of 1 and so forth. Then plot the proportion of the rank of an individual on the y-axis and the portion of wealth owned by this individual and all the individuals with lower rankings on the x-axis. For example, individual Y with a ranking of 20 (20th poorest in society) would have a percentage ranking of 20% in a society of 100 people (or 100 rankings) — this is the point on the y-axis. The corresponding plot on the x-axis is the proportion of the wealth that this individual with ranking 20 owns along with the wealth owned by all the individuals with lower rankings (from rankings 1 to 19). A straight line with a 45-degree incline at the origin (or slope of 1) is a Lorenz curve that represents perfect equality — everyone holds an equal part of the available wealth. On the other hand, should only one family or one individual hold all of the wealth in the population (i.e. perfect inequity), then the Lorenz curve will be a backwards “L” where 100% of the wealth is owned by the last percentage proportion of the population. In practice, the Lorenz curve actually falls somewhere between the straight 45-degree line and the backwards “L”.

For a numerical measurement of the inequity in the distribution of wealth, the Gini index (or Gini coefficient) is derived from the Lorenz curve. To calculate the Gini index, find the area between the 45-degree line of perfect equality and the Lorenz curve. Divide this quantity by the total area under the 45-degree line of perfect equality (this number is always 0.5 — the area of 45-45-90 triangle with sides of length 1). If the Lorenz curve is the 45-degree line, then the Gini index would be 0; there is no area between the Lorenz curve and the 45-degree line. If, however, the Lorenz curve is a backwards “L”, then the Gini-Index would be 1 — the area between the Lorenz curve and the 45-degree line is 0.5; this quantity divided by 0.5 is 1. Hence, equality in the distribution of wealth is measured on a scale of 0 to 1 — more inequity as one travels up the scale. Another way to understand (and equivalently compute) the Gini index, without reference to the Lorenz curve, is to think of it as the mean difference in wealth between all possible pairs of people in the population, expressed as a proportion of the average wealth (see Deltas, 2003 for more).

THE COUNTERBALANCE ECONOMICS (CBE) MODEL

The Counterbalance Economics system is the name of an alternative economic system which aims to reduce the level of inequality in any given population. The Wealth Distribution model has been updated to incorporate the key elements of the Counterbalance system which are:

  1. Paying the lowest paid workers, the AWE (Average Weekly Earnings) or Average total wealth in this model
  2. Paying the lowest 50% of workers does not reduce the amount of grain available, to simulate paying those workers with Contra-deal credits
  3. This also simulates how the Counterbalance model fixes supply shortages without damaging the environment

Note: The Counterbalance Economics model reduces inequality to almost zero, which means there is no poverty, while still allowing the rich to remain rich. The outcomes achieved by the CBE model are done by complementing the economic system being used in any country. Although it is theoretically possible to run the CBE autonomously, it is not designed to work independently but rather with the existing system of any economy.

One of the goals of the update to this Agent Based Model, was to allow the simulation of any global economy which includes their economic and inequality levels and then compare those to the levels that would exist if we incorporated the CBE system into their existing economic system. To achieve this, we have added the following five sliders and one chooser.

Tax-Collected-as-%-of-GDP (slider) – Allows simulation of the amount of tax collected by different countries as a percentage to their GDP

Welfare-Payment-to-Reds (slider) – Allows the simulation of the amount of welfare payments as a percentage of taxes collected (Welfare is only paid to the lowest class in the model, the Reds)

Wealth-Growth-Time (slider) – Allows the simulation of how quickly an economy is growing Wealth-Growth-Volume – Allows the simulation of the volume of growth occurring in an economy

The last 2 sliders allow simulation of the business cycle (more commonly known as “booms and busts”). A “business cycle … refers to the alternating periods of expansion and contraction in economic activity relative to the trend in the economic growth rate that the economy experiences over time” (Hubbard, p190).

CBE-Contra-Deal-Credit-AWE-Payment (slider) – Allows us to vary the amount of money we pay the Reds. At 1, the reds receive the Average Weekly Earnings (AWE) amount which is represented by the “avg-inc-total” amount. Therefore, if the slider were set to 0.9, this would be equivalent to paying the Reds 90% of the AWE. If the slider were set to 1.1, that would be equivalent to paying the Reds 110% of the AWE. Running the model from 80% through to 120% of the AWE 25,000 times has shown that setting the model to 1, provides the best outcome for inequality and for wealth in the model/country. Therefore, this provides further validation for the 50/50 (AWE) hypothesis as stipulated in the Counterbalance Economics discussion paper. www.UrReferendum.org.au

Economic-System (chooser) – Allows us to choose between the “original model” that the ABM came with, the “Counterbalance” model which provides a comparison between the status quo and the addition of the CBE to that particular economic system and the “Neoliberal-v-GovernmentRun” model which allows us to simulate any global economy using the four sliders just discussed.

This is possible because all global economies have the following 3 attributes: • a level of GDP • a level of taxation and • a level of social welfare (if no social welfare is provided, simply set the slider to zero).

For an economy to exist, there must be a market to allow the sale of goods and services. The key difference between each country is what level of control or freedom the government allows, via regulation. It can therefore be said that the key difference between all economies is their position on the level of regulation spectrum. On one end, with the most regulation, includes Keynesianism, Socialism and Communism. At the other end of the spectrum, with the least amount of regulation, we have mixed market economies and Neoliberal economies (Heywood 2013, 145). This then determines the amount of taxation that is required to pay government employees to administer the regulation and to provide the safety net being provided. This is simulated in the Wealth Distribution model with the Tax-Collected-as-%-of-GDP and the Welfare-Payment-to-Reds sliders.

For a complete overview of the Counterbalance Economics system, please go to www.UrReferendum.org.au

Heywood, A. (2013). Politics. Basingstoke: Palgrave Macmillan. Hubbard. (2015). Market Failure and Government Failure. In INTRODUCTORY ECONOMICS

HOW TO USE IT

The PERCENT-BEST-LAND slider determines the initial density of patches that are seeded with the maximum amount of grain. This maximum is adjustable via the MAX-GRAIN variable in the SETUP procedure in the procedures window. The GRAIN-GROWTH-INTERVAL slider determines how often grain grows. The NUM-GRAIN-GROWN slider sets how much grain is grown each time GRAIN-GROWTH-INTERVAL allows grain to be grown.

The NUM-PEOPLE slider determines the initial number of people. LIFE-EXPECTANCY-MIN is the shortest number of ticks that a person can possibly live. LIFE-EXPECTANCY-MAX is the longest number of ticks that a person can possibly live. The METABOLISM-MAX slider sets the highest possible amount of grain that a person could eat per clock tick. The MAX-VISION slider is the furthest possible distance that any person could see.

GO starts the simulation. The TIME ELAPSED monitor shows the total number of clock ticks since the last setup. The CLASS PLOT shows a line plot of the number of people in each class over time. The CLASS HISTOGRAM shows the same information in the form of a histogram. The LORENZ CURVE plot shows the Lorenz curve of the population at a particular time as well as the 45-degree line of equality. The GINI-INDEX V. TIME plot shows the Gini index at the time that the Lorenz curve is drawn. The LORENZ CURVE and the GINI-INDEX V. TIME plots are updated every 5 passes through the GO procedure.

• - “Red #”, “Green #” and “Blue #” monitors show the number of persons in each class (poor/middle/rich). • - “AvgRd”, AvgGrn and AvgBlu monitors show the average for each class (the total earned by the group / total in the group). • - “Avg Total Wealth” monitor shows the average wealth of all persons. • - “Wealth in the World/Country" monitor shows the total wealth in the economy, which includes all the grain wealth on the land and the grain wealth owned by the population. • - “Taxes” monitor shows the amount of tax being deducted from the population at each tick. • - “Welfare Payments” monitor, show the total amount of welfare being paid to red population • - “Gini monitor” shows the level of inequality that exists in the simulation at any given period

SIMULATING AN ECONOMY

To simulate an economy, you need to have a set of data to work with including a countries GDP, Total Tax Revenue, Welfare Payments and Gini index for the year/s you want to simulate.

You then need to calculate the two numbers that you input into the system which are: 1. The percentage of Tax to GDP (Adjust Tax-Collected-as-%-of-GDP slider to that setting) 2. The percentage of Welfare Payments to Tax Revenue (Adjust Welfare-Payment-to-Reds slider to that setting)

Finally, once you set the values calculated, you run the model several times and adjust the Wealth-Growth-Time (WGT) and the Wealth-Growth-Volume (WGV) sliders until you can achieve the highest Gini and the lowest Gini index numbers in your data set. This will allow the simulation of the level of growth or lack of in the model economy. To provide further clarification of how this works, we have provided the sample data used to simulate the economies of Australia, US, and the UK from 2010 to 2019 in the table 1. Below.

Note: data is easier to read in edit mode or copied into Excel

Example: To simulate Australia, we first set our Tax-Collected to 0.18 and the welfare setting to 0.38 (2018/19 figures) and then adjust the WGT and WGV sliders until we achieved a .34 Gini (highest Gini score) at the end of a simulation run. We then repeat this process adjusting the Tax-Collected to 0.15 and welfare to 0.49 (2011/12 figures) and once again adjusted the WGT and WGV until we achieved a 0.32 Gini (lowest Gini score). We would have found the WGT and WGV setting for a country when we can achieve both the high Gini and low Gini values by only adjusting the tax-collected and welfare paid for any particular year. For Australia, we found that this occurs when the WGT is set to 6 and the WGV is set to 10. Please note that the Gini level calculated by the Wealth Distribution model occurs as a result of running the model. This means that although the more accurate it is the better, it is ok if the model fluctuates between a Gini score of 0.31 and 0.33 for 2011/12 and between 0.33 and 0.35 for 2018/19.

Generally, we would start the WGT and WGV sliders at 10 and then adjust the WGT back towards 1, 1 increment at a time. Once you have found a setting for the WGT, adjust the WGV one increment up or down to achieve a higher accuracy if required. At this point the model has been primed for that particular country which will allow you to test how an economy has performed in any given year as well as testing to see how it would have performed had the CBE model been added to the economy for that year.

Table 1. GDP, Tax & Welfare Data for simulating the economies of Aust, US & UK

Date Country Tax-Collected welfare Gini WGT WGV 2009-10 Australia 0.13 0.52 0.33 6.00 10.00 2010-11 Australia 0.13 0.51 0.33 6.00 10.00 2011-12 Australia 0.15 0.49 0.32 6.00 10.00 2012-13 Australia 0.15 0.49 0.33 6.00 10.00 2013-14 Australia 0.15 0.51 0.34 6.00 10.00 2014-15 Australia 0.15 0.50 0.33 6.00 10.00 2015-16 Australia 0.15 0.49 0.32 6.00 10.00 2016-17 Australia 0.16 0.46 0.32 6.00 10.00 2017-18 Australia 0.17 0.41 0.33 6.00 10.00 2018-19 Australia 0.18 0.38 0.34 6.00 10.00 2009-10 America.. 0.26 0.15 0.47 9.00 10.00 2010-11 America.. 0.27 0.14 0.48 9.00 10.00 2011-12 America.. 0.26 0.14 0.48 9.00 10.00 2012-13 America.. 0.28 0.13 0.48 9.00 10.00 2013-14 America.. 0.29 0.13 0.48 9.00 10.00 2014-15 America.. 0.29 0.13 0.48 9.00 10.00 2015-16 America.. 0.29 0.13 0.48 9.00 10.00 2016-17 America.. 0.28 0.13 0.48 9.00 10.00 2017-18 America.. 0.28 0.13 0.49 9.00 10.00 2018-19 America.. 0.27 0.13 0.48 9.00 10.00 2009-10 UK....... 0.26 0.35 0.37 3.00 9.00 2010-11 UK....... 0.27 0.34 0.34 3.00 9.00 2011-12 UK....... 0.28 0.33 0.34 3.00 9.00 2012-13 UK....... 0.27 0.35 0.34 3.00 9.00 2013-14 UK....... 0.26 0.33 0.35 3.00 9.00 2014-15 UK....... 0.27 0.32 0.35 3.00 9.00 2015-16 UK....... 0.27 0.32 0.35 3.00 9.00 2016-17 UK....... 0.27 0.30 0.33 3.00 9.00 2017-18 UK....... 0.28 0.30 0.34 3.00 9.00 2018-19 UK....... 0.28 0.30 0.35 3.00 9.00

Note: data is easier to read in edit mode or copied into Excel

CBE COMPARISON SUMMARY

The goal for updating the Wealth Distribution model was to simulate any global economic system to allow a comparison between what is and how any economy is likely to be affected with the introduction of the CBE system.

To achieve this we implemented the use of sliders to simulate the level of GDP, Taxation, Welfare spending for any economy and a method for approximating the business cycle by ensuring that the model is able to replicate the highest and lowest Gini index value for the test country being studied.

Based on the simulation, introducing the CBE into the Australian, UK or US economies would increase the overall wealth of those countries by around 492% and the level of inequality would be reduced from an average of .384 down to an average of .07. Further research will be conducted which includes a pilot to test the robustness of the results achieved in the simulation.

THINGS TO NOTICE

Notice the distribution of wealth. Are the classes equal? This model usually demonstrates Pareto’s Law, in which most of the people are poor, fewer are middle class, and very few are rich. Why does this happen? Do poor families seem to stay poor? What about the rich and the middle-class people? Watch the CLASS PLOT to see how long it takes for the classes to reach stable values.
As time (ticks) passes, does the distribution get more equalised or more skewed? (Hint: observe the Gini index plot)

Try to find resources from the U.S. Government Census Bureau for the U.S.’s Gini coefficient. Are the Gini coefficients that you calculate from the model comparable to those of the Census Bureau? Why or why not? Is there a trend in the plotting of the Gini index with respect to time? Does the plot oscillate? Or does it stabilise to a certain number?

THINGS TO TRY

Are there any settings that do not result in a demonstration of Pareto’s Law? Play with the NUM-GRAIN-GROWN slider and see how this affects the distribution of wealth. How much does the LIFE-EXPECTANCY-MAX matter? Change the value of the MAX-GRAIN variable (in the setup procedure in the Code tab). Do outcomes differ? Experiment with the PERCENT-BEST-LAND and NUM-PEOPLE sliders. How do these affect the outcome of the distribution of wealth? Try having all the people start in one location. See what happens. Try setting everyone’s initial wealth as being equal. Does the initial endowment of an individual still arrive at an unequal distribution in wealth? Is it less so when setting random initial wealth for individuals? Try setting all the individuals’ wealth and vision to being equal. Do you still arrive at an unequal distribution of wealth? Is it more equal in the measure of the Gini index than with random endowments of vision?

EXTENDING THE MODEL

Have each newborn inherit a percentage of the wealth of its parent. Add a switch or slider which has the patches grow back all or a percentage of their grain capacity, rather than just one unit of grain. Allow the grain to give an advantage or disadvantage to its carrier, such as every time some grain is eaten or harvested, pollution is created. Would this model be the same if the wealth were randomly distributed (as opposed to a gradient)? Try different landscapes, making SETUP buttons for each new landscape. Try allowing metabolism or vision or another characteristic to be inherited. Will we see any sort of evolution? Will the “fittest” survive? If not, why not? We said above that “there is no inheritance of wealth” in the model, but that is not entirely true. New babies are born (termed “turtles” in ABM) in the same location as their parents. If grain is plentiful relative to the population at this location, they inherit a good starting situation. Try moving the turtles to a random patch when they are born. Does that lead to a more equitable distribution of wealth? Try adding in seasons into the model. That is to say: have the grain grow better in a section of the landscape during certain times and worse at others. How could you change the model to achieve wealth equality? The way the procedures are set up now, one person will sometimes follow another. You can see this by setting the number of people relatively low, such as 50 or 100, and having a long-life expectancy. Why does this phenomenon happen? Try adding code to prevent this from occurring. (Hint: When and how do people check to see which direction they should move in?)

NETLOGO FEATURES

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. CREDITS AND REFERENCES This 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 https://en.wikipedia.org/wiki/Pareto_principle. 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. HOW TO CITE If you mention this model or the NetLogo software in a publication, we ask that you include the citations below. For the model itself: • Wilensky, U. (1998). NetLogo Wealth Distribution model. http://ccl.northwestern.edu/netlogo/models/WealthDistribution. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL. Please cite the NetLogo software as: • Wilensky, U. (1999). NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL. COPYRIGHT AND LICENSE 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 https://creativecommons.org/licenses/by-nc-sa/3.0/ 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 uri@northwestern.edu. This 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. This 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

globals
[
  max-grain    ; maximum amount any patch can hold
  gini-index-reserve
  lorenz-points


]

patches-own
[
  grain-here      ; the current amount of grain on this patch
  max-grain-here  ; the maximum amount of grain this patch can hold

 ]

turtles-own
[
  age              ; how old a turtle is
  wealth           ; the amount of grain a turtle has
  life-expectancy  ; maximum age that a turtle can reach
  metabolism       ; how much grain a turtle eats each time
  vision           ; how many patches ahead a turtle can see
  Tax-Collected    ; Amount of wealth reduced by tax
  Welfare          ; Amount received as welfare payment

]

breed [cooperative-turtles cooperative-turtle]
breed [rich-turtles rich-turtle]


;;;
;;; SETUP AND HELPERS
;;;

to setup
  clear-all
  ;; set global variables to appropriate values
  set max-grain 50
  ;; call other procedures to set up various parts of the world
  setup-patches
  setup-turtles
  update-lorenz-and-gini

  reset-ticks
end 

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

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

to recolor-patch  ;; patch procedure -- use color to indicate grain level
  set pcolor scale-color yellow grain-here 0 max-grain
end 

;; set up the initial values for the turtle variables

to setup-turtles
  set-default-shape turtles "person"
  create-turtles num-people
    [ move-to one-of patches  ;; put turtles on patch centers
      set size 1.5  ;; easier to see
      set-initial-turtle-vars
      set age random life-expectancy ]
  recolor-turtles
end 

to set-initial-turtle-vars
  set age 0
  face one-of neighbors4
  set life-expectancy life-expectancy-min +
                        random (life-expectancy-max - life-expectancy-min + 1)
  set metabolism 1 + random metabolism-max
  set wealth metabolism + random 50
  set vision 1 + random max-vision
  set Tax-Collected (wealth * Tax-Collected-as-%-of-GDP)
  set Welfare (Tax-Collected * Welfare-Payment-to-Reds)
end 


;; Set the class of the turtles -- if a turtle has less than a third
;; the wealth of the richest turtle, color it red.  If between one
;; and two thirds, color it green.  If over two thirds, color it blue.
;; setup recolor based on chooser

to recolor-turtles
  let max-wealth max [wealth] of turtles

 ;; when chosen, this component returns this simulation back to its original setting to provide a baseline for comparison
  if ( Economic-System = "Original-Model" ) [ ask turtles [ ifelse (wealth <= max-wealth / 3)
        [ set color red ]
        [ ifelse (wealth <= (max-wealth * 2 / 3))
            [ set color green ]
      [ set color blue ] ] ]]


 ;; when chosen, this component simulates paying the bottom 50% of workers the AWE amount which in this simulation is the Average Total Wealth
  if ( Economic-System = "Counterbalance" ) [ ask turtles [ ifelse (wealth <= max-wealth / 3)
        [ set color red set wealth (avg-inc-total * CBE-Contra-Deal-Credit-AWE-Payment) ] ;; this line simulates paying the reds the AWE amount in Contra-Deal Credits
        [ ifelse (wealth <= (max-wealth * 2 / 3))
            [ set color green ] ;; In the CBE, everyone has a job, therefore, no unemployment benefits are required.
      [ set color blue ] ] ]] ;; therefore, governments can reduce the amount of tax paid by the greens and the blues
  ;; It is envisaged that any money saved, will be put back into the economy and that is simulated by reducing the tax rate to 1/3 of the normal tax rate for the greens and the blues

 ;; when chosen, this component allows you to vary the overall tax rate and the welfare paid to the reds
  if ( Economic-System = "Neoliberal-v-GovernmentRun" ) [ ask turtles [ ifelse (wealth <= max-wealth / 3)
    [ set color red set wealth ((wealth + Welfare) - Tax-Collected) ]
        [ ifelse (wealth <= (max-wealth * 2 / 3))
            [ set color green set wealth (wealth - Tax-Collected) ]
      [ set color blue set wealth (wealth - Tax-Collected) ] ] ]]
end 


;; Set the type of turtles -- if a turtle has less two thirds or less
;; then it is cooperative.
;; If over two thirds, then it is a rich turtle.

to setup-turtles-breeds
  let max-wealth max [wealth] of turtles
  ask turtles
    [ ifelse (wealth <= max-wealth * 2 / 3)
        [ set breed cooperative-turtles
      set color green ]
        [ set breed rich-turtles
      set color red ] ]
end 


;;;
;;; GO AND HELPERS
;;;

to go

if ticks >= 500 [ stop ]
  ask turtles
  [ turn-towards-grain ]  ;; choose direction holding most grain within the turtle's vision
  harvest
  ask turtles
    [ move-eat-age-die ]

recolor-turtles

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



  update-lorenz-and-gini

tick
end 


;; determine the direction which is most profitable for each turtle in
;; the surrounding patches within the turtles' vision

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

to-report grain-ahead  ;; turtle procedure
  let total 0
  let how-far 1
  repeat vision
    [ set total total + [grain-here] of patch-ahead how-far
      set how-far how-far + 1 ]
  report total
end 

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


;; each turtle harvests the grain on its patch.  if there are multiple
;; turtles on a patch, divide the grain evenly among the turtles

to harvest
  ; have turtles harvest before any turtle sets the patch to 0
  ask turtles
    [ set wealth floor (wealth + (grain-here / (count turtles-here) )) ]

  ;; now that the grain has been harvested, have the turtles make the
  ;; patches which they are on have no grain
  ask turtles
    [ set grain-here 0
      recolor-patch ]
end 

to move-eat-age-die  ;; turtle procedure
  fd 1

  set Tax-Collected (wealth * Tax-Collected-as-%-of-GDP)
  set Welfare (Tax-Collected * Welfare-Payment-to-Reds)

  ;; consume some grain according to metabolism
  set wealth (wealth - metabolism)
  ;; grow older
  set age (age + 1)
  ;; check for death conditions: if you have no grain 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-turtle-vars ]
end 

;; 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)
      ]
end 

to-report num-of-red
  report round count turtles with [color = red]
end 

to-report num-of-green
  report round count turtles with [color = green]
end 

to-report num-of-blue
  report round count turtles with [color = blue]
end 

to-report avg-inc-red
    report round sum [ wealth ] of turtles with [color = red] / num-of-red
end 

to-report avg-inc-green
    report round sum [ wealth ] of turtles with [color = green] / num-of-green
end 

to-report avg-inc-blue
    report round sum [ wealth ] of turtles with [color = blue] / num-of-blue
end 

to-report avg-inc-total
  report (sum [wealth] of turtles) / num-people
end 

to-report tot-wealth-world
  report round sum [ max-grain ] of patches + sum [wealth] of turtles
end 




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

There is only one version of this model, created over 4 years ago by Peter Malliaros.

Attached files

No files

This model does not have any ancestors.

This model does not have any descendants.