Gadget
Public Member Functions | Protected Attributes | List of all members
OtherFood Class Reference

This is the class used to model the available prey that is not modelled dynamically. More...

#include <otherfood.h>

Inheritance diagram for OtherFood:
Inheritance graph
Collaboration diagram for OtherFood:
Collaboration graph

Public Member Functions

 OtherFood (CommentStream &infile, const char *givenname, const AreaClass *const Area, const TimeClass *const TimeInfo, Keeper *const keeper)
 This is the OtherFood constructor. More...
 
virtual ~OtherFood ()
 This is the default OtherFood destructor. More...
 
virtual void calcEat (int area, const AreaClass *const Area, const TimeClass *const TimeInfo)
 This function will calculate the modelled consumption for an area in the model. More...
 
virtual void checkEat (int area, const TimeClass *const TimeInfo)
 This function will check the modelled consumption for an area in the model. More...
 
virtual void adjustEat (int area, const TimeClass *const TimeInfo)
 This function will adjust the modelled consumption for an area in the model. More...
 
virtual void reducePop (int area, const TimeClass *const TimeInfo)
 This function will reduce the model population for an area in the model. More...
 
virtual void Grow (int area, const AreaClass *const Area, const TimeClass *const TimeInfo)
 This function will calculate the growth of the model population for an area in the model. More...
 
virtual void updateAgePart1 (int area, const TimeClass *const TimeInfo)
 This function will calculate any transition of the model population for an area in the model. More...
 
virtual void updateAgePart2 (int area, const TimeClass *const TimeInfo)
 This function will calculate the age increase of the model population for an area in the model. More...
 
virtual void updateAgePart3 (int area, const TimeClass *const TimeInfo)
 This function will implement the transiton of the model population for an area in the model. More...
 
virtual void updatePopulationPart1 (int area, const TimeClass *const TimeInfo)
 This function will calculate the spawning of the model population for an area in the model. More...
 
virtual void updatePopulationPart2 (int area, const TimeClass *const TimeInfo)
 This function will calculate add the newly matured stock into the model population for an area in the model. More...
 
virtual void updatePopulationPart3 (int area, const TimeClass *const TimeInfo)
 This function will calculate add the new recruits into the model population for an area in the model. More...
 
virtual void updatePopulationPart4 (int area, const TimeClass *const TimeInfo)
 This function will calculate calculate the straying of the model population for an area in the model. More...
 
virtual void updatePopulationPart5 (int area, const TimeClass *const TimeInfo)
 This function will calculate add the strayed stock into the model population for an area in the model. More...
 
virtual void calcNumbers (int area, const TimeClass *const TimeInfo)
 This function will update the model population for an area in the model. More...
 
virtual void Migrate (const TimeClass *const TimeInfo)
 This function will implement the migration of the model population for the model. More...
 
virtual void Reset (const TimeClass *const TimeInfo)
 This function will reset the model population. More...
 
int isOtherFoodStepArea (int area, const TimeClass *const TimeInfo)
 This will check if there is otherfood available on the current timestep. More...
 
LengthPreygetPrey () const
 This will return the otherfood, as a prey type, for use in other functions. More...
 
void Print (ofstream &outfile) const
 This function will print the model population. More...
 
- Public Member Functions inherited from BaseClass
 BaseClass ()
 This is the default BaseClass constructor. More...
 
 BaseClass (const char *givenname)
 This is the BaseClass constructor for an object with a name. More...
 
 BaseClass (const char *givenname, const IntVector &Areas)
 This is the BaseClass constructor for an object with a name and an area. More...
 
virtual ~BaseClass ()
 This is the default BaseClass destructor. More...
 
- Public Member Functions inherited from HasName
 HasName ()
 This is the default HasName constructor. More...
 
virtual ~HasName ()
 This is the default HasName destructor. More...
 
 HasName (const char *givenname)
 This is the HasName constructor for a specified name. More...
 
const char * getName () const
 This will return a null terminated text string containing the name of the object. More...
 
- Public Member Functions inherited from LivesOnAreas
 LivesOnAreas ()
 This is the default LivesOnAreas constructor. More...
 
