iLand
Public Member Functions | Static Public Member Functions | List of all members
Model Class Reference

Main object of the iLand model composited of various sub models / sub components. More...

#include <model.h>

Public Member Functions

 Model ()
 
 ~Model ()
 
void beforeRun ()
 initializations More...
 
void runYear ()
 run a single year More...
 
void afterStop ()
 finish and cleanup More...
 
const ThreadRunnerthreadExec () const
 
const QRectF & extent () const
 extent of the model (without buffer) More...
 
double totalStockableArea () const
 total stockable area of the landscape (ha) More...
 
ResourceUnitru ()
 
ResourceUnitru (QPointF coord)
 ressource unit at given coordinates More...
 
ResourceUnitru (int index)
 get resource unit by index More...
 
ResourceUnitruById (int id) const
 find the resource unit with Id 'id' or return NULL More...
 
const QList< ResourceUnit * > & ruList () const
 ruList contains all simulated resource units (that are in the project area) More...
 
Managementmanagement () const
 
ABE::ForestManagementEngineABEngine () const
 
BITE::BiteEnginebiteEngine () const
 
Environmentenvironment () const
 
Saplingssaplings () const
 
TimeEventstimeEvents () const
 
Modulesmodules () const
 
const DEMdem () const
 
GrassCovergrassCover () const
 
SpeciesSetspeciesSet () const
 
const QList< Climate * > climates () const
 
SVDStatessvdStates () const
 
FloatGridgrid ()
 this is the global 'LIF'-grid (light patterns) (currently 2x2m) More...
 
HeightGridheightGrid ()
 stores maximum heights of trees and some flags (currently 10x10m) More...
 
const MapGridstandGrid ()
 retrieve the spatial grid that defines the stands (10m resolution) More...
 
const Grid< ResourceUnit * > & RUgrid ()
 
const HeightGridValue heightGridValue (const int ix, const int iy) const
 get the value of the (10m) Height grid at the position index ix and iy (of the LIF grid) More...
 
const HeightGridValueheightGridValue (const float *lif_ptr) const
 
void clear ()
 free ressources More...
 
void loadProject ()
 setup and load a project More...
 
bool isSetup () const
 return true if the model world is correctly setup. More...
 
void onlyApplyLightPattern ()
 
void reloadABE ()
 force a recreate of the agent based forest management engine More...
 
QString currentTask () const
 
void setCurrentTask (QString what)
 
void createStandStatistics ()
 build stand statistics (i.e. stats based on resource units) More...
 
void cleanTreeLists (bool recalculate_stats)
 clean the tree data structures (remove harvested trees) - call after management operations. More...
 
void executePerResourceUnit (void(*funcptr)(ResourceUnit *), const bool forceSingleThreaded=false)
 execute a function for each resource unit using multiple threads. "funcptr" is a ptr to a simple function More...
 

Static Public Member Functions

static const ModelSettingssettings ()
 access to global model settings. More...
 
static ModelSettingschangeSettings ()
 write access to global model settings. More...
 

Detailed Description

Main object of the iLand model composited of various sub models / sub components.

