MCPcopy Create free account
hub / github.com/devosoft/avida / SetDemeResourceInflow

Method SetDemeResourceInflow

avida-core/source/main/cPopulation.cc:7256–7263  ·  view source on GitHub ↗

This method sets the inflow for the named deme resource across ALL demes. * It changes the value in the environment, then updates it in the deme resource * counts. * * This maintains the connection between the enviroment value and the resource * count values, unlike cPopulation::SetSingleDemeResourceInflow() */

Source from the content-addressed store, hash-verified

7254 * count values, unlike cPopulation::SetSingleDemeResourceInflow()
7255 */
7256void cPopulation::SetDemeResourceInflow(const cString res_name, double new_level)
7257{
7258 environment.SetResourceInflow(res_name, new_level);
7259 int num_demes = GetNumDemes();
7260 for (int deme_id = 0; deme_id < num_demes; ++deme_id) {
7261 GetDeme(deme_id).GetDemeResources().SetInflow(res_name, new_level);
7262 }
7263}
7264
7265/* This method sets the outflow for the named deme resource in a specific deme.
7266 * It changes the value in the environment, then updates the decay rate in the

Callers 1

ProcessMethod · 0.80

Calls 2

SetResourceInflowMethod · 0.45
SetInflowMethod · 0.45

Tested by

no test coverage detected