Goose Management Model ODdox  1.02
Hunters_all.cpp File Reference

The code file for all hunter types and population manager class More...

#include <math.h>
#include <iostream>
#include <fstream>
#include <vector>
#include <list>
#include "../Landscape/ls.h"
#include "../BatchALMaSS/PopulationManager.h"
#include "../GooseManagement/GooseMemoryMap.h"
#include "../GooseManagement/Goose_Base.h"
#include "../BatchALMaSS/CurveClasses.h"
#include "../Hunters/Hunters_all.h"
#include "../GooseManagement/Goose_Population_Manager.h"
#include "../GooseManagement/GoosePinkFooted_All.h"
#include "../GooseManagement/GooseGreylag_All.h"
#include "../GooseManagement/GooseBarnacle_All.h"
#include "../BatchALMaSS/BoostRandomGenerators.h"

Go to the source code of this file.

Macros

#define __DEBUG_DENSITY
 

Variables

CfgInt cfg_goose_greylagopenseasonend
 The end of the greylag hunting season. More...
 
CfgInt cfg_goose_greylagopenseasonstart
 The start of the greylag hunting season. More...
 
CfgFloat cfg_goose_MinForageOpenness
 The minimum openness score that a goose will tolerate for foraging. More...
 
CfgInt cfg_goose_pinkfootopenseasonend
 The end of the pinkfoot hunting season. More...
 
CfgInt cfg_goose_pinkfootopenseasonstart
 The start of the pinkfoot hunting season. More...
 
static CfgInt cfg_gooseopenseasonend ("GOOSE_OPENSEASON_END", CFG_CUSTOM, 364)
 The end of the goose open season. Legal values are 0 to 364. More...
 
static CfgInt cfg_gooseopenseasonstart ("GOOSE_OPENSEASON_START", CFG_CUSTOM, 243)
 The start of the goose open season. More...
 
static CfgInt cfg_hunter_greylagbaglimit ("HUNTER_GREYLAGBAGLIMIT", CFG_CUSTOM, 9999)
 The greylag hunting bag limit. More...
 
static CfgInt cfg_hunter_magazinecapacity ("HUNTER_MAGAZINECAPACITY", CFG_CUSTOM, 2)
 The number of shots a hunter can take per shooting event. More...
 
static CfgInt cfg_hunter_pinkfootbaglimit ("HUNTER_PINKFOOTBAGLIMIT", CFG_CUSTOM, 9999)
 The pinkfoot hunting bag limit. More...
 
static CfgFloat cfg_hunterhuntdayprobscaler ("HUNTER_HUNTDAYPROBSCALER", CFG_CUSTOM, 2.0)
 Hedging bets scaler to the probability of going hunting on a particular day. More...
 
static CfgFloat cfg_hunterlocFOUR ("HUNTERS_HUNTERLOCPROB_FOUR", CFG_CUSTOM, 0.854)
 The cumulative probability of hunters having up to 4 hunter locations. More...
 
static CfgFloat cfg_hunterlocONE ("HUNTERS_HUNTERLOCPROB_ONE", CFG_CUSTOM, 0.297)
 The probability of hunters having one hunter location. More...
 
static CfgFloat cfg_hunterlocTHREE ("HUNTERS_HUNTERLOCPROB_THREE", CFG_CUSTOM, 0.806)
 The cumulative probability of hunters having up to 3 hunter locations. More...
 
static CfgFloat cfg_hunterlocTWO ("HUNTERS_HUNTERLOCPROB_TWO", CFG_CUSTOM, 0.616)
 The cumulative probability of hunters having up to 2 hunter locations. More...
 
static CfgFloat cfg_huntermaxprotectedpct ("HUNTER_MAXPROTECTECTEDPCT", CFG_CUSTOM, 0.1)
 The proportion of protected species in a flock above which there is no shooting
More...
 
static CfgInt cfg_hunterrefractionperiod ("HUNTER_REFRACTIONPERIOD", CFG_CUSTOM, 7)
 The number of days rest between going hunting. More...
 
static CfgBool cfg_Hunters_Distribute ("HUNTERS_DISTRIBUTE", CFG_CUSTOM, false)
 Should we enter hunter distribution mode? More...
 
static CfgInt cfg_Hunters_Distribute_NonResRuleset ("HUNTERS_DISTRIBUTE_NONRESRULESET", CFG_CUSTOM, 0)
 The rule set to use for distributing non-resident hunters. More...
 
static CfgInt cfg_Hunters_Distribute_Ruleset ("HUNTERS_DISTRIBUTE_RULESET", CFG_CUSTOM, 0)
 The rule set to use for distributing hunters. More...
 
static CfgFloat cfg_Hunters_MaxDensity ("HUNTERS_MAXDENSITY", CFG_CUSTOM, 0.1)
 Maximum hunter density per ha. More...
 
