Skip to content

Commit

Permalink
assert number of agents
Browse files Browse the repository at this point in the history
  • Loading branch information
alanlujan91 committed Mar 21, 2023
1 parent f30e903 commit 7c44892
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions sharkfin/tests/test_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ def test_lucas0_simulation():
rng=np.random.default_rng(1),
)

assert len(pop.agent_database.index) == LUCAS0["num_per_type"]

# arguments to attention simulation

# a = 0.2
Expand Down
4 changes: 2 additions & 2 deletions simulate/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

def build_population(agent_type, parameters, rng=None, dphm=1500):

num_per_type = parameters.pop("num_per_type", 1)
num_per_type = parameters.get("num_per_type", 1)

pop = AgentPopulation(
agent_type(), parameters, rng=rng, dollars_per_hark_money_unit=dphm
Expand Down Expand Up @@ -104,6 +104,6 @@ def build_population(agent_type, parameters, rng=None, dphm=1500):

lucas0_parameter_dict = lucas0_agent_population_params
lucas0_parameter_dict["AgentCount"] = 10 # TODO: What should this be?
lucas0_agent_population_params["num_per_type"] = 10
lucas0_parameter_dict["num_per_type"] = 10

LUCAS0 = lucas0_parameter_dict

0 comments on commit 7c44892

Please sign in to comment.