|
ALMaSS Partridge ODdox
1.1
The partridge model description following ODdox protocol
|
The partridge Chick2 class. More...
#include <Partridge_All.h>
Public Member Functions | |
| virtual void | BeginStep (void) |
| Chick2 BeginStep. More... | |
| virtual void | Step (void) |
| Chick2Step. More... | |
| virtual void | EndStep (void) |
| Chick2 EndSte[. More... | |
| virtual bool | DailyMortality () |
| Background mortality check. More... | |
| virtual bool | OnFarmEvent (FarmToDo event) |
| Management event handler. More... | |
| Partridge_Chick2 (int a_x, int a_y, Partridge_Female *a_mother, Partridge_Covey *a_flock, Landscape *a_map, bool a_sex, int a_family_counter, Partridge_Population_Manager *a_manager) | |
| Constructor. More... | |
| virtual | ~Partridge_Chick2 (void) |
| Destructor. More... | |
Public Member Functions inherited from Partridge_Chick | |
| virtual void | Dying () |
| Generic dying handler. More... | |
| void | OnYouAreDead () |
| Message handler. More... | |
| Partridge_Chick (int a_x, int a_y, Partridge_Female *a_mother, Partridge_Covey *a_flock, Landscape *a_map, bool a_sex, int a_family_counter, Partridge_Population_Manager *a_manager) | |
| Constructor. More... | |
| virtual | ~Partridge_Chick (void) |
| Destructor. 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... | |
| virtual bool | ArePaired () |
| Overridden base function. More... | |
| Partridge_Covey * | GetCovey (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 | KillThis () |
| 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... | |
Private Member Functions | |
| virtual Partridge_State | ChDeveloping (void) |
| State developing. More... | |
| virtual Partridge_State | ChMaturing (void) |
| State maturing. More... | |
Additional Inherited Members | |
Public Attributes inherited from Partridge_Base | |
| Partridge_Population_Manager * | m_OurPopulationManager |
| Pointer to the population manager. More... | |
Protected Member Functions inherited from Partridge_Chick | |
| void | ChDying (void) |
| Chick Dying. More... | |
Protected Member Functions inherited from Partridge_Base | |
| virtual void | CheckMatePointers () |
| Debug. More... | |
Protected Member Functions inherited from TAnimal | |
| void | CorrectWrapRound () |
| Corrects wrap around co-ordinate problems. More... | |
Protected Attributes inherited from Partridge_Chick | |
| bool | m_sex |
| Sex. More... | |
| int | m_starve |
| Days spent starving. 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_Covey * | m_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 |
| Landscape * | m_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... | |
The partridge Chick2 class.
Definition at line 628 of file Partridge_All.h.
| Partridge_Chick2::Partridge_Chick2 | ( | int | a_born_x, |
| int | a_born_y, | ||
| Partridge_Female * | a_mother, | ||
| Partridge_Covey * | a_covey, | ||
| Landscape * | a_map, | ||
| bool | a_sex, | ||
| int | a_family_counter, | ||
| Partridge_Population_Manager * | a_manager | ||
| ) |
Constructor.
Constructor for the Chick2. Uses the Partridge_Chick::Partridge_Chick constructor and then corrects details.
Definition at line 1028 of file Partridge_All.cpp.
References Partridge_Base::m_covey, Partridge_Base::m_object_type, pob_Chick2, and Partridge_Covey::RemoveExtraChick().
|
inlinevirtual |
|
virtual |
Chick2 BeginStep.
BefinStep just checks background mortality and management events.
Reimplemented from Partridge_Chick.
Definition at line 1251 of file Partridge_All.cpp.
References Partridge_Chick::ChDying(), TAnimal::CheckManagement(), DailyMortality(), g_MaxWalk, Partridge_Base::m_age, Partridge_Base::m_covey, Partridge_Base::m_signal, Partridge_Covey::MoveDistance(), and Partridge_Covey::SetChickAge().
|
privatevirtual |
State developing.
Developing is basically being alive each day until becoming an adult object.
Reimplemented from Partridge_Chick.
Definition at line 1205 of file Partridge_All.cpp.
References cfg_par_mature_threshold, Partridge_Base::m_age, pars_ChDeveloping, pars_ChMaturing, and CfgInt::value().
Referenced by EndStep().
|
privatevirtual |
State maturing.
Matures the Chick2 object into an Partridge_Male or Partridge_Female. Passes all useful information using an AdultPartridge_struct.
Reimplemented from Partridge_Chick.
Definition at line 1221 of file Partridge_All.cpp.
References Partridge_struct::bx, Partridge_struct::by, Partridge_Population_Manager::CreateObjects(), Partridge_struct::family_counter, Partridge_Base::m_born_x, Partridge_Base::m_born_y, Partridge_struct::m_covey, Partridge_Base::m_covey, TALMaSSObject::m_CurrentStateNo, Partridge_Base::m_family_counter, TAnimal::m_Location_x, TAnimal::m_Location_y, Partridge_Base::m_OurPopulationManager, Partridge_Chick::m_sex, TALMaSSObject::m_StepDone, Partridge_Covey::OnChickMature(), pars_Destroy, pob_Female, pob_Male, Partridge_Covey::RemoveMember(), Partridge_struct::x, and Partridge_struct::y.
Referenced by Step().
|
virtual |
Background mortality check.
Does the simple probability test against chance of daily mortality for non-specifically modelled mortalities.
Reimplemented from Partridge_Chick.
Definition at line 1179 of file Partridge_All.cpp.
References April, cfg_par_adult_mortalitySummer, cfg_par_adult_mortalityWinter, cfg_par_chick2_mortality, g_rand_uni, TAnimal::m_OurLandscape, Partridge_Base::m_OurPopulationManager, October, Landscape::SupplyDayInYear(), Partridge_Population_Manager::SupplyShouldFlock(), and CfgFloat::value().
Referenced by BeginStep().
|
virtual |
Chick2 EndSte[.
EndStep does development and dying.
Reimplemented from Partridge_Chick.
Definition at line 1302 of file Partridge_All.cpp.
References ChDeveloping(), Partridge_Chick::ChDying(), TALMaSSObject::m_CurrentStateNo, TAnimal::m_OurLandscape, Partridge_Base::m_state, pars_ChDeveloping, pars_ChDying, pars_ChMaturing, pars_Initiation, and Landscape::Warn().
|
virtual |
Management event handler.
Check and respond to farm events either using config variables for cutting or direct inline values.
Reimplemented from Partridge_Chick.
Definition at line 1044 of file Partridge_All.cpp.
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, Partridge_Chick::Dying(), Landscape::EventtypeToString(), fa_ammoniumsulphate, fa_greenmanure, fa_manure, fa_npk, fa_pk, fa_sludge, fa_slurry, 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.
|
virtual |
Chick2Step.
Step only deals with maturing.
Reimplemented from Partridge_Chick.
Definition at line 1273 of file Partridge_All.cpp.
References ChMaturing(), TALMaSSObject::m_CurrentStateNo, TAnimal::m_OurLandscape, Partridge_Base::m_state, TALMaSSObject::m_StepDone, pars_ChDeveloping, pars_ChDying, pars_ChMaturing, pars_Initiation, and Landscape::Warn().