The class Model is the top level container of iLand. The Model holds a collection of ResourceUnits, links to SpeciesSet and Climate. ResourceUnit are grid cells with (currently) a size of 1 ha (100x100m). Many stand level processes (NPP produciton, WaterCycle) operate on this level. The Model also contain the landscape-wide 2m LIF-grid (http://iland-model.org/competition+for+light).

Constructor & Destructor Documentation

◆ Model()

Model::Model ( )

◆ ~Model()

Model::~Model ( )

Member Function Documentation

◆ ABEngine()

ABE::ForestManagementEngine * Model::ABEngine ( ) const
inline

◆ afterStop()

void Model::afterStop ( )

finish and cleanup

◆ beforeRun()

void Model::beforeRun ( )

initializations

beforeRun performs several steps before the models starts running.

inter alia: * setup of the stands

  • setup of the climates

◆ biteEngine()

BITE::BiteEngine * Model::biteEngine ( ) const
inline

◆ changeSettings()

static ModelSettings & Model::changeSettings ( )
inlinestatic

write access to global model settings.

◆ cleanTreeLists()

void Model::cleanTreeLists ( bool  recalculate_stats)

clean the tree data structures (remove harvested trees) - call after management operations.

◆ clear()

void Model::clear ( )

free ressources

clear() frees all ressources allocated with the run of a simulation.

◆ climates()

const QList< Climate * > Model::climates ( ) const
inline

◆ createStandStatistics()

void Model::createStandStatistics ( )

build stand statistics (i.e. stats based on resource units)

Force the creation of stand statistics.

  • stocked area (for resourceunit-areas)
  • ru - statistics

◆ currentTask()

QString Model::currentTask ( ) const
inline

◆ dem()

const DEM * Model::dem ( ) const
inline

◆ environment()

Environment * Model::environment ( ) const
inline

◆ executePerResourceUnit()

void Model::executePerResourceUnit ( void(*)(ResourceUnit *)  funcptr,
const bool  forceSingleThreaded = false 
)
inline

execute a function for each resource unit using multiple threads. "funcptr" is a ptr to a simple function

◆ extent()

const QRectF & Model::extent ( ) const
inline

extent of the model (without buffer)

◆ grassCover()

GrassCover * Model::grassCover ( ) const
inline

◆ grid()

FloatGrid * Model::grid ( )
inline

this is the global 'LIF'-grid (light patterns) (currently 2x2m)

◆ heightGrid()

HeightGrid * Model::heightGrid ( )
inline

stores maximum heights of trees and some flags (currently 10x10m)

◆ heightGridValue() [1/2]

const HeightGridValue & Model::heightGridValue ( const float *  lif_ptr) const
inline

◆ heightGridValue() [2/2]

const HeightGridValue Model::heightGridValue ( const int  ix,
const int  iy 
) const
inline

get the value of the (10m) Height grid at the position index ix and iy (of the LIF grid)

◆ isSetup()

bool Model::isSetup ( ) const
inline

return true if the model world is correctly setup.

◆ loadProject()

void Model::loadProject ( )

setup and load a project

Setup of the Simulation.

This really creates the simulation environment and does the setup of various aspects.

◆ management()

Management * Model::management ( ) const
inline

◆ modules()

Modules * Model::modules ( ) const
inline

◆ onlyApplyLightPattern()

void Model::onlyApplyLightPattern ( )
inline

◆ reloadABE()

void Model::reloadABE ( )

force a recreate of the agent based forest management engine

◆ ru() [1/3]

ResourceUnit * Model::ru ( )
inline

◆ ru() [2/3]

ResourceUnit * Model::ru ( int  index)
inline

get resource unit by index

◆ ru() [3/3]

ResourceUnit * Model::ru ( QPointF  coord)

ressource unit at given coordinates

◆ ruById()

ResourceUnit * Model::ruById ( int  id) const

find the resource unit with Id 'id' or return NULL

◆ RUgrid()

const Grid< ResourceUnit * > & Model::RUgrid ( )
inline

◆ ruList()

const QList< ResourceUnit * > & Model::ruList ( ) const
inline

ruList contains all simulated resource units (that are in the project area)

◆ runYear()

void Model::runYear ( )

run a single year

Main model runner.

The sequence of actions is as follows: (1) Load the climate of the new year (2) Reset statistics for resource unit as well as for dead/managed trees (3) Invoke Management. (4) after that, calculate Light patterns (5) 3PG on stand level, tree growth. Clear stand-statistcs before they are filled by single-tree-growth. calculate water cycle (with LAIs before management) (6) execute Regeneration (7) invoke disturbance modules (8) calculate carbon cycle (9) calculate statistics for the year (10) write database outputs

◆ saplings()

Saplings * Model::saplings ( ) const
inline

◆ setCurrentTask()

void Model::setCurrentTask ( QString  what)
inline

◆ settings()

static const ModelSettings & Model::settings ( )
inlinestatic

access to global model settings.

◆ speciesSet()

SpeciesSet * Model::speciesSet ( ) const
inline

◆ standGrid()

const MapGrid * Model::standGrid ( )
inline

retrieve the spatial grid that defines the stands (10m resolution)

◆ svdStates()

SVDStates * Model::svdStates ( ) const
inline

◆ threadExec()

const ThreadRunner & Model::threadExec ( ) const
inline

◆ timeEvents()

TimeEvents * Model::timeEvents ( ) const
inline

◆ totalStockableArea()

double Model::totalStockableArea ( ) const
inline

total stockable area of the landscape (ha)


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