Skip to content

Commit

Permalink
Minor refactorings
Browse files Browse the repository at this point in the history
  • Loading branch information
bzurkowski committed Mar 25, 2017
1 parent 28df229 commit 5fb162d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/mas_population.erl
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,16 @@ code_change(_OldVsn, State, _Extra) ->
%% @private
%%------------------------------------------------------------------------------
init_state(SP, Config = #config{population_mod = Mod}) ->
Agents = generate_population(Mod, SP, Config),
Behaviours = behaviours(Mod),
BehavioursCounter = mas_counter:new(Behaviours),
subscribe_metrics(Behaviours),
#state{
module = Mod,
agents = generate_population(Mod, SP, Config),
sim_params = SP,
behaviours_counter = mas_counter:new(Behaviours),
config = Config
module = Mod,
agents = Agents,
sim_params = SP,
behaviours_counter = BehavioursCounter,
config = Config
}.

%%------------------------------------------------------------------------------
Expand Down

0 comments on commit 5fb162d

Please sign in to comment.