Class Record#
Defined in File Record.h
Class Documentation#
-
class Record
Records model data.
Creates CoordinateList, Totals and LocalData output .txt files for each repetition of the model. CoordinateList: contains the coordinates of all recorded sites. Totals: contains the total numbers of adult males of each genotype across all sites, for each recorded day of the simulation. LocalData: contains the number of adult males of each genotype for each site on each simulated day that is recorded.
See also
Public Functions
-
Record(RecordParams *rec_params, int rep)
Record constructor.
Creates LocalData, Totals and CoordinateList output .txt files.
Creates a subdirectory for output files in the current directory.
- Parameters:
rec_params – [in] recording parameters
rep – [in] initial repetition label for the given set of runs
-
~Record()
Record destructor.
Resets the current filepath so the output_files directory can be found in the next set of runs.
-
void record_coords(const std::vector<Patch*> &sites)
Records the coordinates of the population sites.
Relevant parameters include the fraction of sites to collect data for.
See also
- Parameters:
sites – [in] vector of all Patch objects
-
void record_global(int day, const std::array<long long int, constants::num_gen> &tot_M_gen)
Records the total numbers of adult mated female mosquitoes for the given day, divided by female genotype.
The totals are assumed to be across all sites.
See also
- Parameters:
day – [in] simulation day
tot_fem_gen – [in] total number of adult mated females divided by female genotype
-
void output_totals(int day, long long int tot_J, long long int tot_M, long long int tot_V, long long int tot_F)
Outputs the total numbers of juvenile (J), adult male (M), adult virgin female (V) and adult mated female (F) mosquitoes for the given day.
The totals are assumed to be across all sites, and over all genotypes and age groups.
See also
- Parameters:
day – [in] simulation day
tot_J – [in] total number of juveniles
tot_M – [in] total number of adult males
tot_V – [in] total number of adult virgin (unmated) females
tot_F – [in] total number of adult mated females
-
void record_local(int day, const std::vector<Patch*> &sites)
Records the number of adult mated females at each site for the given day.
The number of adult mated females at each site is divided by female genotype. Relevant parameters include the fraction of sites to collect data for.
See also
- Parameters:
day – [in] simulation day
sites – [in] vector of all Patch objects
-
bool is_rec_local_time(int day)
Determines if it is time to record local data.
Other relevant parameters include the local recording interval.
See also
Record::record_local(), InputParams::rec_start, InputParams::rec_end, InputParams::rec_interval_local
Note
The initialisation day (day 0) will always be recorded, and the recording window will be inclusive of the start and end times.
- Parameters:
day – [in] simulation day
- Returns:
As you would expect.
-
bool is_rec_global_time(int day)
Determines if it is time to record global data.
The number of adult males at each site is divided by genotype.
See also
- Parameters:
day – [in] simulation day
- Returns:
As you would expect.
-
Record(RecordParams *rec_params, int rep)