ALMaSS Partridge ODdox  1.1
The partridge model description following ODdox protocol
Partridge_Female Class Reference

The partridge female class. More...

#include <Partridge_All.h>

Inheritance diagram for Partridge_Female:
Partridge_Base TAnimal TALMaSSObject

Public Member Functions

virtual void Dying ()
 General dying handler area. More...
 
virtual void BeginStep (void)
 Female BeginStep. More...
 
virtual void Step (void)
 Female Step. More...
 
virtual void EndStep (void)
 Female EndStep. More...
 
virtual bool DailyMortality ()
 Background mortality check. More...
 
virtual bool OnFarmEvent (FarmToDo event)
 Management event handler. More...
 
void OnMateDying (PartridgeCommunicationData *pc_data)
 Message handler. More...
 
void OnClutchDeath ()
 Message handler. More...
 
void OnClutchMown ()
 Message handler. More...
 
void OnSetMyClutch (PartridgeCommunicationData *pc_data)
 Message handler. More...
 
void OnChicksMatured ()
 Message handler. More...
 
void OnChicksDead ()
 Message handler. More...
 
void OnMating (PartridgeCommunicationData *pc_datae)
 Message handler. More...
 
void OnWaitForMale ()
 Message handler. More...
 
void OnEggsHatch ()
 Message handler. More...
 
int GetClutchSize (void)
 ´Supply clutch size More...
 
Partridge_ClutchGetClutch (void)
 Supply clutch pointer. More...
 
Partridge_MaleGetMate (void)
 Supply mate pointer. More...
 
void UnSetMate (void)
 Forget mate. More...
 
virtual bool ArePaired ()
 Are we paired? More...
 
virtual void KillThis ()
 Direct mortality message. More...
 
Partridge_MaleGetOldMate (void)
 Supply old mate pointer. More...
 
void SetOldMate (Partridge_Male *pm)
 Set old mate pointer. More...
 
void RemoveOldMate (bool a_knockon)
 Forget old mate. More...
 
 Partridge_Female (int a_born_x, int a_born_y, int a_x, int a_y, Partridge_Covey *a_flock, Landscape *a_map, int a_family_counter, Partridge_Population_Manager *a_manager)
 Constructor. More...
 
virtual ~Partridge_Female (void)
 Destructor. More...
 
bool HaveTerritory (void)
 Have we a breeding 'territory'? More...
 
- Public Member Functions inherited from Partridge_Base
Partridge_Object GetObjectType ()
 Supply object type. More...
 
bool GetUncleStatus ()
 Supply uncle status. More...
 
void SetUncleStatus (bool a_Status)
 Set uncle status. More...
 
bool PossibleMate (Partridge_Base *a_partridge)
 Can we mate? More...
 
Partridge_CoveyGetCovey (void)
 Supply covey pointer. More...
 
Partridge_State GetState (void)
 Supply state. More...
 
void SetState (Partridge_State a_pars)
 Set state. More...
 
int GetFamily (void)
 Supply family ID. More...
 
int GetAge (void)
 Supply age. More...
 
void SetAge (int a_age)
 Set age. More...
 
long GetID (void)
 Supply ID. More...
 
void SetFamily (unsigned int family)
 Set family ID. More...
 
void SetCovey (Partridge_Covey *a_covey)
 Set covey pointer. More...
 
void MakeCovey ()
 Create our own covey. More...
 
void SwitchCovey (Partridge_Covey *a_covey)
 Swap coveys. More...
 
 Partridge_Base (int a_born_x, int a_born_y, int a_x, int a_y, int a_family_counter, Partridge_Covey *a_covey, Landscape *a_map, Partridge_Population_Manager *a_manager)
 Constructor for Partridge_Base. More...
 
virtual ~Partridge_Base (void)
 Destructor. More...
 
virtual void CopyMyself (int a_Ptype)
 Duplicate this object. More...
 
- Public Member Functions inherited from TAnimal
unsigned SupplyFarmOwnerRef ()
 
AnimalPosition SupplyPosition ()
 
APoint SupplyPoint ()
 
int SupplyPolygonRef ()
 
int Supply_m_Location_x ()
 
int Supply_m_Location_y ()
 
virtual void CopyMyself ()
 
void SetX (int a_x)
 
void SetY (int a_y)
 
 TAnimal (int x, int y, Landscape *L)
 
virtual void ReinitialiseObject (int x, int y, Landscape *L)
 Used to re-use an object - must be implemented in descendent classes. More...
 
virtual int WhatState ()
 
void CheckManagement (void)
 
void CheckManagementXY (int x, int y)
 
- Public Member Functions inherited from TALMaSSObject
int GetCurrentStateNo ()
 Returns the current state number. More...
 
void SetCurrentStateNo (int a_num)
 Sets the current state number. More...
 
bool GetStepDone ()
 Returns the step done indicator flag. More...
 
void SetStepDone (bool a_bool)
 Sets the step done indicator flag. More...
 
virtual void ReinitialiseObject ()
 Used to re-use an object - must be implemented in descendent classes. More...
 
 TALMaSSObject ()
 The constructor for TALMaSSObject. More...
 
virtual ~TALMaSSObject ()
 The destructor for TALMaSSObject. More...
 
void OnArrayBoundsError ()
 Used for debugging only, tests basic object properties. More...
 

Protected Member Functions

Partridge_State FFlocking (void)
 Female flocking state. More...
 
Partridge_State FPairing (void)
 Female pairing state. More...
 
Partridge_State FBuildingUpResources (void)
 Female building up resources state. More...
 
Partridge_State FMakingNest (void)
 Female making nest state. More...
 
Partridge_State FLaying (void)
 Female laying state. More...
 
Partridge_State FStartingNewBrood (bool a_waslaying)
 Female starting new brood state. More...
 
Partridge_State FIncubating (void)
 Female incubating state. More...
 
Partridge_State FCaringForYoung (void)
 Female caring for young state. More...
 
Partridge_State FFindingTerritory (void)
 Female finding 'territory' state. More...
 
Partridge_State FAttractingMate (void)
 Female attracting mate state. More...
 
void FDying (void)
 
virtual void CheckMatePointers ()
 Debug function - checking mate consistency
More...
 
double GetNestingCoverDensity ()
 Calls Partridge_Population_Manager::GetNestingCoverDensity
More...
 
- Protected Member Functions inherited from TAnimal
void CorrectWrapRound ()
 Corrects wrap around co-ordinate problems. More...
 

Protected Attributes

bool m_HaveTerritory
 Flag for having found a suitable breeding area. More...
 
bool m_clutchproduced
 Flag for having produced a clutch. More...
 
int m_clutch_size
 Current clutch size. More...
 
int m_clutch_number
 Current clutch attempt. More...
 
int m_nest_counter
 Days spent nest building. More...
 
int m_lifespan
 Physiological lifespan in days. More...
 
int m_triggerlayingvar
 Adds stochasticity to the light triggering of breeding. More...
 
int m_startlayingday
 Records the day laying started. More...
 
int m_buildupwait
 Delay before breeding can commence. More...
 
Partridge_Malem_MyMate
 A pointer to the current mate if any. More...
 
Partridge_Malem_MyOldHusband
 A record of the previous mate if any. More...
 
Partridge_Clutchm_MyClutch
 A pointer to any current clutch. More...
 
- Protected Attributes inherited from Partridge_Base
int m_signal
 Used to pass information to outputs. More...
 
long m_id
 Individual bird ID. More...
 
int m_family_counter
 Family ID. More...
 
int m_age
 Age in days. More...
 
int m_born_x
 x-coord of birth More...
 
int m_born_y
 y-coord of birth More...
 
bool m_UncleStatus
 If has uncle status in the covey. More...
 
Partridge_Object m_object_type
 Type of pob object this is. More...
 
Partridge_Coveym_covey
 Pointer to the covey. More...
 
Partridge_State m_state
 Current behavioural state. More...
 
- Protected Attributes inherited from TAnimal
int m_Location_x
 
int m_Location_y
 
Landscapem_OurLandscape
 
- Protected Attributes inherited from TALMaSSObject
int m_CurrentStateNo
 The basic state number for all objects - '-1' indicates death. More...
 
bool m_StepDone
 Indicates whether the iterative step code is done for this timestep. More...
 

Additional Inherited Members

- Public Attributes inherited from Partridge_Base
Partridge_Population_Managerm_OurPopulationManager
 Pointer to the population manager. More...
 

Detailed Description

The partridge female class.

Definition at line 770 of file Partridge_All.h.

Constructor & Destructor Documentation

◆ Partridge_Female()

Partridge_Female::Partridge_Female ( int  a_born_x,
int  a_born_y,
int  a_x,
int  a_y,
Partridge_Covey a_covey,
Landscape a_map,
int  a_family_counter,
Partridge_Population_Manager a_manager 
)

Constructor.

Constructor - ensures that attributes are set to sensible starting values, otherwise uses the Partridge_Base constructor.

Definition at line 1334 of file Partridge_All.cpp.

1335  :
1336  Partridge_Base( a_born_x, a_born_y, a_x, a_y, a_family_counter, a_covey, a_map, a_manager )
1337  {
1338  m_MyMate = NULL;
1339  m_HaveTerritory = false;
1341  m_MyOldHusband=NULL;
1342  m_MyClutch = NULL;
1343  m_clutch_size = 0;
1346 }

References cfg_par_max_lifespan, cfg_par_min_lifespan, cfg_par_triggerlayingvar, m_clutch_size, m_HaveTerritory, m_lifespan, m_MyClutch, m_MyMate, m_MyOldHusband, Partridge_Base::m_object_type, m_triggerlayingvar, pob_Female, and CfgInt::value().

◆ ~Partridge_Female()

virtual Partridge_Female::~Partridge_Female ( void  )
inlinevirtual

Destructor.

Definition at line 917 of file Partridge_All.h.

917 {;}

Member Function Documentation

◆ ArePaired()

virtual bool Partridge_Female::ArePaired ( )
inlinevirtual

Are we paired?

Reimplemented from Partridge_Base.

