Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions model/Population.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ void Population::update()
{
//NOTE: other parts of code are not set up to handle changing population size. Also
// size is assumed to be the _actual and exact_ population size by other code.
//targetPop is the population size at time t allowing population growth
//int targetPop = (int) (size * exp( AgeStructure::rho * sim::ts1().inSteps() ));
int cumPop = 0;

for (auto it = humans.begin(); it != humans.end();) {
Expand Down
18 changes: 0 additions & 18 deletions model/PopulationAgeStructure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,10 @@ namespace OM {
vector<double> AgeStructure::ageGroupBounds;
vector<double> AgeStructure::ageGroupPercent;

double AgeStructure::initialRho = 0.0;
double AgeStructure::mu0;
double AgeStructure::mu1;
double AgeStructure::alpha0;
double AgeStructure::alpha1;
double AgeStructure::rho;

vector<double> AgeStructure::cumAgeProp;

Expand Down Expand Up @@ -137,14 +135,6 @@ void AgeStructure::estimateRemovalRates( const scnXml::Demography& demography ){
for(size_t i = 0;i < ngroups; i++) {
ageGroupPercent[i] = ageGroupPercent[i] * sumperc;
}
/*
RSS between observed and predicted log percentage of population in age groups
is minimised for values of mu1 and alpha1
calls setDemoParameters to calculate the RSS
*/
if( demography.getGrowthRate().present() ){
initialRho = demography.getGrowthRate().get();
}

/* NOTE: unused --- why?
double tol = 0.00000000001;
Expand All @@ -160,14 +150,6 @@ void AgeStructure::estimateRemovalRates( const scnXml::Demography& demography ){
// Static method used by estimateRemovalRates
double AgeStructure::setDemoParameters (double param1, double param2)
{
rho = initialRho;

rho = rho * (0.01 * sim::yearsPerStep());
if (rho != 0.0)
// Issue: in this case the total population size differs from populationSize,
// however, some code currently uses this as the total population size.
throw util::xml_scenario_error ("Population growth rate provided.");

const double IMR = 0.1;
double M_inf = -log (1 - IMR);

Expand Down
14 changes: 7 additions & 7 deletions model/PopulationAgeStructure.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,19 @@ namespace OM
* setDemoParameters()). */
//@{
static vector<double> ageGroupBounds;
static vector<double> ageGroupPercent;
static vector<double> ageGroupPercent;
//@}
static double initialRho;
/** Parameters defining smooth curve of target age-distribution.
*
* Set by estimateRemovalRates() (via setDemoParameters()) and used by
* setupPyramid(). */
//@{
static double mu0;
static double mu1;
static double alpha0;
static double alpha1;
static double rho;
static double mu0;
static double mu1;
static double alpha0;
static double alpha1;
// rho is growth rate of human population.
constexpr static double rho = 0.0;
//@}
//END

Expand Down
9 changes: 0 additions & 9 deletions schema/demography.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,6 @@ Licence: GNU General Public Licence version 2 or later (see COPYING) -->
<xs:appinfo>units:Years;min:0;max:100;name:Maximum age of simulated humans;</xs:appinfo>
</xs:annotation>
</xs:attribute>
<xs:attribute name="growthRate" type="xs:double" use="optional">
<xs:annotation>
<xs:documentation>
Growth rate of human population.
(we should be able to implement this with non-zero values)
</xs:documentation>
<xs:appinfo>units:Number;min:0;max:0;name:Growth rate of human population;</xs:appinfo>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<!-- ageGroup -->
<xs:complexType name="DemogAgeGroup">
Expand Down
Loading