Skip to content

Commit

Permalink
Add docstring note that Bank is a regular class, not an Agent
Browse files Browse the repository at this point in the history
  • Loading branch information
EwoutH committed Aug 19, 2024
1 parent 0c6366c commit 0ebc4d1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions examples/bank_reserves/bank_reserves/agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@


class Bank:
"""Note that the Bank class is not a Mesa Agent, but just a regular Python
class. This is because there is only one bank in this model, and it does not
use any Mesa-specific features like the scheduler or the grid, and doesn't
have a step method. It is just used to keep track of the bank's reserves and
the amount it can loan out, for Person agents to interact with."""

def __init__(self, model, reserve_percent=50):
self.model = model
# for tracking total value of loans outstanding
Expand Down
6 changes: 6 additions & 0 deletions examples/charts/charts/agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@


class Bank:
"""Note that the Bank class is not a Mesa Agent, but just a regular Python
class. This is because there is only one bank in this model, and it does not
use any Mesa-specific features like the scheduler or the grid, and doesn't
have a step method. It is just used to keep track of the bank's reserves and
the amount it can loan out, for Person agents to interact with."""

def __init__(self, model, reserve_percent=50):
self.model = model
# for tracking total value of loans outstanding
Expand Down

0 comments on commit 0ebc4d1

Please sign in to comment.