Skip to content

Commit 1b341ad

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent eeba004 commit 1b341ad

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

examples/bank_reserves/bank_reserves/agents.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99
Center for Connected Learning and Computer-Based Modeling,
1010
Northwestern University, Evanston, IL.
1111
"""
12+
1213
from mesa.spaces import CellAgent
1314

15+
1416
class Bank:
1517
"""Note that the Bank class is not a Mesa Agent, but just a regular Python
1618
class. This is because there is only one bank in this model, and it does not
@@ -66,7 +68,6 @@ def do_business(self):
6668
if self.savings > 0 or self.wallet > 0 or self.bank.bank_to_loan > 0:
6769
# create list of people at my location (includes self)
6870

69-
7071
# check if other people are at my location
7172
if len(self.cell.agents) > 1:
7273
# set customer to self for while loop condition

examples/bank_reserves/bank_reserves/model.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,9 @@ def __init__(
118118
self.width = width
119119
self.init_people = init_people
120120

121-
self.grid = OrthogonalMooreGrid((self.width, self.height), torus=True, random=self.random)
121+
self.grid = OrthogonalMooreGrid(
122+
(self.width, self.height), torus=True, random=self.random
123+
)
122124
# rich_threshold is the amount of savings a person needs to be considered "rich"
123125
self.rich_threshold = rich_threshold
124126
self.reserve_percent = reserve_percent

examples/bank_reserves/batch_run.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,15 @@
3232

3333
from bank_reserves.model import BankReservesModel
3434

35+
3536
def track_params(model):
3637
return (model.init_people, model.rich_threshold, model.reserve_percent)
3738

3839

3940
def track_run(model):
4041
return model.uid
4142

43+
4244
# parameter lists for each parameter to be tested in batch run
4345
br_params = {
4446
"init_people": [25, 100],

0 commit comments

Comments
 (0)