Modular Megafauna Model 1.1.5
A physiological, dynamic herbivore simulator in C++.
Loading...
Searching...
No Matches
Fauna::Demo::Framework Class Reference

Performs demo simulations for the Modular Megafauna Model. More...

#include <demo_simulator.h>

Public Member Functions

 Framework ()
 Constructor. More...
 
void print_help ()
 Print the help text to STDOUT. More...
 
void print_usage ()
 Print the short usage text to STDERR. More...
 
bool run (const std::string insfile_fauna, const std::string insfile_demo)
 Run a simulation. More...
 

Static Public Member Functions

static Frameworkget_instance ()
 Get singleton instance of the class. More...
 

Private Member Functions

void read_instruction_file (const std::string filename)
 Set params from given TOML instruction file for the demo simulator. More...
 
 Framework (Framework const &)
 Deleted copy constructor. More...
 
void operator= (Framework const &)
 Deleted assignment constructor. More...
 

Private Attributes

struct {
   std::string   outputdirectory = "./"
 
   int   nyears = 100
 
   int   nhabitats_per_group = 4
 
   int   ngroups = 3
 
   SimpleHabitat::Parameters   habitat
 
params
 Parameter values from instruction file. More...
 
std::vector< std::string > mandatory_parameters
 List of mandatory instruction file parameters. More...
 

Static Private Attributes

static const int COORDINATES_PRECISION
 Number of decimal places in output tables. More...
 

Detailed Description

Performs demo simulations for the Modular Megafauna Model.

See also
Singleton for an explanation of the design pattern used.
Demo Simulator

Constructor & Destructor Documentation

◆ Framework() [1/2]

Fauna::Demo::Framework::Framework ( )
inline

Constructor.

◆ Framework() [2/2]

Fauna::Demo::Framework::Framework ( Framework const &  )
private

Deleted copy constructor.

Member Function Documentation

◆ get_instance()

static Framework & Fauna::Demo::Framework::get_instance ( )
inlinestatic

Get singleton instance of the class.

Creates the object on first call.

◆ operator=()

void Fauna::Demo::Framework::operator= ( Framework const &  )
private

Deleted assignment constructor.

◆ print_help()

void Framework::print_help ( )

Print the help text to STDOUT.

◆ print_usage()

void Framework::print_usage ( )

Print the short usage text to STDERR.

◆ read_instruction_file()

void Framework::read_instruction_file ( const std::string  filename)
private

Set params from given TOML instruction file for the demo simulator.

◆ run()

bool Framework::run ( const std::string  insfile_fauna,
const std::string  insfile_demo 
)

Run a simulation.

At all critical points, exceptions are caught.

Parameters
insfile_faunaPath to the instruction file for the megafauna model.
insfile_demoInstruction file for the demo simulator framework.
Returns
true on success, false on failure

Member Data Documentation

◆ COORDINATES_PRECISION

const int Fauna::Demo::Framework::COORDINATES_PRECISION
staticprivate

Number of decimal places in output tables.

◆ habitat

SimpleHabitat::Parameters Fauna::Demo::Framework::habitat

◆ mandatory_parameters

std::vector<std::string> Fauna::Demo::Framework::mandatory_parameters
private

List of mandatory instruction file parameters.

◆ ngroups

int Fauna::Demo::Framework::ngroups = 3

◆ nhabitats_per_group

int Fauna::Demo::Framework::nhabitats_per_group = 4

◆ nyears

int Fauna::Demo::Framework::nyears = 100

◆ outputdirectory

std::string Fauna::Demo::Framework::outputdirectory = "./"

◆ 

struct { ... } Fauna::Demo::Framework::params

Parameter values from instruction file.

The initialization values are just arbitrary.


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