Definition at line 882 of file Partridge_All.h.

882  {
883  if (m_MyMate!=NULL) return true;
884  return false;
885  }

References m_MyMate.

◆ BeginStep()

void Partridge_Female::BeginStep ( void  )
virtual

Female BeginStep.

The BeginStep code for the female partridge. Only function is the test for mortality of different kinds. Might as well remove her here than waste CPU time thinking about the Step code later this time-step.

Reimplemented from TAnimal.

Definition at line 1354 of file Partridge_All.cpp.

1355 {
1356  m_age++; // Get a day older
1357  if ( m_age >= m_lifespan )
1358  {
1359  m_signal = 0; // Too old
1360  FDying();
1361  }
1362  else if ( !DailyMortality() ) CheckManagement();
1363  else
1364  {
1365  m_signal = 1; // Killed
1366  }
1367 #ifdef __PAR_DEBUG
1369 #endif
1370 }

References TAnimal::CheckManagement(), CheckMatePointers(), DailyMortality(), FDying(), Partridge_Base::m_age, m_lifespan, and Partridge_Base::m_signal.

◆ CheckMatePointers()

void Partridge_Female::CheckMatePointers ( )
protectedvirtual

Debug function - checking mate consistency

This is a debug function.

Reimplemented from Partridge_Base.

Definition at line 2827 of file Partridge_All.cpp.

2828 {
2829  //**CJT** DEBUG
2830  if ( m_MyMate )
2831  {
2832  // Check for mutual pointers here
2833  if ( m_MyMate->GetMate() != this )
2834  {
2835  m_OurLandscape->Warn( "Partridge_Female::CheckMatePointers(): ""Non-mutual mate pointers", "" );
2836  exit( 1 );
2837  }
2838  if ( m_state == pars_FFlocking )
2839  {
2840  m_OurLandscape->Warn( "Partridge_Female::CheckMatePointers(): ""Mated & Flocking", "" );
2841 
2842  exit( 1 );
2843  }
2844  if ( m_MyMate->GetCurrentStateNo() == -1 )
2845  {
2846  m_OurLandscape->Warn( "Partridge_Female::CheckMatePointers(): ""Dead Mate", "" );
2847  exit( 1 );
2848  }
2849  }
2850 }

References TALMaSSObject::GetCurrentStateNo(), Partridge_Male::GetMate(), m_MyMate, TAnimal::m_OurLandscape, Partridge_Base::m_state, pars_FFlocking, and Landscape::Warn().

Referenced by BeginStep(), FBuildingUpResources(), FFindingTerritory(), FMakingNest(), FStartingNewBrood(), and Step().

◆ DailyMortality()

bool Partridge_Female::DailyMortality ( void  )
virtual

Background mortality check.

This method is responsible for applying a general mortality, ie not explicitly modelled. There are three periods considered, a spring mortality applied during 'territory' finding (see Partridge_Female::FFindingTerritory), a winter mortality applied daily between October and April, and the rest of the year a summer mortality. In addition there is a scaling factor (extramort) which is applied if the bird is alone. All parameter values are under user control through configuration variables.

Reimplemented from Partridge_Base.

Definition at line 1454 of file Partridge_All.cpp.

1455 {
1456  bool dead = false;
1457  double chance = g_rand_uni();
1458  double extramort=1.0;
1459  if ( m_covey->GetCoveySize() == 1 ) {
1461  }
1462  int today = m_OurLandscape->SupplyDayInYear();
1464  if ( chance < cfg_par_adult_mortalitySpring.value()*extramort ) dead = true;
1465  }
1466  else {
1467  // Is it winter?
1468  if ( ( today >= October ) || ( today < April ) ) {
1469  // We are in the "Winter Period"
1470  if ( chance < cfg_par_adult_mortalityWinter.value()*extramort ) dead = true;
1471  }
1472  else // Not winter and not finding territory
1473  {
1474  if ( chance < (cfg_par_adult_mortalitySummer.value()*extramort) ) dead = true;
1475  }
1476  }
1477  if ( dead ) {
1478  FDying();
1479  return true;
1480  }
1481  return false;
1482 }

References April, cfg_par_adult_mortality_alone, cfg_par_adult_mortalitySpring, cfg_par_adult_mortalitySummer, cfg_par_adult_mortalityWinter, FDying(), g_rand_uni, Partridge_Covey::GetCoveySize(), Partridge_Base::m_covey, TAnimal::m_OurLandscape, Partridge_Base::m_state, October, pars_FFindingTerritory, Landscape::SupplyDayInYear(), and CfgFloat::value().

Referenced by BeginStep().

◆ Dying()

virtual void Partridge_Female::Dying ( )
inlinevirtual

General dying handler area.

Reimplemented from TAnimal.

Definition at line 827 of file Partridge_All.h.

827  {
828  FDying();
829  }

References FDying().

◆ EndStep()

void Partridge_Female::EndStep ( void  )
virtual

Female EndStep.

Nothing to do.

Reimplemented from TAnimal.

Definition at line 1441 of file Partridge_All.cpp.

1442 {
1443 #ifdef __PAR_DEBUG
1444 #endif
1445 }

◆ FAttractingMate()

Partridge_State Partridge_Female::FAttractingMate ( void  )
protected

Female attracting mate state.

This just loops because it is the male who controls this. She will stay doing this until either she is pulled out by a male arriving or give up breeding date is reached.
During this period her covey peg is locked in position following Partridge_Female::FFindingTerritory, so she cannot be moved by other covies.

Definition at line 1962 of file Partridge_All.cpp.

1963 {
1969  {
1970  return pars_FAttractingMate;
1971  }
1972  else
1973  {
1974  // Unlock covey 'peg'.
1975  m_covey->SetFixed( false );
1976  return pars_FFlocking;
1977  }
1978 }

References Partridge_Base::m_covey, Partridge_Base::m_OurPopulationManager, pars_FAttractingMate, pars_FFlocking, Partridge_Covey::SetFixed(), and Partridge_Population_Manager::SupplyShouldFlock().

Referenced by Step().

◆ FBuildingUpResources()

Partridge_State Partridge_Female::FBuildingUpResources ( void  )
protected

Female building up resources state.

This is simply a waiting state where we assume the female is building up physiologial resources before breeding. Since we don't know what triggers this we origianlly used a fixed counter from the point were territory has been fixed. This produced variation in the starting laying date determined by when the pair fixes their breeding territory for this season. However this did not seem satisfactory so it has been replaced with a measure of daylength with variation.

Definition at line 1644 of file Partridge_All.cpp.

1645 {
1646 #ifdef __PAR_DEBUG
1648  /* if ( m_nest_counter < 1 ) { exit( 0 ); } */
1649 #endif
1650  // Note that with default settings the m_buildupwait is always gong to be 0 or less on calling this method.
1651  if (--m_buildupwait < 0) {
1652  // daylength que from when they start the covey dissolve
1653  // This could be altered to include bad weather delays
1655  {
1657  return pars_FMakingNest;
1658  }
1659  }
1661 }

References cfg_par_days_to_make_nest, cfg_par_triggerlaying, CheckMatePointers(), m_buildupwait, m_nest_counter, TAnimal::m_OurLandscape, m_triggerlayingvar, pars_FBuildingUpResources, pars_FMakingNest, Landscape::SupplyDaylength(), and CfgInt::value().

Referenced by Step().

◆ FCaringForYoung()

Partridge_State Partridge_Female::FCaringForYoung ( void  )
protected

Female caring for young state.

Will stay in this state until her young counter is zero - this is caused by messages from the young, so nothing to do but wait. Distance move is calculated as a function of chick food needs, so uses chick age.

Definition at line 1896 of file Partridge_All.cpp.

1897 {
1898  int ch_age = m_covey->GetChickAge();
1899  m_covey->MoveDistance( g_MaxWalk[ch_age], 10, 10000 );
1900  return pars_FCaringForYoung;
1901 }

References g_MaxWalk, Partridge_Covey::GetChickAge(), Partridge_Base::m_covey, Partridge_Covey::MoveDistance(), and pars_FCaringForYoung.

Referenced by Step().

◆ FDying()

void Partridge_Female::FDying ( void  )
protected

Must do all the clean-up necessary to remove the female from the simulation without leaving any stray pointers to this object.

Definition at line 1984 of file Partridge_All.cpp.

1985 {
1986  if ( m_CurrentStateNo == -1 ) return; // Don't kill me twice
1987  // Do I have kids? - dont' care - taken care of by covey
1988  // Do I have a clutch & mate, if so tell them
1993  m_MyMate = NULL;
1994  RemoveOldMate(false);
1995  m_CurrentStateNo = -1;
1996  m_StepDone = true;
1997  m_covey->NestLeave(); // Just in case this is not already done
1998  m_covey->RemoveMember( this );
2000  // Output as necessary
2002  //m_covey->SanityCheck2(m_covey->GetOurChicks() );
2003  // m_OurPopulationManager->WriteParAdMort( m_OurLandscape->SupplyGlobalDate(), m_age, 1, m_signal );
2004 }

References population_attributes::incNoDeadFemales(), PartridgeCommunicationData::m_clutch, Partridge_Population_Manager::m_comms_data, Partridge_Base::m_covey, TALMaSSObject::m_CurrentStateNo, PartridgeCommunicationData::m_female, PartridgeCommunicationData::m_male, Partridge_Population_Manager::m_messagecentre, m_MyClutch, m_MyMate, Partridge_Population_Manager::m_Ourkfactors, Partridge_Base::m_OurPopulationManager, Partridge_Base::m_state, TALMaSSObject::m_StepDone, k_factors::m_ThisYear, Partridge_Covey::NestLeave(), pars_Destroy, Partridge_Communication::PassMessage(), pcomm_MumDeadC, Partridge_Covey::RemoveMember(), and RemoveOldMate().

Referenced by BeginStep(), DailyMortality(), Dying(), FIncubating(), KillThis(), OnClutchMown(), and OnFarmEvent().

◆ FFindingTerritory()

Partridge_State Partridge_Female::FFindingTerritory ( void  )
protected