virtual ~LivesOnAreas ()
 This is the default LivesOnAreas destructor. More...
 
 LivesOnAreas (const IntVector &Areas)
 This is the LivesOnAreas constructor for a specified vector of areas. More...
 
int isInArea (int area) const
 This function will check whether the object is defined on a specified area. More...
 
IntVectorgetAreas ()
 This function will return the internal areas that the object is defined on. More...
 
int areaNum (int area) const
 This function will return the area associated with an internal area. More...
 

Protected Attributes

FormulaMatrix amount
 This is the amount of the otherfood that is available for the predators to consume. More...
 
LengthPreyprey
 This is the otherfood, as a prey in the current model. More...
 
PopInfoMatrix tmpPopulation
 This is the PopInfoMatrix used to temporarily store the amount of food available. More...
 
- Protected Attributes inherited from LivesOnAreas
IntVector areas
 This is the IntVector of internal areas that the object is defined on. More...
 

Additional Inherited Members

- Protected Member Functions inherited from LivesOnAreas
void storeAreas (const IntVector &Areas)
 This function will store the internal areas to be used. More...
 

Detailed Description

This is the class used to model the available prey that is not modelled dynamically.

This class calculates the amount of available non-dynamic prey for stocks to eat. This is to account for the consumption of prey species that are not being modelled in the current simulation

Note
other food is defined as the density of other prey available

Constructor & Destructor Documentation

◆ OtherFood()

OtherFood::OtherFood ( CommentStream infile,
const char *  givenname,
const AreaClass *const  Area,
const TimeClass *const  TimeInfo,
Keeper *const  keeper 
)

This is the OtherFood constructor.

Parameters
infileis the CommentStream to read the other food parameters from
givennameis the name of the other food
Areais the AreaClass for the current model
TimeInfois the TimeClass for the current model
keeperis the Keeper for the current model

◆ ~OtherFood()

OtherFood::~OtherFood ( )
virtual

This is the default OtherFood destructor.

Member Function Documentation

◆ adjustEat()

virtual void OtherFood::adjustEat ( int  area,
const TimeClass *const  TimeInfo 
)
inlinevirtual

This function will adjust the modelled consumption for an area in the model.

Parameters
areais an integer to denote the internal area of interest
TimeInfois the TimeClass for the current model

Implements BaseClass.

◆ calcEat()

virtual void OtherFood::calcEat ( int  area,
const AreaClass *const  Area,
const TimeClass *const  TimeInfo 
)
inlinevirtual

This function will calculate the modelled consumption for an area in the model.

Parameters
areais an integer to denote the internal area of interest
Areais the AreaClass for the current model
TimeInfois the TimeClass for the current model

Implements BaseClass.

◆ calcNumbers()

void OtherFood::calcNumbers ( int  area,
const TimeClass *const  TimeInfo 
)
virtual

This function will update the model population for an area in the model.

Parameters
areais an integer to denote the internal area of interest
TimeInfois the TimeClass for the current model

Implements BaseClass.

◆ checkEat()

void OtherFood::checkEat ( int  area,
const TimeClass *const  TimeInfo 
)
virtual

This function will check the modelled consumption for an area in the model.

Parameters
areais an integer to denote the internal area of interest
TimeInfois the TimeClass for the current model

Implements BaseClass.

◆ getPrey()

LengthPrey* OtherFood::getPrey ( ) const
inline

This will return the otherfood, as a prey type, for use in other functions.

Returns
prey

◆ Grow()

virtual void OtherFood::Grow ( int  area,
const AreaClass *const  Area,
const TimeClass *const  TimeInfo 
)
inlinevirtual

This function will calculate the growth of the model population for an area in the model.

Parameters
areais an integer to denote the internal area of interest
Areais the AreaClass for the current model
TimeInfois the TimeClass for the current model

Implements BaseClass.

◆ isOtherFoodStepArea()

int OtherFood::isOtherFoodStepArea ( int  area,
const TimeClass *const  TimeInfo 
)

This will check if there is otherfood available on the current timestep.

Parameters
areais the area that the otherfood will be consumed on
TimeInfois the TimeClass for the current model
Returns
1 if there is otherfood available, 0 otherwise

◆ Migrate()

