diff --git a/sharkfin/tests/test_simulation.py b/sharkfin/tests/test_simulation.py index 2457cde..b6a9207 100644 --- a/sharkfin/tests/test_simulation.py +++ b/sharkfin/tests/test_simulation.py @@ -95,7 +95,6 @@ def test_macro_simulation(): SequentialPortfolioConsumerType, WHITESHARK, rng=np.random.default_rng(1), - num_per_type=2, ) # arguments to attention simulation @@ -143,7 +142,6 @@ def test_attention_simulation(): SequentialPortfolioConsumerType, WHITESHARK, rng=np.random.default_rng(1), - num_per_type=2, ) # arguments to attention simulation @@ -205,7 +203,6 @@ def test_lucas0_simulation(): SequentialPortfolioConsumerType, LUCAS0, rng=np.random.default_rng(1), - num_per_type=100, ) # arguments to attention simulation diff --git a/simulate/parameters.py b/simulate/parameters.py index 97bb206..b97f88b 100644 --- a/simulate/parameters.py +++ b/simulate/parameters.py @@ -7,7 +7,10 @@ from sharkfin.population import AgentPopulation -def build_population(agent_type, parameters, num_per_type=1, rng=None, dphm=1500): +def build_population(agent_type, parameters, rng=None, dphm=1500): + + num_per_type = parameters.pop("num_per_type", 1) + pop = AgentPopulation( agent_type(), parameters, rng=rng, dollars_per_hark_money_unit=dphm ) @@ -101,6 +104,6 @@ def build_population(agent_type, parameters, num_per_type=1, 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 = lucas0_parameter_dict