Female finding 'territory' state.

Territory here is used to mean a place where breeding is possible and not a territory in the normal definition of a defended area.

First we have to be sure we are not too late in the year, if so start flocking.
Next we make a movement using Partridge_Covey::FlyTo and determine the quality of the territory compared to a minimum acceptable quality.
Next we check whether this area is already occupied by a covey. If this is OK then we settle here. If we fail at any of these steps then we have 49 more tries in this time-step before giving up until the next day.

Definition at line 1912 of file Partridge_All.cpp.

1913 {
1914  // First check that we are not too late in the year
1916  if ( m_MyMate ) {
1920  m_MyMate = NULL;
1921  }
1922  m_covey->SetFixed( false ); // ensure we do not have a fixed territory loc
1923  return pars_FFlocking;
1924  }
1925  int steps = 0;
1926  do {
1927  if (m_covey->FlyTo( random( cfg_par_female_movement_max.value() ) )) {
1928  // OK so ask the covey about quality here
1929  double q = m_covey->AssessHabitatQualityFaster();
1930  int today = m_OurLandscape->SupplyDayInYear();
1931  int dayspast = today - cfg_par_start_dissolve.value(); // start day as soon as covey dissolve starts to happen
1932  double terr_score = m_OurPopulationManager->GetHabitatQuality(dayspast);
1933  // Test whether the score is above the minimum quality required.
1934  if ( q > terr_score )
1935  {
1936  // Is the covey too close to another, therefore this location is unsuitable?
1937  if ( !m_covey->TooClose() ) {
1938  m_HaveTerritory = true;
1939  m_covey->FixHabitat();
1940  m_covey->SetFixed( true ); // Can read this with IsFixed()
1941  #ifdef __PAR_DEBUG
1943  #endif
1944  m_clutch_number = 0;
1945  if ( !m_MyMate ) return pars_FAttractingMate;
1946  else {
1947  // No need to tell the male, he will check the m_HaveTerritory flag
1950  }
1951  }
1952  }
1953  }
1954  } while ( ++steps < 50 ); // this many goes per day
1955  m_HaveTerritory = false;
1956  // try again tomorrow
1957  return pars_FFindingTerritory;
1958 }

References Partridge_Covey::AssessHabitatQualityFaster(), cfg_buildupwait, cfg_par_female_movement_max, cfg_par_start_dissolve, CheckMatePointers(), Partridge_Covey::FixHabitat(), Partridge_Covey::FlyTo(), Partridge_Population_Manager::GetHabitatQuality(), m_buildupwait, m_clutch_number, Partridge_Population_Manager::m_comms_data, Partridge_Base::m_covey, PartridgeCommunicationData::m_female, m_HaveTerritory, PartridgeCommunicationData::m_male, Partridge_Population_Manager::m_messagecentre, m_MyMate, TAnimal::m_OurLandscape, Partridge_Base::m_OurPopulationManager, pars_FAttractingMate, pars_FBuildingUpResources, pars_FFindingTerritory, pars_FFlocking, Partridge_Communication::PassMessage(), pcomm_FemaleGivingUp, Partridge_Covey::SetFixed(), Landscape::SupplyDayInYear(), Partridge_Population_Manager::SupplyShouldFlock(), Partridge_Covey::TooClose(), and CfgInt::value().

Referenced by Step().

◆ FFlocking()

Partridge_State Partridge_Female::FFlocking ( void  )
protected

Female flocking state.

Ensures that the covey is moving around while flocking. NB: It is OK for all the members of the covey to call this method every day. It only has any effect on the first call.
The birds wait in this state until they get a message initiating breeding behaviour.

Definition at line 1632 of file Partridge_All.cpp.

1633 {
1635  return pars_FFlocking;
1636 }

References Partridge_Covey::GetmaxAllowedMove(), Partridge_Covey::GetmaxFoodNeedToday(), Partridge_Base::m_covey, Partridge_Covey::MoveDistance(), and pars_FFlocking.

Referenced by Step().

◆ FIncubating()

Partridge_State Partridge_Female::FIncubating ( void  )
protected

Female incubating state.

Arrives here from Laying, and stays until either the clutch tells her its hatched, or the clutch is dead - so just wait unless eaten via density-dependent mortality depending upon the number of nests nearby. NB this is a local density-dependence.

Definition at line 1856 of file Partridge_All.cpp.

1857 {
1859  { // only the eggs
1864  m_covey->NestLeave();
1865  m_state = FStartingNewBrood( false );
1866  m_MyClutch = NULL;
1867  return m_state;
1868  }
1869  // Only need to calculate the heavy bit if the nest survives egg predation
1870  double dens = 0.000001 + m_OurPopulationManager->ClutchDensity( m_covey->X(), m_covey->Y(), 500 );
1871  // Have use DPotts idea as the basis but modified this to account for the local rather than global density.
1872  double todaysmortchance = cfg_par_female_incubation_mortality_const.value()
1873  - ( pow( (double) dens, (double) cfg_par_female_incubation_mortality_slope.value() ) );
1874  todaysmortchance *= 100000;
1875  if ( random( 100000 ) < todaysmortchance )
1876  {
1877  // both eaten
1878  FDying();
1879  // Register the death with k_factors
1882  m_covey->NestLeave();
1883  return pars_FDying; // This does nothing actually
1884  }
1885  return pars_FIncubating;
1886 }

References cfg_par_clutch_mortality, cfg_par_female_incubation_mortality_const, cfg_par_female_incubation_mortality_slope, Partridge_Population_Manager::ClutchDensity(), FDying(), FStartingNewBrood(), g_rand_uni, population_attributes::incNoClutchesPredated(), population_attributes::incNoHensPredated(), PartridgeCommunicationData::m_clutch, Partridge_Population_Manager::m_comms_data, Partridge_Base::m_covey, PartridgeCommunicationData::m_female, Partridge_Population_Manager::m_messagecentre, m_MyClutch, Partridge_Population_Manager::m_Ourkfactors, Partridge_Base::m_OurPopulationManager, Partridge_Base::m_state, k_factors::m_ThisYear, Partridge_Covey::NestLeave(), pars_FDying, pars_FIncubating, Partridge_Communication::PassMessage(), pcomm_ClutchEaten, CfgFloat::value(), Partridge_Covey::X(), and Partridge_Covey::Y().

Referenced by Step().

◆ FLaying()

Partridge_State Partridge_Female::FLaying ( void  )
protected

Female laying state.

Need to add eggs to clutch, here the problem is that eggs are not produced one each day We have: cfg_par_days_per_egg.value() and m_clutch_size and m_startlayingday so we just add one egg each cfg_par_days_per_egg.value() days until we have the size wee need.
If she completes her laying this is counted as a success and the female remembers the male as a good mate and makes a transition to FIncubating.

Definition at line 1768 of file Partridge_All.cpp.

1769 {
1770  // 24th Jan 2008 CJT added the code below to allow for clutch predation before clutch completion
1771  if ( g_rand_uni() < cfg_par_clutch_mortality.value() ) { // only the eggs
1776  m_covey->NestLeave(); // Should not strictly be necessary, but safe
1777  m_state = FStartingNewBrood( true );
1778  m_MyClutch = NULL;
1779  return m_state;
1780  }
1782  int cs = (int) (days / cfg_par_days_per_egg.value());
1784  if (cs<m_clutch_size) return pars_FLaying;
1785  else {
1786  // Remember this male as a good mate
1788  m_MyMate->SetOldMate(this);
1791  return pars_FIncubating;
1792  }
1793 }

References cfg_par_clutch_mortality, cfg_par_days_per_egg, FStartingNewBrood(), g_rand_uni, population_attributes::incNoClutchesPredated(), PartridgeCommunicationData::m_clutch, m_clutch_number, m_clutch_size, Partridge_Population_Manager::m_comms_data, Partridge_Base::m_covey, PartridgeCommunicationData::m_female, Partridge_Population_Manager::m_messagecentre, m_MyClutch, m_MyMate, Partridge_Population_Manager::m_Ourkfactors, TAnimal::m_OurLandscape, Partridge_Base::m_OurPopulationManager, m_startlayingday, Partridge_Base::m_state, k_factors::m_ThisYear, Partridge_Covey::NestLeave(), Partridge_Clutch::OnStartIncubating(), pars_FIncubating, pars_FLaying, Partridge_Communication::PassMessage(), pcomm_ClutchEaten, Partridge_Clutch::SetClutchSize(), Partridge_Male::SetOldMate(), SetOldMate(), Landscape::SupplyDayInYear(), Landscape::SupplyGlobalDate(), CfgFloat::value(), and Partridge_Population_Manager::WriteParClutches().

Referenced by Step().

◆ FMakingNest()

Partridge_State Partridge_Female::FMakingNest ( void  )
protected

Female making nest state.

We start with a test for the end of the breeding season. If it is not too late then we determine the eventual size of the clutch here and create this when the nest is completed. The clutch object is created with zero eggs and the eggs are added in Partridge_Female::FLaying.
Determining the number of eggs to be produced has been done by fitting a curve to Danish data from 1953 since we do not know how to do this mechanistically:

Clutch size with fitted curve used to create a probability distribution hard-coded below. This distribution is scaled up and down to obtain the correct mean clutch size recorded when parameter fitting.
The male will just carry on guarding so no need to tell him when the nest is complete. Originally needed to do a special calculation here to calculate the km nesting cover/km2 present. This does not change during the nest's existence so no danger of errors there and this code was slow so an alternative was to calculate all possible values on a coarser grid at start of simulation, then store these - this is the current implementation.

Definition at line 1673 of file Partridge_All.cpp.