virtual void OtherFood::Migrate ( const TimeClass *const  TimeInfo)
inlinevirtual

This function will implement the migration of the model population for the model.

Parameters
TimeInfois the TimeClass for the current model

Implements BaseClass.

◆ Print()

void OtherFood::Print ( ofstream &  outfile) const
virtual

This function will print the model population.

Parameters
outfileis the ofstream that all the model information gets sent to

Implements BaseClass.

◆ reducePop()

virtual void OtherFood::reducePop ( int  area,
const TimeClass *const  TimeInfo 
)
inlinevirtual

This function will reduce the model population for an area in the model.

Parameters
areais an integer to denote the internal area of interest
TimeInfois the TimeClass for the current model

Implements BaseClass.

◆ Reset()

void OtherFood::Reset ( const TimeClass *const  TimeInfo)
virtual

This function will reset the model population.

Parameters
TimeInfois the TimeClass for the current model

Implements BaseClass.

◆ updateAgePart1()

virtual void OtherFood::updateAgePart1 ( int  area,
const TimeClass *const  TimeInfo 
)
inlinevirtual

This function will calculate any transition of the model population for an area in the model.

Parameters
areais an integer to denote the internal area of interest
TimeInfois the TimeClass for the current model

Implements BaseClass.

◆ updateAgePart2()

virtual void OtherFood::updateAgePart2 ( int  area,
const TimeClass *const  TimeInfo 
)
inlinevirtual

This function will calculate the age increase of the model population for an area in the model.

Parameters
areais an integer to denote the internal area of interest
TimeInfois the TimeClass for the current model

Implements BaseClass.

◆ updateAgePart3()

virtual void OtherFood::updateAgePart3 ( int  area,
const TimeClass *const  TimeInfo 
)
inlinevirtual

This function will implement the transiton of the model population for an area in the model.

Parameters
areais an integer to denote the internal area of interest
TimeInfois the TimeClass for the current model

Implements BaseClass.

◆ updatePopulationPart1()

virtual void OtherFood::updatePopulationPart1 ( int  area,
const TimeClass *const  TimeInfo 
)
inlinevirtual

This function will calculate the spawning of the model population for an area in the model.

Parameters
areais an integer to denote the internal area of interest
TimeInfois the TimeClass for the current model

Implements BaseClass.

◆ updatePopulationPart2()

virtual void OtherFood::updatePopulationPart2 ( int  area,
const TimeClass *const  TimeInfo 
)
inlinevirtual

This function will calculate add the newly matured stock into the model population for an area in the model.

Parameters
areais an integer to denote the internal area of interest
TimeInfois the TimeClass for the current model

Implements BaseClass.

◆ updatePopulationPart3()

virtual void OtherFood::updatePopulationPart3 ( int  area,
const TimeClass *const  TimeInfo 
)
inlinevirtual

This function will calculate add the new recruits into the model population for an area in the model.

Parameters
areais an integer to denote the internal area of interest
TimeInfois the TimeClass for the current model

Implements BaseClass.

◆ updatePopulationPart4()

virtual void OtherFood::updatePopulationPart4 ( int  area,
const TimeClass *const  TimeInfo 
)
inlinevirtual

This function will calculate calculate the straying of the model population for an area in the model.

Parameters
areais an integer to denote the internal area of interest
TimeInfois the TimeClass for the current model

Implements BaseClass.

◆ updatePopulationPart5()

virtual void OtherFood::updatePopulationPart5 ( int  area,
const TimeClass *const  TimeInfo 
)
inlinevirtual

This function will calculate add the strayed stock into the model population for an area in the model.

Parameters
areais an integer to denote the internal area of interest
TimeInfois the TimeClass for the current model

Implements BaseClass.

Member Data Documentation

◆ amount

FormulaMatrix OtherFood::amount
protected

This is the amount of the otherfood that is available for the predators to consume.

◆ prey

LengthPrey* OtherFood::prey
protected

This is the otherfood, as a prey in the current model.

◆ tmpPopulation

PopInfoMatrix OtherFood::tmpPopulation
protected

This is the PopInfoMatrix used to temporarily store the amount of food available.


The documentation for this class was generated from the following files: