Skip to content

Commit ffa0958

Browse files
committed
Add docstring note that Bank is a regular class, not an Agent
1 parent bd60c41 commit ffa0958

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

examples/bank_reserves/bank_reserves/agents.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414

1515

1616
class Bank:
17+
"""Note that the Bank class is not a Mesa Agent, but just a regular Python
18+
class. This is because there is only one bank in this model, and it does not
19+
use any Mesa-specific features like the scheduler or the grid, and doesn't
20+
have a step method. It is just used to keep track of the bank's reserves and
21+
the amount it can loan out, for Person agents to interact with."""
22+
1723
def __init__(self, model, reserve_percent=50):
1824
self.model = model
1925
# for tracking total value of loans outstanding

examples/charts/charts/agents.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414

1515

1616
class Bank:
17+
"""Note that the Bank class is not a Mesa Agent, but just a regular Python
18+
class. This is because there is only one bank in this model, and it does not
19+
use any Mesa-specific features like the scheduler or the grid, and doesn't
20+
have a step method. It is just used to keep track of the bank's reserves and
21+
the amount it can loan out, for Person agents to interact with."""
22+
1723
def __init__(self, model, reserve_percent=50):
1824
self.model = model
1925
# for tracking total value of loans outstanding

0 commit comments

Comments
 (0)