1674 {
1675  //
1677  {
1678  if ( m_MyMate )
1679  {
1683  }
1684  // No success so clear the oldmate
1685  RemoveOldMate(false);
1686  m_MyMate = NULL;
1687  m_covey->SetFixed( false );
1688  m_HaveTerritory = false;
1689  return pars_FFlocking;
1690  }
1691  // data
1692  const int clutchsize[19] =
1693  {
1694  // This array holds the probabilities of clutch sizes in 20 categories.
1695  // below from Damerham
1696  143, 385, 725, 1163, 1700, 2336, 3070, 3902, 4833, 5863, 6990, 8217, 9037, 9607, 9928, 10000, 10000, 10000
1697  // The data below is from fitting a 3rd order polynomial to the Danish Paludan 1953 for Danish conditions
1698  // 48, 198, 451, 807, 1266, 1828, 2493, 3261, 4132, 5106, 6182, 7361, 8416, 9208, 9736, 10000, 10000, 10000
1699  };
1700  if ( --m_nest_counter == 0 ) {
1701  if ( m_clutch_size == 0 )
1702  { // If it is not zero it must be 2nd brood and is already set so don't alter it
1703  int chance = random( 10000 );
1704  for ( int i = 0; i < 19; i++ )
1705  {
1706  if ( clutchsize[i] > chance )
1707  {
1709  break;
1710  }
1711  }
1712  }
1713 #ifdef __PAR_DEBUG
1715  if ( m_OurLandscape->SupplyDayInYear() > 200 )
1716  {
1717  int rubbish = 0;
1718  }
1719 #endif
1720  // NOW MAKE THE NEST
1721  // Find and move to a nest location
1722  bool fnd = m_covey->NestFindLocation();
1723  if ( !fnd )
1724  {
1725  // No nest site - no breeding here
1726  // so find another territory
1727  // Tell the male too
1728  if ( m_MyMate )
1729  {
1733  }
1734  return pars_FFindingTerritory;
1735  }
1736  unsigned int family = m_family_counter + 1;
1737  // Make a clutch object
1738  Clutch_struct * ac;
1739  ac = new Clutch_struct;
1740  ac->x = m_Location_x;
1741  ac->y = m_Location_y;
1742  ac->bx = m_Location_x;
1743  ac->by = m_Location_y;
1744  ac->Mum = this;
1745  ac->No = 1; // Was clutch size but 24/01/08 the nest is built first then slowly filled. // m_clutch_size;
1746  ac->family_counter = family;
1747  ac->m_covey = m_covey;
1749  delete ac;
1750  if ( m_clutchproduced )
1751  {
1752  // This must be a re-lay, so don't count it towards total clutches laid
1754  }
1755  m_clutchproduced = true;
1757  return pars_FLaying;
1758  }
1759  return pars_FMakingNest;
1760 }

References Partridge_struct::bx, Partridge_struct::by, cfg_par_last_brood_date, cfg_par_min_no_eggs, CheckMatePointers(), Partridge_Population_Manager::CreateObjects(), population_attributes::decNoClutches(), Partridge_struct::family_counter, m_clutch_size, m_clutchproduced, Partridge_Population_Manager::m_comms_data, Partridge_struct::m_covey, Partridge_Base::m_covey, Partridge_Base::m_family_counter, PartridgeCommunicationData::m_female, m_HaveTerritory, TAnimal::m_Location_x, TAnimal::m_Location_y, PartridgeCommunicationData::m_male, Partridge_Population_Manager::m_messagecentre, m_MyMate, m_nest_counter, Partridge_Population_Manager::m_Ourkfactors, TAnimal::m_OurLandscape, Partridge_Base::m_OurPopulationManager, m_startlayingday, k_factors::m_ThisYear, Clutch_struct::Mum, Partridge_Covey::NestFindLocation(), Clutch_struct::No, pars_FFindingTerritory, pars_FFlocking, pars_FLaying, pars_FMakingNest, Partridge_Communication::PassMessage(), pcomm_MovingHome, pcomm_StoppingBreeding, pob_Clutch, RemoveOldMate(), Partridge_Covey::SetFixed(), Landscape::SupplyDayInYear(), CfgInt::value(), Partridge_struct::x, and Partridge_struct::y.

Referenced by Step().

◆ FPairing()

Partridge_State Partridge_Female::FPairing ( void  )
protected

Female pairing state.

◆ FStartingNewBrood()

Partridge_State Partridge_Female::FStartingNewBrood ( bool  a_waslaying)
protected

Female starting new brood state.

Need to test whether or not to start again.
If it is a brood that is lost then this behaviour is not an option, otherwise we will end here on the loss of a clutch or nest. The data in the lines below needs to be checked if it describes the distribution of 2nd brood sizes. Currently it is the same as 1st clutch minus 4.
See also Partridge_Female::MakingNest

Definition at line 1802 of file Partridge_All.cpp.

1803 {
1804  m_clutch_number++;
1805  const int clutchsize[19] =
1806  {
1807  // This array holds the probabilities of clutch sizes in 20 categories.
1808  // below from Damerham
1809  143, 385, 725, 1163, 1700, 2336, 3070, 3902, 4833, 5863, 6990, 8217, 9037, 9607, 9928, 10000, 10000, 10000
1810  // The data below is from fitting a 3rd order polynomial to the Danish Paludan 1953 for Danish conditions
1811  // 48, 198, 451, 807, 1266, 1828, 2493, 3261, 4132, 5106, 6182, 7361, 8416, 9208, 9736, 10000, 10000, 10000
1812  };
1813  int today = m_OurLandscape->SupplyDayInYear();
1814  if ( (cfg_par_last_brood_date.value() >= today ) && (m_clutch_number<2)) {
1815  int chance = random( 10000 );
1816  for ( int i = 0; i < 19; i++ ) {
1817  if ( clutchsize[i] > chance ) {
1818  m_clutch_size = cfg_par_min_no_eggs.value() + i - 4; // Subtract 4 to match with UK data for second clutches
1819  break;
1820  }
1821  }
1822  if (!a_waslaying) {
1823  m_nest_counter = 10; // 10 days refraction period (Aebishcher & Potts - loose idea but implemented for want of hard data )
1824  } else m_nest_counter = 1;
1825  return pars_FMakingNest; // Inlcudes finding nest location
1826  }
1827  else {
1828  // Too late or too many attempts
1829 #ifdef __PAR_DEBUG
1831  if ( m_OurLandscape->SupplyDayInYear() < 30 )
1832  {
1833  m_OurLandscape->Warn( "Partridge_Female::FSTartingNewBrood", "Too early" );
1834  exit( 1 );
1835  }
1836 #endif
1837  // tell the male we are giving up
1838  if ( m_MyMate != NULL )
1839  {
1843  }
1844  m_HaveTerritory = false;
1845  m_MyMate = NULL;
1846  m_covey->SetFixed( false );
1847  return pars_FFlocking;
1848  }
1849 }

References cfg_par_last_brood_date, cfg_par_min_no_eggs, CheckMatePointers(), m_clutch_number, m_clutch_size, Partridge_Population_Manager::m_comms_data, Partridge_Base::m_covey, PartridgeCommunicationData::m_female, m_HaveTerritory, PartridgeCommunicationData::m_male, Partridge_Population_Manager::m_messagecentre, m_MyMate, m_nest_counter, TAnimal::m_OurLandscape, Partridge_Base::m_OurPopulationManager, pars_FFlocking, pars_FMakingNest, Partridge_Communication::PassMessage(), pcomm_StoppingBreeding, Partridge_Covey::SetFixed(), Landscape::SupplyDayInYear(), CfgInt::value(), and Landscape::Warn().

Referenced by FIncubating(), FLaying(), OnClutchDeath(), and Step().

◆ GetClutch()

Partridge_Clutch* Partridge_Female::GetClutch ( void  )
inline

Supply clutch pointer.

Definition at line 867 of file Partridge_All.h.

867  {
868  return m_MyClutch;
869  }

References m_MyClutch.

Referenced by Partridge_Communication::PassMessage().

◆ GetClutchSize()

int Partridge_Female::GetClutchSize ( void  )
inline

´Supply clutch size

Definition at line 862 of file Partridge_All.h.

862  {
863  return m_clutch_size;
864  }

References m_clutch_size.

◆ GetMate()

◆ GetNestingCoverDensity()

◆ GetOldMate()

Partridge_Male* Partridge_Female::GetOldMate ( void  )
inline

Supply old mate pointer.

Definition at line 893 of file Partridge_All.h.

893  {
894  return m_MyOldHusband;
895  }

References m_MyOldHusband.

Referenced by Partridge_Population_Manager::DissolveCovey(), Partridge_Covey::GetUnpairedFemale(), and Partridge_Communication::PassMessage().

◆ HaveTerritory()

bool Partridge_Female::HaveTerritory ( void  )
inline

Have we a breeding 'territory'?

Definition at line 920 of file Partridge_All.h.

920  {
921  return m_HaveTerritory;
922  }

References m_HaveTerritory.

Referenced by Partridge_Male::MFindingMate(), Partridge_Male::MFollowingMate(), Partridge_Male::MPairing(), and OnMating().

◆ KillThis()

virtual void Partridge_Female::KillThis ( )
inlinevirtual

Direct mortality message.

Reimplemented from TAnimal.

Definition at line 888 of file Partridge_All.h.

888  {
889  FDying();
890  }

References FDying().

Referenced by Partridge_Population_Manager::DoFirst().

◆ OnChicksDead()

void Partridge_Female::OnChicksDead ( void  )

Message handler.

Response to pcomm_AllChicksDead message arriving when the last chick dies.

Definition at line 2118 of file Partridge_All.cpp.

2119 {
2121  m_HaveTerritory = false;
2122  m_MyMate = NULL;
2123 }

References m_HaveTerritory, m_MyMate, Partridge_Base::m_state, and pars_FFlocking.

Referenced by Partridge_Communication::PassMessage().

◆ OnChicksMatured()

void Partridge_Female::OnChicksMatured ( void  )

Message handler.

Response to pcomm_ChicksMature message arriving when the last chick matures.

Definition at line 2107 of file Partridge_All.cpp.

2108 {
2110  m_MyMate = NULL;
2111  m_HaveTerritory = false;
2112 }

References m_HaveTerritory, m_MyMate, Partridge_Base::m_state, and pars_FFlocking.

Referenced by Partridge_Communication::PassMessage().

◆ OnClutchDeath()

void Partridge_Female::OnClutchDeath ( )

Message handler.

