ALMaSS Partridge ODdox  1.1
The partridge model description following ODdox protocol
Partridge_Population_Manager.cpp File Reference

Partridge_Population_Manager.cpp This file contains the code for the partridge population manager class
More...

#include <cmath>
#include <string.h>
#include <iostream>
#include <fstream>
#include "../Landscape/ls.h"
#include "../BatchALMaSS/PopulationManager.h"
#include "../Partridge/Partridge_Communication.h"
#include "../Partridge/Partridge_All.h"
#include "../Partridge/Partridge_Population_Manager.h"
#include "../Partridge/Partridge_Covey.h"
#include "../BatchALMaSS/BoostRandomGenerators.h"
#include "../BatchALMaSS/AOR_Probe.h"

Go to the source code of this file.

Functions

void FloatToDouble (double &, float)
 

Variables

double g_par_rainfactor
 
double g_FoodNeed [200]
 
int g_MaxWalk [200]
 
const int DissolveChance [40]
 
CfgInt cfg_pm_eventfrequency
 
CfgInt cfg_pm_eventsize
 
CfgInt cfg_par_start_dissolve
 The earliest covey dissolve date. More...
 
CfgInt cfg_par_last_brood_date
 Latest date for a reproduction attempt. More...
 
CfgInt cfg_par_max_terr_qual
 The minimum territory quality needed in early season. More...
 
CfgInt cfg_par_min_terr_qual
 The minimum territory quality needed in late season. More...
 
CfgBool cfg_ReallyBigOutputMonthly_used
 
CfgBool cfg_RipleysOutput_used
 
CfgBool cfg_AOROutput_used
 
CfgInt cfg_nest_hedgebank0
 Nesting quality for hedgebank type 0. More...
 
CfgInt cfg_nest_hedgebank1
 Nesting quality for hedgebank type 1. More...
 
CfgInt cfg_nest_hedgebank2
 Nesting quality for hedgebank type 2. More...
 
CfgInt cfg_par_male_gives_up
 Latest date a male will mate search. More...
 
CfgInt cfg_par_mature_threshold
 Age at maturing in days. More...
 
CfgBool cfg_ReallyBigOutput_used
 
CfgBool cfg_BeetleBankInvert
 
CfgInt cfg_BeetleBankMinX
 
CfgInt cfg_BeetleBankMaxX
 
CfgInt cfg_BeetleBankMinY
 
CfgInt cfg_BeetleBankMaxY
 
static CfgFloat cfg_par_rainfactor ("PAR_RAINFACTOR", CFG_CUSTOM, 0.2)
 Increase in energy requirement with rainfall. More...
 
static CfgFloat cfg_rainscaling ("PAR_RAINSCALING", CFG_CUSTOM, 0.767)
 Correction for using rainfall penalty. More...
 
static CfgInt cfg_springcensusdate ("PAR_SPRINGCENSUSDATE", CFG_CUSTOM, March+21)
 Probe date. More...
 
static CfgInt cfg_Emigration ("PAR_EMIGRATION", CFG_CUSTOM, 1)
 Loss due to emmigration (out of 10000) More...
 
CfgInt cfg_IndividualEmigration ("PAR_INDIVIDUALEMIGRATION", CFG_CUSTOM, 3500)
 Emigration rate of alone individuals (of 10000) More...
 
static CfgInt cfg_MaleImmigration ("PAR_MALEIMMIGRATION", CFG_CUSTOM, 0)
 unused More...
 
static CfgInt cfg_ParHuntingThreshold ("PAR_HUNTINGTHRESHOLD", CFG_CUSTOM, 1)
 Number of birds at which hunting starts. More...
 
static CfgInt cfg_ParHuntingGridSize ("PAR_HUNTINGGRIDSIZE", CFG_CUSTOM, 1000)
 Size if hunting grid (m) More...
 
static CfgInt cfg_ParHuntingType ("PAR_HUNTINGTYPE", CFG_CUSTOM, 1)
 0 if global hunting, else threshold More...
 
static CfgInt cfg_ParShootStartYear ("PAR_SHOOTSTARTYEAR", CFG_CUSTOM, 1)
 First year with hunting. More...
 
static CfgInt cfg_ParShotMin ("PAR_SHOTPERCENTAGE_MIN", CFG_CUSTOM, 1500)
 Minimum% shot. More...
 
static CfgInt cfg_ParShotMax ("PAR_SHOTPERCENTAGE_MAX", CFG_CUSTOM, 1500)
 Maximum% shot. More...
 
static CfgFloat cfg_HindranceScalingFactor ("PAR_HINDRANCE_SCALING", CFG_CUSTOM, 1000)
 Used to scale biomass hindrance. More...
 
static CfgInt cfg_StartingNumberMalePartridges ("PAR_STARTING_NO_MALES", CFG_CUSTOM, 10000)
 Start no of male partridges. More...
 
