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

This is the class used to calculate a likelihood score by fitting the model population to effort based data. More...

#include <sibyeffortonstep.h>

Inheritance diagram for SIByEffortOnStep:
Inheritance graph
Collaboration diagram for SIByEffortOnStep:
Collaboration graph

Public Member Functions

 SIByEffortOnStep (CommentStream &infile, const IntMatrix &areas, const CharPtrVector &areaindex, const CharPtrVector &fleetindex, const TimeClass *const TimeInfo, const char *datafilename, const char *givenname, int bio)
 This is the SIByEffortOnStep constructor. More...
 
virtual ~SIByEffortOnStep ()
 This is the default SIByEffortOnStep destructor. More...
 
virtual void Sum (const TimeClass *const TimeInfo)
 This function will sum the survey index by fleet length data. More...
 
virtual void setFleetsAndStocks (FleetPtrVector &Fleets, StockPtrVector &Stocks)
 This will select the fleets and stocks required to calculate the survey index likelihood score. More...
 
virtual void Print (ofstream &outfile) const
 This function will print the SIByEffortOnStep information. More...
 
- Public Member Functions inherited from SIOnStep
 SIOnStep (CommentStream &infile, const char *datafilename, const CharPtrVector &aindex, const TimeClass *const TimeInfo, const IntMatrix &areas, const CharPtrVector &charindex, const char *givenname, int bio, SIType type)
 This is the default SIOnStep constructor. More...
 
virtual ~SIOnStep ()
 This is the default SIOnStep destructor. More...
 
virtual void Reset ()
 This function will reset the SIOnStep information. More...
 
virtual void printLikelihood (ofstream &outfile, const TimeClass *const TimeInfo)
 This function will print information from each SIOnStep regression calculation. More...
 
virtual void printSummary (ofstream &outfile, const double weight)
 This function will print summary information from each SIOnStep regression calculation. More...
 
virtual double calcSSE ()
 This function will calculate the SSE from the regression line. More...
 
FitType getType () const
 This will return the fit type for the regression line. More...
 
SIType getSIType () const
 This will return the type of survey index data to be used. 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...
 

Protected Attributes

FleetEffortAggregatoraggregator
 This is the FleetEffortAggregator used to collect information about the relevant fleets for the survey index data. More...
 
const DoubleMatrixdptr
 This is the DoubleMatrix used to temporarily store the information returned from the aggregatation function. More...
 
- Protected Attributes inherited from SIOnStep
IntMatrix Areas
 This is the IntMatrix used to store information about the areas that the survey index should be calculated on. More...
 
IntVector Years
 This is the IntVector used to store information about the years when the survey index should be calculated. More...
 
IntVector Steps
 This is the IntVector used to store information about the steps when the survey index should be calculated. More...
 
IntMatrix Ages
 This is the IntMatrix used to store information about the ages that the survey index should be calculated on. More...
 
LengthGroupDivisionLgrpDiv
 This is the LengthGroupDivision used to store information about the lengths that the survey index should be calculated on. More...
 
DoubleVector likelihoodValues
 This is the DoubleVector used to store the calculated likelihood information. More...
 
ActionAtTimes AAT
 This ActionAtTimes stores information about when the survey index should be calculated. More...
 
DoubleMatrixPtrVector obsIndex
 This is the DoubleMatrixPtrVector used to store the survey indices specified in the input file. More...
 
DoubleMatrixPtrVector modelIndex
 This is the DoubleMatrixPtrVector used to store the survey indices calculated in the model. More...
 
DoubleMatrixPtrVector weightIndex
 This is the DoubleMatrixPtrVector used to store the weights specified for the regression line. More...
 
const AgeBandMatrixPtrVectoralptr
 This is the AgeBandMatrixPtrVector used to temporarily store the information returned from the aggregatation function. More...
 
SIType sitype
 This denotes what type of survey index data is to be used. More...
 
int timeindex
 This is the index of the timesteps for the survey index data. More...
 
int biomass
 This is the flag to denote whether the index should be based on the biomass or not. More...
 
int useweight
 This is the flag to denote whether weighted regression line should be used when calculating the fit to the data or not. More...
 

Detailed Description

This is the class used to calculate a likelihood score by fitting the model population to effort based data.

Constructor & Destructor Documentation

◆ SIByEffortOnStep()

SIByEffortOnStep::SIByEffortOnStep ( CommentStream infile,
const IntMatrix areas,
const CharPtrVector areaindex,
const CharPtrVector fleetindex,
const TimeClass *const  TimeInfo,
const char *  datafilename,
const char *  givenname,
int  bio 
)

This is the SIByEffortOnStep constructor.

Parameters
infileis the CommentStream to read the survey index data from
areasis the IntMatrix of areas that the survey index can take place on
areaindexis the CharPtrVector of area identifier text strings
fleetindexis the CharPtrVector of fleet identifier text strings
TimeInfois the TimeClass for the current model
datafilenameis the name of the file containing the survey index data
givennameis the name of the SIByEffortOnStep likelihood component
biois the flag to denote whether the index should be based on the biomass or not

◆ ~SIByEffortOnStep()

SIByEffortOnStep::~SIByEffortOnStep ( )
virtual

This is the default SIByEffortOnStep destructor.

Member Function Documentation

◆ Print()

virtual void SIByEffortOnStep::Print ( ofstream &  outfile) const
inlinevirtual

This function will print the SIByEffortOnStep information.

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

Implements SIOnStep.

◆ setFleetsAndStocks()

void SIByEffortOnStep::setFleetsAndStocks ( FleetPtrVector Fleets,
StockPtrVector Stocks 
)
virtual

This will select the fleets and stocks required to calculate the survey index likelihood score.

Parameters
Fleetsis the FleetPtrVector of all the available fleets
Stocksis the StockPtrVector of all the available stocks

Implements SIOnStep.

◆ Sum()

void SIByEffortOnStep::Sum ( const TimeClass *const  TimeInfo)
virtual

This function will sum the survey index by fleet length data.

Parameters
TimeInfois the TimeClass for the current model

Implements SIOnStep.

Member Data Documentation

◆ aggregator

FleetEffortAggregator* SIByEffortOnStep::aggregator
protected

This is the FleetEffortAggregator used to collect information about the relevant fleets for the survey index data.

◆ dptr

const DoubleMatrix* SIByEffortOnStep::dptr
protected

This is the DoubleMatrix used to temporarily store the information returned from the aggregatation function.


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