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

Method SetSingleDemeResourceInflow

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

This method sets the inflow for the named deme resource in a specific deme. * It changes the value in the environment, then updates it in the specified deme's * resource count. * * ATTENTION: This leads to the rather bizzare consequence that the inflow rate * in the environment may not match the inflow rate in each deme's resource count. * This is not my own decision, simply a reflection o

Source from the content-addressed store, hash-verified

7241 * cPopulation::SetDemeResourceInflow() -- blw
7242 */
7243void cPopulation::SetSingleDemeResourceInflow(int deme_id, const cString res_name, double new_level)
7244{
7245 environment.SetResourceInflow(res_name, new_level);
7246 GetDeme(deme_id).GetDemeResources().SetInflow(res_name, new_level);
7247}
7248
7249/* This method sets the inflow for the named deme resource across ALL demes.
7250 * It changes the value in the environment, then updates it in the deme resource

Callers 1

ProcessMethod · 0.80

Calls 2

SetResourceInflowMethod · 0.45
SetInflowMethod · 0.45

Tested by

no test coverage detected