static CfgFloat cfg_Hunters_MaxDensityPower ("HUNTERS_MAXDENSITYPOWER", CFG_CUSTOM, 0.741)
 Maximum hunter density per ha - power parameter. More...
 
static CfgInt cfg_Hunters_NonresidentPct ("HUNTERS_NONRESIDENTPCT", CFG_CUSTOM, 30)
 Number of hunters living out of area as a percentage of local hunters. More...
 
static CfgBool cfg_Hunters_RecordBag ("HUNTERS_RECORDBAG", CFG_CUSTOM, false)
 Should we record the birds shot? More...
 
static CfgInt cfg_huntlength ("GOOSE_HUNTER_HUNT_LENGTH", CFG_CUSTOM, 180)
 The default length of hunting. More...
 
static CfgFloat cfg_largefieldgooseproximity ("HUNTER_LARGEFIELDGOOSEPROXIMITYCHANCE", CFG_CUSTOM, 0.5)
 The likelihood that geese are close enough to shoot on large fields
More...
 
static CfgInt cfg_largefieldgooseproximitysizecutoff ("HUNTER_LARGEFIELDGOOSEPROXIMITYCHANCESIZECUTOFF", CFG_CUSTOM, 20000)
 The size of the field which will trigger the use of cfg_largefieldgooseproximity. More...
 
PopulationManagerList g_PopulationManagerList
 
boost::variate_generator< base_generator_type &, boost::uniform_real<> > g_rand_uni
 
boost::variate_generator< base_generator_type &, boost::uniform_int<> > g_rand_uni2
 

Detailed Description

The code file for all hunter types and population manager class

Version of 10 October 2013.
By Chris J. Topping

Definition in file Hunters_all.cpp.

Macro Definition Documentation

◆ __DEBUG_DENSITY

#define __DEBUG_DENSITY

Definition at line 34 of file Hunters_all.cpp.

Variable Documentation

◆ cfg_goose_greylagopenseasonend

CfgInt cfg_goose_greylagopenseasonend

The end of the greylag hunting season.

Referenced by Goose_Population_Manager::InHuntingSeason(), and Hunter_Population_Manager::SetHuntingSeason().

◆ cfg_goose_greylagopenseasonstart

CfgInt cfg_goose_greylagopenseasonstart

The start of the greylag hunting season.

Referenced by Goose_Population_Manager::InHuntingSeason(), and Hunter_Population_Manager::SetHuntingSeason().

◆ cfg_goose_MinForageOpenness

◆ cfg_goose_pinkfootopenseasonend

CfgInt cfg_goose_pinkfootopenseasonend

The end of the pinkfoot hunting season.

Referenced by Goose_Population_Manager::InHuntingSeason(), and Hunter_Population_Manager::SetHuntingSeason().

◆ cfg_goose_pinkfootopenseasonstart

CfgInt cfg_goose_pinkfootopenseasonstart

The start of the pinkfoot hunting season.

Referenced by Goose_Population_Manager::InHuntingSeason(), and Hunter_Population_Manager::SetHuntingSeason().

◆ cfg_gooseopenseasonend

CfgInt cfg_gooseopenseasonend("GOOSE_OPENSEASON_END", CFG_CUSTOM, 364)
static

The end of the goose open season. Legal values are 0 to 364.

◆ cfg_gooseopenseasonstart

CfgInt cfg_gooseopenseasonstart("GOOSE_OPENSEASON_START", CFG_CUSTOM, 243)
static

The start of the goose open season.

◆ cfg_hunter_greylagbaglimit

CfgInt cfg_hunter_greylagbaglimit("HUNTER_GREYLAGBAGLIMIT", CFG_CUSTOM, 9999)
static

The greylag hunting bag limit.

Referenced by GooseHunter::GooseHunter().

◆ cfg_hunter_magazinecapacity

CfgInt cfg_hunter_magazinecapacity("HUNTER_MAGAZINECAPACITY", CFG_CUSTOM, 2)
static

The number of shots a hunter can take per shooting event.

Referenced by Hunter::Init().

◆ cfg_hunter_pinkfootbaglimit

CfgInt cfg_hunter_pinkfootbaglimit("HUNTER_PINKFOOTBAGLIMIT", CFG_CUSTOM, 9999)
static

The pinkfoot hunting bag limit.

Referenced by GooseHunter::GooseHunter().

◆ cfg_hunterhuntdayprobscaler

CfgFloat cfg_hunterhuntdayprobscaler("HUNTER_HUNTDAYPROBSCALER", CFG_CUSTOM, 2.0)
static

Hedging bets scaler to the probability of going hunting on a particular day.

Referenced by Hunter::IsTodayAChosenHuntDay().

◆ cfg_hunterlocFOUR