static CfgInt cfg_StartingNumberFemalePartridges ("PAR_STARTING_NO_FEMALES", CFG_CUSTOM, 10000)
 Start no of female partridges. More...
 
static CfgInt cfg_FemalePopSizeMaxCutoff ("PAR_FEMMAXPOPSIZECUTOFF", CFG_CUSTOM, 7000)
 Point at which the simulation is terminated due to excessive population size. More...
 
static CfgFloat cfg_par_energyslope_perday ("PAR_ENERGYSLOPE_PERDAY", CFG_CUSTOM, 1.06)
 Slope of linear increase in energy needs of chicks. More...
 
static CfgInt cfg_flockdata_date ("PAR_FLOCKDATA_DATE", CFG_CUSTOM, 270)
 Date when birds start to flock. More...
 
static CfgInt cfg_breedingpairs_date ("PAR_BREEDINGPAIRS_DATE", CFG_CUSTOM, 90)
 Probe date. More...
 
static CfgInt cfg_unpaireddata_date ("PAR_UNPAIREDDATA_DATE", CFG_CUSTOM, 150)
 Probe date. More...
 
static CfgInt cfg_kfactoroutput_date ("PAR_KFACTOROUTPUT_DATE", CFG_CUSTOM, 90)
 Probe date. More...
 
CfgInt cfg_ParHuntingBeetleBankArea ("PAR_HUNTING_BEETLEBANKAREA", CFG_CUSTOM, 500)
 The hunting rate in beetle bank areas. More...
 

Detailed Description

Partridge_Population_Manager.cpp This file contains the code for the partridge population manager class

by Chris J. Topping
Version of 15th October 2008
All rights reserved.

Doxygen formatted comments in October 2008
Code by Chris Topping

Definition in file Partridge_Population_Manager.cpp.

Function Documentation

◆ FloatToDouble()

void FloatToDouble ( double &  ,
float   
)

Variable Documentation

◆ cfg_AOROutput_used

◆ cfg_BeetleBankInvert

◆ cfg_BeetleBankMaxX

◆ cfg_BeetleBankMaxY

◆ cfg_BeetleBankMinX

◆ cfg_BeetleBankMinY

◆ cfg_breedingpairs_date

CfgInt cfg_breedingpairs_date("PAR_BREEDINGPAIRS_DATE", CFG_CUSTOM, 90)
static

◆ cfg_Emigration

CfgInt cfg_Emigration("PAR_EMIGRATION", CFG_CUSTOM, 1)
static

Loss due to emmigration (out of 10000)

Referenced by Partridge_Population_Manager::DoFirst().

◆ cfg_FemalePopSizeMaxCutoff

CfgInt cfg_FemalePopSizeMaxCutoff("PAR_FEMMAXPOPSIZECUTOFF", CFG_CUSTOM, 7000)
static

Point at which the simulation is terminated due to excessive population size.

Referenced by Partridge_Population_Manager::DoFirst().

◆ cfg_flockdata_date

CfgInt cfg_flockdata_date("PAR_FLOCKDATA_DATE", CFG_CUSTOM, 270)
static

Date when birds start to flock.

Referenced by Partridge_Population_Manager::DoAlmostLast().

◆ cfg_HindranceScalingFactor

CfgFloat cfg_HindranceScalingFactor("PAR_HINDRANCE_SCALING", CFG_CUSTOM, 1000)
static

Used to scale biomass hindrance.

◆ cfg_IndividualEmigration

CfgInt cfg_IndividualEmigration("PAR_INDIVIDUALEMIGRATION", CFG_CUSTOM, 3500)

Emigration rate of alone individuals (of 10000)

Referenced by Partridge_Covey::CoveyIndividualEmigrate().

◆ cfg_kfactoroutput_date

CfgInt cfg_kfactoroutput_date("PAR_KFACTOROUTPUT_DATE", CFG_CUSTOM, 90)
static

Probe date.

◆ cfg_MaleImmigration

CfgInt cfg_MaleImmigration("PAR_MALEIMMIGRATION", CFG_CUSTOM, 0)
static

◆ cfg_nest_hedgebank0

CfgInt cfg_nest_hedgebank0

◆ cfg_nest_hedgebank1

CfgInt cfg_nest_hedgebank1

◆ cfg_nest_hedgebank2

CfgInt cfg_nest_hedgebank2

◆ cfg_par_energyslope_perday

CfgFloat cfg_par_energyslope_perday("PAR_ENERGYSLOPE_PERDAY", CFG_CUSTOM, 1.06)
static

Slope of linear increase in energy needs of chicks.

Referenced by Partridge_Population_Manager::FillInFoodArray().

◆ cfg_par_last_brood_date

CfgInt cfg_par_last_brood_date

◆ cfg_par_male_gives_up

CfgInt cfg_par_male_gives_up

Latest date a male will mate search.

Referenced by Partridge_Population_Manager::DoFirst(), and Partridge_Population_Manager::TestShouldFlock().

◆ cfg_par_mature_threshold

