FMT 1.2.0
Forest management tools for forest planning
Loading...
Searching...
No Matches
Rdeclarations.h
Go to the documentation of this file.
1/*
2Copyright (c) 2019 Gouvernement du Qu�bec
3
4SPDX-License-Identifier: LiLiQ-R-1.1
5License-Filename: LICENSES/EN/LiLiQ-R11unicode.txt
6*/
7
8#ifndef RDECLARATIONS_H_INCLUDED
9#define RDECLARATIONS_H_INCLUDED
10
11/*This header file needs to be included before Rcpp.h*/
12
13#include <RcppCommon.h>
14#include <vector>
15#include <map>
16
17#include "FMTDevelopment.h"
18#include "FMTDevelopmentPath.h"
19#include "FMTForest.h"
20//#include "FMTspatialaction.h"
21//#include "FMTGraph.hpp"
22#include "FMTLineGraph.h"
23//#include "FMTSaSolution.h"
24#include "FMTModel.h"
25#include "FMTSeModel.h"
26#include "FMTSrModel.h"
27#include "FMTNssModel.h"
28#if defined FMTWITHOSI
29 #include "FMTLpSolver.h"
30 #include "FMTLpModel.h"
31#endif
32#include "FMTSesModel.h"
33#include "FMTSaSchedule.h"
34//#include "FMTExponentialSchedule.h" // Comment Gab 2026-02-09
35#include "FMTSaModel.h"
36#include "FMTOperatingArea.h"
39
40#include "FMTMask.h"
42#include "FMTFuturDevelopment.h"
43#include "FMTAction.h"
44#include "FMTBounds.hpp"
45#include "FMTTimeYieldHandler.h"
46#include "FMTAgeYieldHandler.h"
47#include "FMTFork.h"
48#include "FMTTransition.h"
49#include "FMTOutputNode.h"
50#include "FMTOutput.h"
51#include "FMTTheme.h"
52#include "FMTSchedule.h"
53#include "FMTGCBMTransition.h"
54#include "FMTConstraint.h"
55#include "FMTCoordinate.h"
56#include "FMTModelParameters.h"
57#include "FMTMaskFilter.h"
58#include "FMTOutputSource.h"
59#include "FMTOperator.h"
60#include "FMTTransitionMask.h"
61
62//Parallel
63#include "FMTTask.h"
64#include "FMTTaskHandler.h"
65#include "FMTReplanningTask.h"
66#include "FMTPlanningTask.h"
67#if defined FMTWITHOSI
69#endif
70
71#define RCPP_DECLAREVECTOR(CLASS)namespace Rcpp{\
72template <> std::vector<CLASS> as(SEXP obj);\
73template <> SEXP wrap(const std::vector<CLASS>& obj);\
74}
75
76#define RCPP_DECLARELIST(CLASS)namespace Rcpp{\
77template <> std::vector<CLASS> as(SEXP obj);\
78template <> SEXP wrap(const std::vector<CLASS>& obj);\
79}
80
81#define RCPP_DECLAREPAIR(FIRST,SECOND)namespace Rcpp{\
82template <> std::pair<FIRST,SECOND> as(SEXP obj);\
83template <> SEXP wrap(const std::pair<FIRST,SECOND>& obj);\
84}
85
86#define RCPP_DECLAREMAP(KEY,OBJECT)namespace Rcpp{\
87template <> std::map<KEY,OBJECT> as(SEXP obj);\
88template <> SEXP wrap(const std::map<KEY,OBJECT>& obj);\
89}
90
91#define RCPP_COMMA ,
92
93//Exception
95
96//Version
97
98//Parser
99RCPP_DECLAREMAP(std::string, std::string); //map of string definition
100
101//Spatial
104//RCPP_DECLAREVECTOR(Spatial::FMTspatialaction);//For vector
105//RCPP_DECLAREMAP(Spatial::FMTCoordinate,Graph::FMTGraph);//For FMTLayer
109//RCPP_DECLAREVECTOR(Spatial::FMTSaSolution);//For vector
110//Models
112RCPP_DECLAREMAP(std::string, double);//For map<string,double>
116
117
118//Parallel
123#ifdef FMTWITHOSI
129#endif
131//Heuristics
132#ifdef FMTWITHOSI
139#endif
140//Core
144RCPP_DECLAREPAIR(Core::FMTMask, Core::FMTSpec);//pair for FMTList
145RCPP_DECLAREVECTOR(Core::FMTSpec);//For vector
146RCPP_DECLAREPAIR(Core::FMTMask, Core::FMTPerBounds);//pair for FMTList
147RCPP_DECLAREVECTOR(Core::FMTPerBounds);//For vector
148RCPP_DECLAREPAIR(Core::FMTMask, Core::FMTAgeBounds);//pair for FMTList
149RCPP_DECLAREVECTOR(Core::FMTAgeBounds);//For vector
150RCPP_DECLAREPAIR(Core::FMTMask, Core::FMTYldBounds);//pair for FMTList
151RCPP_DECLAREVECTOR(Core::FMTYldBounds);//For vector
152RCPP_DECLAREPAIR(Core::FMTMask, Core::FMTLockBounds);//pair for FMTList
153RCPP_DECLAREVECTOR(Core::FMTLockBounds);//For vector
157RCPP_DECLAREPAIR(Core::FMTMask, int);//pair for FMTList
172RCPP_DECLARELIST(std::vector<Core::FMTSchedule>)//For vector of vector
173RCPP_DECLAREVECTOR(Core::FMTGCBMTransition);//For vector
174RCPP_DECLAREVECTOR(Core::FMTConstraint);//For vector
175RCPP_DECLAREMAP(Core::FMTDevelopment, std::vector<double>);//For dev of doubles
176RCPP_DECLAREMAP(std::string, std::vector<double>);//For string of double map
177RCPP_DECLAREMAP(std::string, std::vector<Core::FMTDevelopment>);//For string of vector of developments
178RCPP_DECLAREMAP(Core::FMTAction , std::map<Core::FMTDevelopment RCPP_COMMA std::vector<double>>);//For action of ...
179RCPP_DECLAREMAP(std::string , std::map<std::string RCPP_COMMA std::vector<double>>);//For string of ...
180RCPP_DECLAREPAIR(Core::FMTMask, Core::FMTOutputSource);//pair for FMTList
181RCPP_DECLAREVECTOR(Core::FMTOutputSource);//For vector
182RCPP_DECLAREPAIR(Core::FMTMask, Core::FMTOperator);//pair for FMTList
183RCPP_DECLAREVECTOR(Core::FMTOperator);//For vector
184RCPP_DECLAREPAIR(Core::FMTTransitionMask, Core::FMTTransitionMask);//pair for FMTList
185RCPP_DECLAREVECTOR(Core::FMTTransitionMask);//For vector
186
187
188
189#endif // RDECLARATIONS_H_INCLUDED
#define RCPP_COMMA
Definition: Rdeclarations.h:91
#define RCPP_DECLAREVECTOR(CLASS)
Definition: Rdeclarations.h:71
#define RCPP_DECLAREPAIR(FIRST, SECOND)
Definition: Rdeclarations.h:81
#define RCPP_DECLARELIST(CLASS)
Definition: Rdeclarations.h:76
#define RCPP_DECLAREMAP(KEY, OBJECT)
Definition: Rdeclarations.h:86
List of specifications dictating the operability of a subset of developments to this action.
Definition: FMTAction.h:43
Child class of FMTDevelopment representing an actual forest stand, holding the area of the stand.
Definition: FMTActualDevelopment.h:24
Yield handler for age based yields, as seen in the yield section with _AGE.
Definition: FMTAgeYieldHandler.h:24
Development path holding a generated development and the proportion of area going to it.
Definition: FMTDevelopmentPath.h:26
Base class of FMTActualDevelopment and FMTFuturDevelopment representing a forest stand.
Definition: FMTDevelopment.h:44
Fork of a transition, holding the transition masks (targets and proportions) applied to a development...
Definition: FMTFork.h:38
Child class of FMTDevelopment representing a future stand generated by growth or transition,...
Definition: FMTFuturDevelopment.h:23
Filter built from masks used to preSolve and postsolve FMTMask objects.
Definition: FMTMaskFilter.h:31
Core class holding, as a boost dynamic bitset, which theme attributes are part of a mask.
Definition: FMTMask.h:96
Node of an output representing a set of developments in the graph, holding a source,...
Definition: FMTOutputNode.h:25
Class letting the user formulate a constraint in the optimize section or collect data across the grap...
Definition: FMTOutput.h:37
Spatially referenced schedule describing the area of developments for which an action can be operated...
Definition: FMTSchedule.h:29
Class holding the attributes and aggregates of a single theme, describing a part of a FMTMask.
Definition: FMTTheme.h:47
Yield handler for time based yields, indexed by period.
Definition: FMTTimeYieldHandler.h:25
List of FMTFork describing the transition of an action, disturbing a development to generate new deve...
Definition: FMTTransition.h:35
Base class for yield handlers, holding a mask and the base ages of the yields.
Definition: FMTYieldHandler.h:80
Simple graph where each action generates a single new vertex (0-—0-—0-—0), used with FMTLayer to simu...
Definition: FMTLineGraph.h:27
Definition of a non clustered operating area, used by the FMTOperatingAreaCluster.
Definition: FMTOperatingAreaClusterBinary.h:32
Potential cluster of multiple operating areas.
Definition: FMTOperatingAreaCluster.h:27
Heuristic to do spatial clustering of operating areas across a landscape from a shapefile.
Definition: FMTOperatingAreaClusterer.h:28
Heuristic to solve the spatialization problem across a landscape for multiple operating areas.
Definition: FMTOperatingAreaScheduler.h:57
Operating area scheme giving information about its opening time, green up and return time.
Definition: FMTOperatingAreaScheme.h:42
Operating area giving information about its mask, neighbors and neighbors perimeter.
Definition: FMTOperatingArea.h:29
Type III LP forest planning model, with the graph divided per period.
Definition: FMTLpModel.h:54
Abstract class to ease the usage of the OsiSolverInterface in FMT for linear programming models.
Definition: FMTLpSolver.h:49
Base class for the different models in FMT.
Definition: FMTModel.h:62
Non spatial simulation model, mainly used to simulate stochastic actions during the local replanning ...
Definition: FMTNssModel.h:29
Area restricted model (ARM) using the simulated annealing meta-heuristic to solve the spatial optimiz...
Definition: FMTSaModel.h:40
Abstract class for spatially explicit models, parent of FMTSesModel and FMTSaModel.
Definition: FMTSeModel.h:33
Spatially explicit simulation model using a cellular automaton to simulate actions on a raster stack ...
Definition: FMTSesModel.h:25
Base class holding the attributes and methods shared between the spatially referenced models (FMTLpMo...
Definition: FMTSrModel.h:46
Task to find a suboptimal schedule for the operating areas of a FMTLpModel.
Definition: FMTOpAreaSchedulerTask.h:47
Task to carry multiple parallel optimizations of different FMTModel using the doPlanning function.
Definition: FMTPlanningTask.h:39
Replanning task using global, stochastic and local abstract models to simulate natural disturbances o...
Definition: FMTReplanningTask.h:43
Main class for running concurrent tasks at the same time.
Definition: FMTTaskHandler.h:27
Task for parallel jobs.
Definition: FMTTask.h:27
Spatially referenced coordinate holding an x and y position on a raster grid.
Definition: FMTCoordinate.h:29
Spatially referenced layer of Core::FMTDevelopment representing the forest.
Definition: FMTForest.h:33
The Core namespace provides classes for simulating stands/strata growth/harvest through time.
Definition: FMTAction.h:34
FMTexc
Enumerator describing the exceptions thrown by FMT.
Definition: FMTException.h:45
FMTdblmodelparameters
Enumerator of the double parameters of a FMTModel.
Definition: FMTModelParameters.h:54
FMTintmodelparameters
Enumerator of the integer parameters of a FMTModel.
Definition: FMTModelParameters.h:28
FMTboolmodelparameters
Enumerator of the boolean parameters of a FMTModel.
Definition: FMTModelParameters.h:67
STL namespace.