FMT 1.2.0
Forest management tools for forest planning
Loading...
Searching...
No Matches
RexportParallel.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 REXPORTPARALLEL_H_INCLUDED
9#define REXPORTPARALLEL_H_INCLUDED
10
11#include "FMTTask.h"
12#include "FMTTaskHandler.h"
13#include "FMTReplanningTask.h"
14#include "FMTPlanningTask.h"
15#if defined FMTWITHOSI
17#endif
18#include "FMTModel.h"
19#include "FMTOutput.h"
20#include "FMTutility.h"
21#include <Rcpp.h>
22#include <vector>
23
27
31
35#if defined FMTWITHOSI
39#endif
40
44
45
46namespace R
47{
48
50 {
51
52 Rcpp::class_<Parallel::FMTTask>("FMTtask", "@DocString(FMTTask)")
53 .derives<Core::FMTObject>("FMTobject")
54 .constructor("@DocString(FMTTask())");
55
56 Rcpp::class_<Parallel::FMTReplanningTask>("FMTreplanningtask", "@DocString(FMTReplanningTask)")
57 .derives<Parallel::FMTTask>("FMTtask")
58 .constructor("@DocString(FMTReplanningTask::FMTReplanningTask(...))")
59 .constructor<const Models::FMTModel&,
60 const Models::FMTModel&,
61 const Models::FMTModel&,
62 std::string,
63 std::string,
64 std::vector<std::string>,
65 Core::FMToutputlevel>("@DocString(FMTReplanningTask())")
66 .method("setreplicates", static_cast<void(Parallel::FMTReplanningTask::*)(const int&)>(&Parallel::FMTReplanningTask::setReplicates),"@DocString(FMTReplanningTask::setreplicates)")
67 .method("setreplanningperiods", &Parallel::FMTReplanningTask::setReplanningPeriods,
68 "@DocString(FMTReplanningTask::setreplanningperiods)");
69
70
71 Rcpp::class_<Parallel::FMTPlanningTask>("FMTplanningtask", "@DocString(FMTPlanningTask)")
72 .derives<Parallel::FMTTask>("FMTtask")
73 .constructor("@DocString(FMTPlanningTask::FMTPlanningTask())")
74 .constructor<int,
75 int,
76 std::string,
77 std::string,
78 std::vector<std::string>,
80 std::string>("@DocString(FMTPlanningTask::FMTPlanningTask(...))")
81 .method("push_back", &Parallel::FMTPlanningTask::push_back,
82 "@DocString(FMTPlanningTask::push_back");
83#if defined FMTWITHOSI
84 Rcpp::class_<Parallel::FMTOpAreaSchedulerTask>("FMTopareaschedulertask", "@DocString(FMTOpAreaSchedulerTask)")
85 .derives<Parallel::FMTTask>("FMTtask")
86 .constructor("@DocString(FMTOpAreaSchedulerTask::FMTOpAreaSchedulerTask())")
87 .constructor<Models::FMTLpModel,
88 std::vector<Heuristics::FMTOperatingAreaScheme>,
89 Core::FMTOutputNode,std::string,
90 std::string,unsigned int,double>("@DocString(FMTOpAreaSchedulerTask::FMTOpAreaSchedulerTask(...))");
91#endif
92
93 Rcpp::class_<Parallel::FMTTaskHandler>("FMTtaskhandler", "@DocString(FMTTaskHandler)")
94 .derives<Core::FMTObject>("FMTobject")
95 .constructor("@DocString(FMTTaskHandler())")
96 .constructor<const Parallel::FMTTask&,unsigned int>("@DocString(FMTTaskHandler(const Parallel::FMTTask&,unsigned int))")
97 .method("conccurentrun", &Parallel::FMTTaskHandler::conccurentRun,
98 "@DocString(FMTTaskHandler::conccurentrun)")
99 .method("ondemandrun", &Parallel::FMTTaskHandler::onDemandRun,
100 "@DocString(FMTTaskHandler::ondemandrun)");
101
102 }
103}
104#endif // PYEXPORTPARALLEL_H_INCLUDED
RCPP_DEFINEVECTOR(Parallel::FMTTask)
RCPP_EXPOSED_AS(Parallel::FMTTask)
RCPP_EXPOSED_WRAP(Parallel::FMTTask)
Base class of multiple FMT classes holding a shared exception handler pointer and logger.
Definition: FMTObject.h:49
Node of an output representing a set of developments in the graph, holding a source,...
Definition: FMTOutputNode.h:25
Type III LP forest planning model, with the graph divided per period.
Definition: FMTLpModel.h:54
Base class for the different models in FMT.
Definition: FMTModel.h:62
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
void push_back(const Models::FMTModel &model, std::vector< Core::FMTSchedule >schedules=std::vector< Core::FMTSchedule >(), std::vector< Core::FMTOutput >louputs=std::vector< Core::FMTOutput >())
Push a new FMTModel in the task queue with an optional schedule.
Replanning task using global, stochastic and local abstract models to simulate natural disturbances o...
Definition: FMTReplanningTask.h:43
void setReplicates(const int &replicatesnumber)
Set the number of replicates to use.
void setReplanningPeriods(const int &periodsnumber)
Set the number of replanning periods.
Main class for running concurrent tasks at the same time.
Definition: FMTTaskHandler.h:27
void conccurentRun()
Use the split task virtual function to generate all the tasks and run them at the same time.
void onDemandRun()
Use the spawn task virtual function to generate tasks from the master task and add them to a list,...
Task for parallel jobs.
Definition: FMTTask.h:27
FMToutputlevel
Enumerator describing the level of detail of an output (standard, total only, development).
Definition: FMTutility.h:22
Definition: RexportCore.h:153
void exportParallel()
Definition: RexportParallel.h:49