CfgInt cfg_par_mature_threshold

◆ cfg_par_max_terr_qual

CfgInt cfg_par_max_terr_qual

The minimum territory quality needed in early season.

Referenced by Partridge_Population_Manager::Init().

◆ cfg_par_min_terr_qual

CfgInt cfg_par_min_terr_qual

The minimum territory quality needed in late season.

Referenced by Partridge_Population_Manager::Init().

◆ cfg_par_rainfactor

CfgFloat cfg_par_rainfactor("PAR_RAINFACTOR", CFG_CUSTOM, 0.2)
static

Increase in energy requirement with rainfall.

Referenced by Partridge_Population_Manager::Init().

◆ cfg_par_start_dissolve

◆ cfg_ParHuntingBeetleBankArea

CfgInt cfg_ParHuntingBeetleBankArea("PAR_HUNTING_BEETLEBANKAREA", CFG_CUSTOM, 500)

The hunting rate in beetle bank areas.

Referenced by Partridge_Population_Manager::HuntingDifferentiatedBeetleBankArea().

◆ cfg_ParHuntingGridSize

CfgInt cfg_ParHuntingGridSize("PAR_HUNTINGGRIDSIZE", CFG_CUSTOM, 1000)
static

Size if hunting grid (m)

Referenced by Partridge_Population_Manager::HuntingGrid().

◆ cfg_ParHuntingThreshold

CfgInt cfg_ParHuntingThreshold("PAR_HUNTINGTHRESHOLD", CFG_CUSTOM, 1)
static

Number of birds at which hunting starts.

Referenced by Partridge_Population_Manager::HuntingGrid().

◆ cfg_ParHuntingType

CfgInt cfg_ParHuntingType("PAR_HUNTINGTYPE", CFG_CUSTOM, 1)
static

0 if global hunting, else threshold

Referenced by Partridge_Population_Manager::DoAfter().

◆ cfg_ParShootStartYear

CfgInt cfg_ParShootStartYear("PAR_SHOOTSTARTYEAR", CFG_CUSTOM, 1)
static

First year with hunting.

Referenced by Partridge_Population_Manager::DoAfter().

◆ cfg_ParShotMax

CfgInt cfg_ParShotMax("PAR_SHOTPERCENTAGE_MAX", CFG_CUSTOM, 1500)
static

Maximum% shot.

Referenced by Partridge_Population_Manager::DoAfter().

◆ cfg_ParShotMin

CfgInt cfg_ParShotMin("PAR_SHOTPERCENTAGE_MIN", CFG_CUSTOM, 1500)
static

Minimum% shot.

Referenced by Partridge_Population_Manager::DoAfter().

◆ cfg_pm_eventfrequency

CfgInt cfg_pm_eventfrequency

◆ cfg_pm_eventsize

CfgInt cfg_pm_eventsize

◆ cfg_rainscaling

CfgFloat cfg_rainscaling("PAR_RAINSCALING", CFG_CUSTOM, 0.767)
static

Correction for using rainfall penalty.

Referenced by Partridge_Population_Manager::FillInFoodArray().

◆ cfg_ReallyBigOutput_used

◆ cfg_ReallyBigOutputMonthly_used

CfgBool cfg_ReallyBigOutputMonthly_used

◆ cfg_RipleysOutput_used

◆ cfg_springcensusdate

CfgInt cfg_springcensusdate("PAR_SPRINGCENSUSDATE", CFG_CUSTOM, March+21)
static

Probe date.

Referenced by Partridge_Population_Manager::DoFirst().

◆ cfg_StartingNumberFemalePartridges

CfgInt cfg_StartingNumberFemalePartridges("PAR_STARTING_NO_FEMALES", CFG_CUSTOM, 10000)
static

Start no of female partridges.

Referenced by Partridge_Population_Manager::Init().

◆ cfg_StartingNumberMalePartridges

CfgInt cfg_StartingNumberMalePartridges("PAR_STARTING_NO_MALES", CFG_CUSTOM, 10000)
static

Start no of male partridges.

Referenced by Partridge_Population_Manager::Init().

◆ cfg_unpaireddata_date

CfgInt cfg_unpaireddata_date("PAR_UNPAIREDDATA_DATE", CFG_CUSTOM, 150)
static

◆ DissolveChance

const int DissolveChance[40]
Initial value:
=
{
0, 381, 1123, 2205, 3609, 5314, 7300, 9548, 12036, 14746, 17657, 20749, 24003, 27399, 30916, 3453, 38235, 41997, 45801,
49626, 53454, 57263, 61035, 64748, 68383, 71921, 75341, 78623, 81747, 84694, 87443, 89974, 92268, 94305, 96064, 97525,
98670, 99477, 99927, 100000
}

Definition at line 71 of file Partridge_Population_Manager.cpp.

◆ g_FoodNeed

◆ g_MaxWalk

◆ g_par_rainfactor

double g_par_rainfactor