Arrives here follwing a pcomm_ClutchDead or a pcomm_AllInfertile message.

Definition at line 2056 of file Partridge_All.cpp.

2057 {
2058  if (m_state == pars_FIncubating) {
2059  m_state = FStartingNewBrood(false);
2060  } else m_state = FStartingNewBrood(true);
2061  m_covey->NestLeave();
2062  m_MyClutch = NULL;
2063 }

References FStartingNewBrood(), Partridge_Base::m_covey, m_MyClutch, Partridge_Base::m_state, Partridge_Covey::NestLeave(), and pars_FIncubating.

Referenced by OnClutchMown(), and Partridge_Communication::PassMessage().

◆ OnClutchMown()

void Partridge_Female::OnClutchMown ( )

Message handler.

Arrives here as a result of a pcomm_ClutchMown message. This determines whether the female dies with the clutch.

Definition at line 2069 of file Partridge_All.cpp.

2070 {
2071  if (m_state==pars_FIncubating) {
2073  {
2074  //Optional output - can depend on the definition of predation in use.
2075  //m_OurPopulationManager->m_Ourkfactors->incNoHensPredated();
2076  FDying();
2077  }
2078  }
2079  OnClutchDeath();
2080 }

References cfg_female_mowing_chance, FDying(), g_rand_uni, Partridge_Base::m_state, OnClutchDeath(), pars_FIncubating, and CfgFloat::value().

Referenced by Partridge_Communication::PassMessage().

◆ OnEggsHatch()

void Partridge_Female::OnEggsHatch ( )

Message handler.

Response to pcomm_EggsHatch message arriving on clutch hatching.

Definition at line 2096 of file Partridge_All.cpp.

2097 {
2099  m_covey->NestLeave();
2100  m_MyClutch = NULL;
2101 }

References Partridge_Base::m_covey, m_MyClutch, Partridge_Base::m_state, Partridge_Covey::NestLeave(), and pars_FCaringForYoung.

Referenced by Partridge_Communication::PassMessage().

◆ OnFarmEvent()

bool Partridge_Female::OnFarmEvent ( FarmToDo  event)
virtual

Management event handler.

There are only a few management events that cause direct effects for the female, but these may be important eg mowing/cutting events. When she is on the nest mortaltiy is controlled via the Partridge_Clutch object not this code, since she is assumed not to escape so easily (see Partridge_Clutch::AgDying).

Reimplemented from TAnimal.

Definition at line 1491 of file Partridge_All.cpp.

1492 {
1493  switch ( event )
1494  {
1495  case sleep_all_day:
1496  break;
1497  case autumn_plough:
1498  break;
1499  case autumn_harrow:
1500  break;
1501  case autumn_roll:
1502  break;
1503  case autumn_sow:
1504  break;
1505  case winter_plough:
1506  break;
1507  case deep_ploughing:
1508  break;
1509  case spring_plough:
1510  break;
1511  case spring_harrow:
1512  break;
1513  case spring_roll:
1514  break;
1515 
1516  case spring_sow:
1517  break;
1518  case fp_npks:
1519  break;
1520  case fp_npk:
1521  break;
1522  case fp_pk:
1523  break;
1524  case fp_liquidNH3:
1525  break;
1526  case fp_slurry:
1527  break;
1528  case fp_manganesesulphate:
1529  break;
1530  case fp_manure:
1531  break;
1532  case fp_greenmanure:
1533  break;
1534  case fp_sludge:
1535  break;
1536  case fa_npk:
1537  break;
1538  case fa_pk:
1539  break;
1540  case fa_slurry:
1541  break;
1542  case fa_ammoniumsulphate:
1543  break;
1544  case fa_manure:
1545  break;
1546  case fa_greenmanure:
1547  break;
1548  case fa_sludge:
1549  break;
1550  case glyphosate:
1551  case herbicide_treat:
1552  break;
1553  case growth_regulator:
1554  break;
1555  case fungicide_treat:
1556  break;
1557  case syninsecticide_treat:
1558  case insecticide_treat:
1559  case product_treat:
1560  break;
1561  case molluscicide:
1562  break;
1563  case row_cultivation:
1564  break;
1565  case strigling:
1566  if ( g_rand_uni() < cfg_par_ad_cut.value() ) FDying();
1567  break;
1568  case hilling_up:
1569  break;
1570  case water:
1571  break;
1572  case swathing:
1573  break;
1574  case harvest:
1575  if ( g_rand_uni() < cfg_par_ad_cut.value() ) FDying();
1576  break;
1577  case cattle_out:
1578  break;
1579  case cattle_out_low:
1580  break;
1581  case cut_to_hay:
1582  if ( g_rand_uni() < cfg_par_ad_cut.value() ) FDying();
1583  break;
1584  case cut_to_silage:
1585  if ( g_rand_uni() < cfg_par_ad_cut.value() ) FDying();
1586  break;
1587  case straw_chopping:
1588  break;
1589  case hay_turning:
1590  break;
1591  case hay_bailing:
1592  if ( g_rand_uni() < cfg_par_ad_cut.value() ) FDying();
1593  break;
1594  case stubble_harrowing:
1595  break;
1597  break;
1598  case burn_straw_stubble:
1599  break;
1600  case mow:
1601  if ( g_rand_uni() < cfg_par_ad_cut.value() ) FDying();
1602  break;
1603  case cut_weeds:
1604  if ( g_rand_uni() < cfg_par_ad_cut.value() ) FDying();
1605  break;
1606  case pigs_out:
1607  break;
1608  case strigling_sow:
1609  if ( g_rand_uni() < cfg_par_ad_cut.value() ) FDying();
1610  break;
1611  default:
1612  m_OurLandscape->Warn( "Partridge_Female::OnFarmEvent(): Unknown event type:",
1613  m_OurLandscape->EventtypeToString( event ) );
1614  exit( 1 );
1615  }
1616  // Must incorporate a test here in case the animal is dead - killing it twice
1617  // can be a bad idea
1618  if ( m_state == pars_Destroy ) return true;
1619  else
1620  return false;
1621 }

References autumn_harrow, autumn_or_spring_plough, autumn_plough, autumn_roll, autumn_sow, burn_straw_stubble, cattle_out, cattle_out_low, cfg_par_ad_cut, cut_to_hay, cut_to_silage, cut_weeds, deep_ploughing, Landscape::EventtypeToString(), fa_ammoniumsulphate, fa_greenmanure, fa_manure, fa_npk, fa_pk, fa_sludge, fa_slurry, FDying(), fp_greenmanure, fp_liquidNH3, fp_manganesesulphate, fp_manure, fp_npk, fp_npks, fp_pk, fp_sludge, fp_slurry, fungicide_treat, g_rand_uni, glyphosate, growth_regulator, harvest, hay_bailing, hay_turning, herbicide_treat, hilling_up, insecticide_treat, TAnimal::m_OurLandscape, Partridge_Base::m_state, molluscicide, mow, pars_Destroy, pigs_out, product_treat, row_cultivation, sleep_all_day, spring_harrow, spring_plough, spring_roll, spring_sow, straw_chopping, strigling, strigling_sow, stubble_harrowing, swathing, syninsecticide_treat, CfgFloat::value(), Landscape::Warn(), water, and winter_plough.

◆ OnMateDying()

void Partridge_Female::OnMateDying ( PartridgeCommunicationData pc_data)

Message handler.

Response to a pcomm_MaleDying message from Partridge_Male::MDying.

Definition at line 2129 of file Partridge_All.cpp.

2130 {
2131  if ( pc_data->m_male != m_MyMate )
2132  {
2133  m_OurLandscape->Warn( "Partridge_Female::OnMateDying(): ""m_MyMate is not the mate that is dying", "" );
2134  exit( 1 );
2135  }
2136  RemoveOldMate(false);
2137  m_MyMate = NULL;
2138  // What she does now depends on whether the chicks have hatched etc.
2139  switch ( m_state )
2140  {
2141  case pars_FCaringForYoung:
2142  break; // keep doing it
2143  case pars_FFlocking:
2145  break;
2148  break;
2149  case pars_FIncubating:
2150  case pars_FLaying:
2151  //break;
2153  m_MyClutch->OnGivenUp();
2154  m_MyClutch = NULL;
2155  m_covey->SetFixed( false );
2156  m_covey->NestLeave();
2157  break;
2158  case pars_FMakingNest:
2162  m_covey->SetFixed( false );
2163  m_covey->NestLeave();
2164  break;
2165  default:
2166  m_OurLandscape->Warn( "Partridge_Female::OnMateDeath - unknown pars type", NULL );
2167  exit( 1 );
2168  }
2169 }

References Partridge_Base::m_covey, PartridgeCommunicationData::m_male, m_MyClutch, m_MyMate, TAnimal::m_OurLandscape, Partridge_Base::m_state, Partridge_Covey::NestLeave(), Partridge_Clutch::OnGivenUp(), pars_FAttractingMate, pars_FBuildingUpResources, pars_FCaringForYoung, pars_FFindingTerritory, pars_FFlocking, pars_FIncubating, pars_FLaying, pars_FMakingNest, pars_FStartingNewBrood, RemoveOldMate(), Partridge_Covey::SetFixed(), and Landscape::Warn().

Referenced by Partridge_Communication::PassMessage().

◆ OnMating()

void Partridge_Female::OnMating ( PartridgeCommunicationData pc_data)

Message handler.

Arrives here following pcomm_Mating message from either Partridge_Population_Manager::DissolveCovey or Partridge_Male::MFindingMate.

Definition at line 2031 of file Partridge_All.cpp.

2032 {
2033  m_MyMate = pc_data->m_male;
2034  RemoveOldMate(false);
2035  SwitchCovey( pc_data->m_covey );
2036  // The state she needs to go to depends on she has a
2037  // territory or not
2038  if ( HaveTerritory() )
2039  {
2042  }
2043  else
2045  m_clutch_number = 0;
2046  m_clutchproduced = false;
2047 }

