Skip to content

Commit

Permalink
Merge pull request projectmesa#587 from projectmesa/bank_reserves_about
Browse files Browse the repository at this point in the history
Adding a description to bank_reserves.
  • Loading branch information
dmasad authored Oct 9, 2018
2 parents 4acf818 + 02a046e commit af4170c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions examples/bank_reserves/bank_reserves/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,22 @@ def get_total_loans(model):


class BankReserves(Model):
"""
This model is a Mesa implementation of the Bank Reserves model from NetLogo.
It is a highly abstracted, simplified model of an economy, with only one
type of agent and a single bank representing all banks in an economy. People
(represented by circles) move randomly within the grid. If two or more people
are on the same grid location, there is a 50% chance that they will trade with
each other. If they trade, there is an equal chance of giving the other agent
$5 or $2. A positive trade balance will be deposited in the bank as savings.
If trading results in a negative balance, the agent will try to withdraw from
its savings to cover the balance. If it does not have enough savings to cover
the negative balance, it will take out a loan from the bank to cover the
difference. The bank is required to keep a certain percentage of deposits as
reserves and the bank's ability to loan at any given time is a function of
the amount of deposits, its reserves, and its current total outstanding loan
amount.
"""

# grid height
grid_h = 20
Expand Down

0 comments on commit af4170c

Please sign in to comment.