CfgFloat cfg_hunterlocFOUR("HUNTERS_HUNTERLOCPROB_FOUR", CFG_CUSTOM, 0.854)
static

The cumulative probability of hunters having up to 4 hunter locations.

Referenced by Hunter_Population_Manager::GetNoHuntLocs().

◆ cfg_hunterlocONE

CfgFloat cfg_hunterlocONE("HUNTERS_HUNTERLOCPROB_ONE", CFG_CUSTOM, 0.297)
static

The probability of hunters having one hunter location.

Referenced by Hunter_Population_Manager::GetNoHuntLocs().

◆ cfg_hunterlocTHREE

CfgFloat cfg_hunterlocTHREE("HUNTERS_HUNTERLOCPROB_THREE", CFG_CUSTOM, 0.806)
static

The cumulative probability of hunters having up to 3 hunter locations.

Referenced by Hunter_Population_Manager::GetNoHuntLocs().

◆ cfg_hunterlocTWO

CfgFloat cfg_hunterlocTWO("HUNTERS_HUNTERLOCPROB_TWO", CFG_CUSTOM, 0.616)
static

The cumulative probability of hunters having up to 2 hunter locations.

Referenced by Hunter_Population_Manager::GetNoHuntLocs().

◆ cfg_huntermaxprotectedpct

CfgFloat cfg_huntermaxprotectedpct("HUNTER_MAXPROTECTECTEDPCT", CFG_CUSTOM, 0.1)
static

The proportion of protected species in a flock above which there is no shooting

◆ cfg_hunterrefractionperiod

CfgInt cfg_hunterrefractionperiod("HUNTER_REFRACTIONPERIOD", CFG_CUSTOM, 7)
static

The number of days rest between going hunting.

Referenced by Hunter::IsTodayAPreferredHuntDay().

◆ cfg_Hunters_Distribute

CfgBool cfg_Hunters_Distribute("HUNTERS_DISTRIBUTE", CFG_CUSTOM, false)
static

Should we enter hunter distribution mode?

Referenced by Hunter_Population_Manager::Hunter_Population_Manager().

◆ cfg_Hunters_Distribute_NonResRuleset

CfgInt cfg_Hunters_Distribute_NonResRuleset("HUNTERS_DISTRIBUTE_NONRESRULESET", CFG_CUSTOM, 0)
static

The rule set to use for distributing non-resident hunters.

◆ cfg_Hunters_Distribute_Ruleset

CfgInt cfg_Hunters_Distribute_Ruleset("HUNTERS_DISTRIBUTE_RULESET", CFG_CUSTOM, 0)
static

◆ cfg_Hunters_MaxDensity

CfgFloat cfg_Hunters_MaxDensity("HUNTERS_MAXDENSITY", CFG_CUSTOM, 0.1)
static

◆ cfg_Hunters_MaxDensityPower

CfgFloat cfg_Hunters_MaxDensityPower("HUNTERS_MAXDENSITYPOWER", CFG_CUSTOM, 0.741)
static

Maximum hunter density per ha - power parameter.

◆ cfg_Hunters_NonresidentPct

CfgInt cfg_Hunters_NonresidentPct("HUNTERS_NONRESIDENTPCT", CFG_CUSTOM, 30)
static

Number of hunters living out of area as a percentage of local hunters.

◆ cfg_Hunters_RecordBag

CfgBool cfg_Hunters_RecordBag("HUNTERS_RECORDBAG", CFG_CUSTOM, false)
static

◆ cfg_huntlength

CfgInt cfg_huntlength("GOOSE_HUNTER_HUNT_LENGTH", CFG_CUSTOM, 180)
static

The default length of hunting.

Referenced by GooseHunter::st_OutHunting().

◆ cfg_largefieldgooseproximity

CfgFloat cfg_largefieldgooseproximity("HUNTER_LARGEFIELDGOOSEPROXIMITYCHANCE", CFG_CUSTOM, 0.5)
static

The likelihood that geese are close enough to shoot on large fields

Referenced by GooseHunter::st_OutHunting().

◆ cfg_largefieldgooseproximitysizecutoff

CfgInt cfg_largefieldgooseproximitysizecutoff("HUNTER_LARGEFIELDGOOSEPROXIMITYCHANCESIZECUTOFF", CFG_CUSTOM, 20000)
static

The size of the field which will trigger the use of cfg_largefieldgooseproximity.

Referenced by GooseHunter::st_OutHunting().

◆ g_PopulationManagerList

PopulationManagerList g_PopulationManagerList

◆ g_rand_uni

boost::variate_generator<base_generator_type&, boost::uniform_real<> > g_rand_uni

◆ g_rand_uni2

boost::variate_generator<base_generator_type&, boost::uniform_int<> > g_rand_uni2