References cfg_buildupwait, HaveTerritory(), m_buildupwait, m_clutch_number, m_clutchproduced, PartridgeCommunicationData::m_covey, PartridgeCommunicationData::m_male, m_MyMate, Partridge_Base::m_state, pars_FBuildingUpResources, pars_FFindingTerritory, RemoveOldMate(), Partridge_Base::SwitchCovey(), and CfgInt::value().

Referenced by Partridge_Communication::PassMessage().

◆ OnSetMyClutch()

void Partridge_Female::OnSetMyClutch ( PartridgeCommunicationData pc_data)

Message handler.

Response to the pcomm_SetClutch message received on Partridge_Clutch object creation.

Definition at line 2086 of file Partridge_All.cpp.

2087 {
2088  m_MyClutch = pc_data->m_clutch;
2090 }

References PartridgeCommunicationData::m_clutch, m_MyClutch, Partridge_Base::m_state, and pars_FIncubating.

Referenced by Partridge_Communication::PassMessage().

◆ OnWaitForMale()

void Partridge_Female::OnWaitForMale ( )

Message handler.

Called following a pcomm_WaitForMale message from Partridge_Population_Manager::DissolveCovey

Definition at line 2015 of file Partridge_All.cpp.

2016 {
2017  m_covey->SetFixed( false );
2018  if (m_UncleStatus) {
2019  SetUncleStatus( false );
2020  }
2021  RemoveOldMate(false);
2023 }

References Partridge_Base::m_covey, Partridge_Base::m_state, Partridge_Base::m_UncleStatus, pars_FAttractingMate, RemoveOldMate(), Partridge_Covey::SetFixed(), and Partridge_Base::SetUncleStatus().

Referenced by Partridge_Communication::PassMessage().

◆ RemoveOldMate()

void Partridge_Female::RemoveOldMate ( bool  a_knockon)
inline

Forget old mate.

Definition at line 903 of file Partridge_All.h.

903  {
904  if (m_MyOldHusband!= NULL) {
905  if (!a_knockon) { // if it is a knock on then don't start a recursive set of calls
907  }
908  m_MyOldHusband= NULL;
909  }
910  }

References m_MyOldHusband, and Partridge_Male::RemoveOldMate().

Referenced by FDying(), FMakingNest(), Partridge_Covey::GetUnpairedFemale(), OnMateDying(), OnMating(), OnWaitForMale(), and Partridge_Male::RemoveOldMate().

◆ SetOldMate()

void Partridge_Female::SetOldMate ( Partridge_Male pm)
inline

Set old mate pointer.

Definition at line 898 of file Partridge_All.h.

898  {
899  m_MyOldHusband=pm;
900  }

References m_MyOldHusband.

Referenced by FLaying().

◆ Step()

void Partridge_Female::Step ( void  )
virtual

Female Step.

The Step code for the female partridge. This is the main state-transition control for the female. It will be called repeatedly each time-step until m_StepDone is set to true.

Reimplemented from TAnimal.

Definition at line 1378 of file Partridge_All.cpp.

1379 {
1380 
1381  if ( m_CurrentStateNo == -1 || m_StepDone )
1382  return;
1383  switch ( m_state )
1384  {
1385  case pars_Initiation:
1386  case pars_FFlocking:
1387  m_state = FFlocking();
1388  m_StepDone = true;
1389  break;
1392  m_StepDone = true;
1393  break;
1394  case pars_FAttractingMate:
1396  m_StepDone = true;
1397  break;
1400  m_StepDone = true;
1401  break;
1402  case pars_FMakingNest:
1403  m_state = FMakingNest();
1404  m_StepDone = true;
1405  break;
1406  case pars_FLaying:
1407  m_state = FLaying();
1408  m_StepDone = true;
1409  break;
1411  m_state = FStartingNewBrood( false );
1412  m_StepDone = true;
1413  break;
1414  case pars_FIncubating:
1415  m_state = FIncubating();
1416  m_StepDone = true;
1417  break;
1418  case pars_FCaringForYoung:
1420  m_StepDone = true;
1421  break;
1422  case pars_FDying:
1423  m_StepDone = true;
1424  break;
1425  default:
1426  char st[255];
1427  sprintf(st,"%d\n",m_state);
1428  m_OurLandscape->Warn( "Partridge_Female::Step - unknown pars type ", st );
1429  exit( 1 );
1430  }
1431 #ifdef __PAR_DEBUG
1433 #endif
1434 }

References CheckMatePointers(), FAttractingMate(), FBuildingUpResources(), FCaringForYoung(), FFindingTerritory(), FFlocking(), FIncubating(), FLaying(), FMakingNest(), FStartingNewBrood(), TALMaSSObject::m_CurrentStateNo, TAnimal::m_OurLandscape, Partridge_Base::m_state, TALMaSSObject::m_StepDone, pars_FAttractingMate, pars_FBuildingUpResources, pars_FCaringForYoung, pars_FDying, pars_FFindingTerritory, pars_FFlocking, pars_FIncubating, pars_FLaying, pars_FMakingNest, pars_FStartingNewBrood, pars_Initiation, and Landscape::Warn().

◆ UnSetMate()

void Partridge_Female::UnSetMate ( void  )
inline

Forget mate.

Definition at line 877 of file Partridge_All.h.

877  {
878  m_MyMate=NULL;
879  }

References m_MyMate.

Member Data Documentation

◆ m_buildupwait

int Partridge_Female::m_buildupwait
protected

Delay before breeding can commence.

Definition at line 817 of file Partridge_All.h.

Referenced by FBuildingUpResources(), FFindingTerritory(), and OnMating().

◆ m_clutch_number

int Partridge_Female::m_clutch_number
protected

Current clutch attempt.

Definition at line 807 of file Partridge_All.h.

Referenced by FFindingTerritory(), FLaying(), FStartingNewBrood(), and OnMating().

◆ m_clutch_size

int Partridge_Female::m_clutch_size
protected

Current clutch size.

Definition at line 805 of file Partridge_All.h.

Referenced by FLaying(), FMakingNest(), FStartingNewBrood(), GetClutchSize(), and Partridge_Female().

◆ m_clutchproduced

bool Partridge_Female::m_clutchproduced
protected

Flag for having produced a clutch.

Definition at line 803 of file Partridge_All.h.

Referenced by FMakingNest(), and OnMating().

◆ m_HaveTerritory

bool Partridge_Female::m_HaveTerritory
protected

Flag for having found a suitable breeding area.

Definition at line 801 of file Partridge_All.h.

Referenced by FFindingTerritory(), FMakingNest(), FStartingNewBrood(), HaveTerritory(), OnChicksDead(), OnChicksMatured(), and Partridge_Female().

◆ m_lifespan

int Partridge_Female::m_lifespan
protected

Physiological lifespan in days.

Definition at line 811 of file Partridge_All.h.

Referenced by BeginStep(), and Partridge_Female().

◆ m_MyClutch

Partridge_Clutch* Partridge_Female::m_MyClutch
protected

A pointer to any current clutch.

Definition at line 823 of file Partridge_All.h.

Referenced by FDying(), FIncubating(), FLaying(), GetClutch(), OnClutchDeath(), OnEggsHatch(), OnMateDying(), OnSetMyClutch(), and Partridge_Female().

◆ m_MyMate

Partridge_Male* Partridge_Female::m_MyMate
protected

◆ m_MyOldHusband

Partridge_Male* Partridge_Female::m_MyOldHusband
protected

A record of the previous mate if any.

Definition at line 821 of file Partridge_All.h.

Referenced by GetOldMate(), Partridge_Female(), RemoveOldMate(), and SetOldMate().

◆ m_nest_counter

int Partridge_Female::m_nest_counter
protected

Days spent nest building.

Definition at line 809 of file Partridge_All.h.

Referenced by FBuildingUpResources(), FMakingNest(), and FStartingNewBrood().

◆ m_startlayingday

int Partridge_Female::m_startlayingday
protected

Records the day laying started.

Definition at line 815 of file Partridge_All.h.

Referenced by FLaying(), and FMakingNest().

◆ m_triggerlayingvar

int Partridge_Female::m_triggerlayingvar
protected

Adds stochasticity to the light triggering of breeding.

Definition at line 813 of file Partridge_All.h.

Referenced by FBuildingUpResources(), and Partridge_Female().


The documentation for this class was generated from the following files:
insecticide_treat
Definition: treatment.h:74
Partridge_Base::m_object_type
Partridge_Object m_object_type
Type of pob object this is.
Definition: Partridge_All.h:418
g_MaxWalk
int g_MaxWalk[200]
Definition: Partridge_Population_Manager.cpp:66
Partridge_Population_Manager::m_Ourkfactors
k_factors * m_Ourkfactors
Pointer to kfactors object.
Definition: Partridge_Population_Manager.h:169
Clutch_struct::Mum
Partridge_Female * Mum
Definition: Partridge_All.h:365
k_factors::m_ThisYear
population_attributes * m_ThisYear
Definition: Partridge_All.h:251
pcomm_MumDeadC
Definition: Partridge_Communication.h:66
Partridge_Base::SetUncleStatus
void SetUncleStatus(bool a_Status)
Set uncle status.
Definition: Partridge_All.h:442
Partridge_Population_Manager::GetHabitatQuality
double GetHabitatQuality(int a_day)
Definition: Partridge_Population_Manager.h:304
Partridge_Covey::RemoveMember
int RemoveMember(Partridge_Base *a_former_member)
Remove a member from the covey.
Definition: Partridge_Covey.cpp:1664
pars_FCaringForYoung
Definition: Partridge_All.h:283
strigling
Definition: treatment.h:77
Partridge_Base::m_family_counter
int m_family_counter
Family ID.
Definition: Partridge_All.h:408
hay_bailing
Definition: treatment.h:89
autumn_roll
Definition: treatment.h:38
Partridge_struct::family_counter
int family_counter
Definition: Partridge_All.h:350
Partridge_Base::m_state
Partridge_State m_state
Current behavioural state.
Definition: Partridge_All.h:422
Partridge_Communication::PassMessage
bool PassMessage(PartridgeCommunicationData *pc_data, TypeOfPartridge_Communication pc)
Pass a message.
Definition: Partridge_Communication.cpp:86
Partridge_Clutch::OnGivenUp
void OnGivenUp()
Message handler.
Definition: Partridge_All.cpp:631
cfg_par_clutch_mortality
static CfgFloat cfg_par_clutch_mortality("PAR_CLUTCH_MORTALITY", CFG_CUSTOM, 0.00135)
Clutch - daily probability of non-explicitly modelled mortality.
cfg_par_days_per_egg
static CfgFloat cfg_par_days_per_egg("PAR_DAY_PER_EGG", CFG_CUSTOM, 1.5)
Days taken to lay 1 egg.
Partridge_Female::FFindingTerritory
Partridge_State FFindingTerritory(void)
Female finding 'territory' state.
Definition: Partridge_All.cpp:1912
pcomm_ClutchEaten
Definition: Partridge_Communication.h:68
cfg_par_ad_cut
static CfgFloat cfg_par_ad_cut("PAR_AD_CUT_MORT", CFG_CUSTOM, 0.01)
Adult % mortality on cutting.
fa_ammoniumsulphate
Definition: treatment.h:65
autumn_harrow
Definition: treatment.h:37
Partridge_Female::m_MyClutch
Partridge_Clutch * m_MyClutch
A pointer to any current clutch.
Definition: Partridge_All.h:823
Partridge_Base::Partridge_Base
Partridge_Base(int a_born_x, int a_born_y, int a_x, int a_y, int a_family_counter, Partridge_Covey *a_covey, Landscape *a_map, Partridge_Population_Manager *a_manager)
Constructor for Partridge_Base.
Definition: Partridge_All.cpp:156
cfg_buildupwait
static CfgInt cfg_buildupwait("PAR_BUILDUP_WAIT", CFG_CUSTOM, 130)
Time period after finding territory before making nest.
Partridge_Female::FLaying
Partridge_State FLaying(void)
Female laying state.
Definition: Partridge_All.cpp:1768
autumn_sow
Definition: treatment.h:41
Partridge_Female::FCaringForYoung
Partridge_State FCaringForYoung(void)
Female caring for young state.
Definition: Partridge_All.cpp:1896
cfg_par_max_lifespan
CfgInt cfg_par_max_lifespan("PAR_MAX_LIFESPAN", CFG_CUSTOM, 3650)
Maximum physiological lifespan.
glyphosate
Definition: treatment.h:102
pcomm_MovingHome
Definition: Partridge_Communication.h:70
cfg_par_adult_mortalityWinter
static CfgFloat cfg_par_adult_mortalityWinter("PAR_ADULT_MORTALITYWINTER", CFG_CUSTOM, 0.0217)
Adults - daily probability of non-explicitly modelled mortality in Winter.
harvest
Definition: treatment.h:82
Partridge_Covey::GetmaxFoodNeedToday
double GetmaxFoodNeedToday()
Return the maximum food need today.
Definition: Partridge_Covey.h:416
April
const int April
Definition: landscape.h:39
Partridge_Population_Manager::ClutchDensity
int ClutchDensity(int x, int y, int radius)
Returns clutch density at x,y with radius radius.
Definition: Partridge_Population_Manager.cpp:569
cfg_par_female_incubation_mortality_const
static CfgFloat cfg_par_female_incubation_mortality_const("PAR_FEMALE_INCUBATION_MORTALITY_CONST", CFG_CUSTOM, 1.00192)
Increasing hen predation with density (intercept)
cfg_par_start_dissolve
CfgInt cfg_par_start_dissolve("PAR_START_DISSOLVE", CFG_CUSTOM, 30)
The earliest covey dissolve date.
Definition: Partridge_Population_Manager.cpp:94
TAnimal::m_OurLandscape
Landscape * m_OurLandscape
Definition: populationmanager.h:229
fp_slurry
Definition: treatment.h:52
Partridge_Clutch::SetClutchSize
void SetClutchSize(int cs)
Set no. eggs.
Definition: Partridge_All.h:556
Partridge_Male::RemoveOldMate
void RemoveOldMate(bool a_knockon)
Forget any old mate.
Definition: Partridge_All.cpp:2661
Partridge_Population_Manager::m_comms_data
PartridgeCommunicationData * m_comms_data
Message data.
Definition: Partridge_Population_Manager.h:161
cfg_par_triggerlaying
static CfgInt cfg_par_triggerlaying("PAR_TRIGGERLAYING", CFG_CUSTOM, 850)
The number of minutes daylight as a minimum before triggering egg-laying behaviour.
Partridge_Covey::AssessHabitatQualityFaster
double AssessHabitatQualityFaster()
Assess habitat quality (efficient)
Definition: Partridge_Covey.cpp:1068
Partridge_Female::m_MyMate
Partridge_Male * m_MyMate
A pointer to the current mate if any.
Definition: Partridge_All.h:819
fa_sludge
Definition: treatment.h:68
fp_greenmanure
Definition: treatment.h:56
Partridge_Covey::MoveDistance
void MoveDistance(int a_max_distance, int a_step_size, double a_food_density_needed)
Entry point for movement.
Definition: Partridge_Covey.cpp:652
Partridge_Female::m_clutchproduced
bool m_clutchproduced
Flag for having produced a clutch.
Definition: Partridge_All.h:803
hay_turning
Definition: treatment.h:88
Partridge_struct::m_covey
Partridge_Covey * m_covey
Definition: Partridge_All.h:349
Partridge_Male::GetMate
Partridge_Female * GetMate(void)
Are we paired?
Definition: Partridge_All.h:719
Partridge_Covey::GetChickAge
int GetChickAge()
Return chick age.
Definition: Partridge_Covey.h:486
Partridge_Female::m_nest_counter
int m_nest_counter
Days spent nest building.
Definition: Partridge_All.h:809
water
Definition: treatment.h:80
pars_FAttractingMate
Definition: Partridge_All.h:283
fp_liquidNH3
Definition: treatment.h:51
population_attributes::decNoClutches
void decNoClutches()
Definition: Partridge_All.h:91
cfg_female_mowing_chance
static CfgFloat cfg_female_mowing_chance("PAR_FEMALEMOWNMORTALITY", CFG_CUSTOM, 1)
Chance of female death if incubating a mown clutch.
Partridge_Female::m_buildupwait
int m_buildupwait
Delay before breeding can commence.
Definition: Partridge_All.h:817
Partridge_struct::x
int x
Definition: Partridge_All.h:344
molluscicide
Definition: treatment.h:75
Partridge_Female::m_MyOldHusband
Partridge_Male * m_MyOldHusband
A record of the previous mate if any.
Definition: Partridge_All.h:821
Partridge_Clutch::OnStartIncubating
void OnStartIncubating()
Flag under incubation.
Definition: Partridge_All.h:536
burn_straw_stubble
Definition: treatment.h:92
PartridgeCommunicationData::m_male
Partridge_Male * m_male
Definition: Partridge_Communication.h:83
Partridge_Covey::GetmaxAllowedMove
int GetmaxAllowedMove()
Return the max possible move distance today.
Definition: Partridge_Covey.h:411
pars_FStartingNewBrood
Definition: Partridge_All.h:282
Partridge_Male::SetOldMate
void SetOldMate(Partridge_Female *pf)
Set old mate pointer.
Definition: Partridge_All.h:752
cattle_out_low
Definition: treatment.h:100
pars_FBuildingUpResources
Definition: Partridge_All.h:282
Partridge_Population_Manager::CreateObjects
void CreateObjects(int ob_type, Partridge_struct *data, int number)
Definition: Partridge_Population_Manager.cpp:368
pcomm_StoppingBreeding
Definition: Partridge_Communication.h:69
fp_pk
Definition: treatment.h:50
fa_npk
Definition: treatment.h:61
cattle_out
Definition: treatment.h:83
Partridge_Female::FAttractingMate
Partridge_State FAttractingMate(void)
Female attracting mate state.
Definition: Partridge_All.cpp:1962
October
const int October
Definition: landscape.h:45
Partridge_Covey::TooClose
bool TooClose()
Test for another covey too close.
Definition: Partridge_Covey.cpp:1271
fp_npk
Definition: treatment.h:49
pars_FIncubating
Definition: Partridge_All.h:283
pars_FFindingTerritory
Definition: Partridge_All.h:282
Partridge_Population_Manager::WriteParClutches
void WriteParClutches(int a_min, int a_num1, int a_num2)
Output method.
Definition: Partridge_Population_Manager.cpp:1682
stubble_harrowing
Definition: treatment.h:90
cfg_par_days_to_make_nest
static CfgInt cfg_par_days_to_make_nest("PAR_DAYS_TO_MAKE_NEST", CFG_CUSTOM, 5)
Days used for nestbuilding.
PartridgeCommunicationData::m_female
Partridge_Female * m_female
Definition: Partridge_Communication.h:84
autumn_plough
Definition: treatment.h:34
Partridge_Covey::GetCoveySize
unsigned int GetCoveySize()
Return the covey size.
Definition: Partridge_Covey.h:476
fp_manure
Definition: treatment.h:55
TAnimal::m_Location_y
int m_Location_y
Definition: populationmanager.h:228
strigling_sow
Definition: treatment.h:95
Partridge_Female::m_startlayingday
int m_startlayingday
Records the day laying started.
Definition: Partridge_All.h:815
Partridge_Base::m_UncleStatus
bool m_UncleStatus
If has uncle status in the covey.
Definition: Partridge_All.h:416
pcomm_FemaleGivingUp
Definition: Partridge_Communication.h:67
Partridge_Base::m_signal
int m_signal
Used to pass information to outputs.
Definition: Partridge_All.h:404
winter_plough
Definition: treatment.h:42
Partridge_Female::FMakingNest
Partridge_State FMakingNest(void)
Female making nest state.
Definition: Partridge_All.cpp:1673
Partridge_Female::OnClutchDeath
void OnClutchDeath()
Message handler.
Definition: Partridge_All.cpp:2056
Partridge_struct::y
int y
Definition: Partridge_All.h:345
Partridge_Female::CheckMatePointers
virtual void CheckMatePointers()
Debug function - checking mate consistency
Definition: Partridge_All.cpp:2827
PartridgeCommunicationData::m_covey
Partridge_Covey * m_covey
Definition: Partridge_Communication.h:85
Partridge_Covey::SetFixed
void SetFixed(bool a_is_fixed)
Prevent/enable peg drift.
Definition: Partridge_Covey.h:572
fp_sludge
Definition: treatment.h:57
Partridge_Base::m_age
int m_age
Age in days.
Definition: Partridge_All.h:410
straw_chopping
Definition: treatment.h:87
cfg_par_min_lifespan
CfgInt cfg_par_min_lifespan("PAR_MIN_LIFESPAN", CFG_CUSTOM, 1825)
Minimum physiological lifespan.
fungicide_treat
Definition: treatment.h:73
deep_ploughing
Definition: treatment.h:43
Landscape::SupplyDayInYear
int SupplyDayInYear(void)
Definition: landscape.h:1596
pars_Destroy
Definition: Partridge_All.h:287
Partridge_Population_Manager::m_messagecentre
Partridge_Communication m_messagecentre
Message class pointer.
Definition: Partridge_Population_Manager.h:163
cfg_par_adult_mortalitySummer
static CfgFloat cfg_par_adult_mortalitySummer("PAR_ADULT_MORTALITYSUMMER", CFG_CUSTOM, 0.0001)
Adults - daily probability of non-explicitly modelled mortality in Summer.
mow
Definition: treatment.h:93
fa_pk
Definition: treatment.h:62
Partridge_Female::DailyMortality
virtual bool DailyMortality()
Background mortality check.
Definition: Partridge_All.cpp:1454
TALMaSSObject::m_StepDone
bool m_StepDone
Indicates whether the iterative step code is done for this timestep.
Definition: populationmanager.h:118
Partridge_Female::m_lifespan
int m_lifespan
Physiological lifespan in days.
Definition: Partridge_All.h:811
spring_harrow
Definition: treatment.h:45
cfg_par_triggerlayingvar
static CfgInt cfg_par_triggerlayingvar("PAR_TRIGGERLAYINGVAR", CFG_CUSTOM, 48)
Generates variation around the laying trigger.
Clutch_struct
Struct to pass clutch information.
Definition: Partridge_All.h:362
Partridge_Base::SwitchCovey
void SwitchCovey(Partridge_Covey *a_covey)
Swap coveys.
Definition: Partridge_All.cpp:216
Partridge_Covey::FlyTo
bool FlyTo(int a_distance)
Fly to
Definition: Partridge_Covey.cpp:1484
cfg_par_min_no_eggs
static CfgInt cfg_par_min_no_eggs("PAR_MIN_NO_EGGS", CFG_CUSTOM, 7)
Minimum clutch size.
CfgFloat::value
double value(void)
Definition: configurator.h:118
Partridge_Female::m_triggerlayingvar
int m_triggerlayingvar
Adds stochasticity to the light triggering of breeding.
Definition: Partridge_All.h:813
pars_FLaying
Definition: Partridge_All.h:282
hilling_up
Definition: treatment.h:79
Landscape::EventtypeToString
std::string EventtypeToString(int a_event)
Definition: Landscape.cpp:3918
Partridge_Base::m_OurPopulationManager
Partridge_Population_Manager * m_OurPopulationManager
Pointer to the population manager.
Definition: Partridge_All.h:430
Partridge_Covey::NestFindLocation
bool NestFindLocation(void)
Try to locate a suitable nesting location.
Definition: Partridge_Covey.cpp:1107
syninsecticide_treat
Definition: treatment.h:99
fa_manure
Definition: treatment.h:66
Partridge_Covey::FixHabitat
void FixHabitat(void)
Accept this breeding location.
Definition: Partridge_Covey.cpp:1074
fp_npks
Definition: treatment.h:48
cfg_par_adult_mortality_alone
static CfgFloat cfg_par_adult_mortality_alone("PAR_ADULT_MORTALITY_ALONE", CFG_CUSTOM, 1.4)
Adults - extra mortality scaler if alone.
row_cultivation
Definition: treatment.h:76
Partridge_Female::m_HaveTerritory
bool m_HaveTerritory
Flag for having found a suitable breeding area.
Definition: Partridge_All.h:801
Partridge_Female::FIncubating
Partridge_State FIncubating(void)
Female incubating state.
Definition: Partridge_All.cpp:1856
pars_Initiation
Definition: Partridge_All.h:267
cfg_par_last_brood_date
CfgInt cfg_par_last_brood_date("PAR_LAST_BROOD_DATE", CFG_CUSTOM, 180)
Latest date for a reproduction attempt.
Partridge_Female::SetOldMate
void SetOldMate(Partridge_Male *pm)
Set old mate pointer.
Definition: Partridge_All.h:898
Partridge_Covey::X
unsigned int X(void)
Definition: Partridge_Covey.h:708
Partridge_Female::m_clutch_size
int m_clutch_size
Current clutch size.
Definition: Partridge_All.h:805
Partridge_Female::FFlocking
Partridge_State FFlocking(void)
Female flocking state.
Definition: Partridge_All.cpp:1632
Partridge_Female::HaveTerritory
bool HaveTerritory(void)
Have we a breeding 'territory'?
Definition: Partridge_All.h:920
TALMaSSObject::GetCurrentStateNo
int GetCurrentStateNo()
Returns the current state number.
Definition: populationmanager.h:121
Partridge_struct::by
int by
Definition: Partridge_All.h:347
spring_plough
Definition: treatment.h:44
fa_greenmanure
Definition: treatment.h:67
TAnimal::CheckManagement
void CheckManagement(void)
Definition: PopulationManager.cpp:1404
Partridge_Female::FBuildingUpResources
Partridge_State FBuildingUpResources(void)
Female building up resources state.
Definition: Partridge_All.cpp:1644
Partridge_struct::bx
int bx
Definition: Partridge_All.h:346
Partridge_Female::FDying
void FDying(void)
Definition: Partridge_All.cpp:1984
spring_roll
Definition: treatment.h:46
population_attributes::incNoClutchesPredated
void incNoClutchesPredated()
Definition: Partridge_All.h:100
cut_weeds
Definition: treatment.h:94
CfgInt::value
int value(void)
Definition: configurator.h:98
Partridge_Female::m_clutch_number
int m_clutch_number
Current clutch attempt.
Definition: Partridge_All.h:807
PartridgeCommunicationData::m_clutch
Partridge_Clutch * m_clutch
Definition: Partridge_Communication.h:80
pars_FFlocking
Definition: Partridge_All.h:282
fp_manganesesulphate
Definition: treatment.h:53
herbicide_treat
Definition: treatment.h:71
Partridge_Base::m_covey
Partridge_Covey * m_covey
Pointer to the covey.
Definition: Partridge_All.h:420
cfg_par_adult_mortalitySpring
static CfgFloat cfg_par_adult_mortalitySpring("PAR_ADULT_MORTALITYSPRING", CFG_CUSTOM, 0.0096)
Adults - daily probability of non-explicitly modelled mortality in Spring.
population_attributes::incNoDeadFemales
void incNoDeadFemales()
Definition: Partridge_All.h:172
growth_regulator
Definition: treatment.h:72
cut_to_silage
Definition: treatment.h:86
product_treat
Definition: treatment.h:101
Partridge_Population_Manager::GetNestingCoverDensity
double GetNestingCoverDensity(int x, int y)
Definition: Partridge_Population_Manager.cpp:754
population_attributes::incNoHensPredated
void incNoHensPredated()
Definition: Partridge_All.h:104
TALMaSSObject::m_CurrentStateNo
int m_CurrentStateNo
The basic state number for all objects - '-1' indicates death.
Definition: populationmanager.h:116
pigs_out
Definition: treatment.h:84
pob_Clutch
Definition: Partridge_All.h:297
Clutch_struct::No
int No
Definition: Partridge_All.h:364
cut_to_hay
Definition: treatment.h:85
Partridge_Covey::Y
unsigned int Y(void)
Definition: Partridge_Covey.h:713
spring_sow
Definition: treatment.h:47
pars_FDying
Definition: Partridge_All.h:283
Landscape::Warn
void Warn(std::string a_msg1, std::string a_msg2)
Definition: landscape.h:1579
g_rand_uni
boost::variate_generator< base_generator_type &, boost::uniform_real<> > g_rand_uni
Partridge_Female::RemoveOldMate
void RemoveOldMate(bool a_knockon)
Forget old mate.
Definition: Partridge_All.h:903
sleep_all_day
Definition: treatment.h:33
Partridge_Population_Manager::SupplyShouldFlock
bool SupplyShouldFlock()
Definition: Partridge_Population_Manager.h:286
TAnimal::m_Location_x
int m_Location_x
Definition: populationmanager.h:225
pars_FMakingNest
Definition: Partridge_All.h:282
autumn_or_spring_plough
Definition: treatment.h:91
Landscape::SupplyDaylength
int SupplyDaylength(void)
Definition: landscape.h:1530
pob_Female
Definition: Partridge_All.h:297
cfg_par_female_incubation_mortality_slope
static CfgFloat cfg_par_female_incubation_mortality_slope("PAR_FEMALE_INCUBATION_MORTALITY_SLOPE", CFG_CUSTOM, -0.00122)
Increasing hen predation with density (slope)
fa_slurry
Definition: treatment.h:63
Landscape::SupplyGlobalDate
long SupplyGlobalDate(void)
Definition: landscape.h:1621
swathing
Definition: treatment.h:81
cfg_par_female_movement_max
static CfgInt cfg_par_female_movement_max("PAR_FEMALE_MOVEMENT_MAX", CFG_CUSTOM, 100)
Female max daily movement.
Partridge_Covey::NestLeave
void NestLeave(void)
Leave the nest
Definition: Partridge_Covey.h:516
Partridge_Female::FStartingNewBrood
Partridge_State FStartingNewBrood(bool a_waslaying)
Female starting new brood state.
Definition: Partridge_All.cpp:1802