8#ifndef PYEXPORTParallel_H_INCLUDED
9#define PYEXPORTParallel_H_INCLUDED
20#include "boost/python.hpp"
24BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(push_back_overloads, push_back, 1, 3)
28 namespace bp = boost::python;
29 bp::object ParallelModule(bp::handle<>(bp::borrowed(PyImport_AddModule(
"FMT.Parallel"))));
30 bp::scope().attr(
"Parallel") = ParallelModule;
31 bp::scope ParallelModule_scope = ParallelModule;
32 bp::scope().attr(
"__doc__") =
".. module:: Parallel\n"
34 " :platform: Unix, Windows\n"
35 " :synopsis: Module used for FMT parallel tasks handling.\n"
39 bp::class_<Parallel::FMTtask, bp::bases<Core::FMTobject>>(
"FMTtask",
"@DocString(FMTtask)")
40 .def(bp::init<Parallel::FMTtask>());
42 define_pylist<Parallel::FMTtask>();
44 bp::class_<Parallel::FMTreplanningtask, bp::bases<Parallel::FMTtask>>(
"FMTreplanningtask",
"@DocString(FMTreplanningtask)")
45 .def(bp::init<Parallel::FMTreplanningtask>())
47 const std::string&,
const std::string&,
const std::vector<std::string>&,
49 bp::args(
"Strategic model",
"stochastic model",
"tactic model",
"selected outputs",
"Output folder",
"GDAL driver name",
"GDAL driver creation options",
"Number of replicates",
"Number of replanning periods",
"minimaldrift",
"output level"),
"@DocString(FMTreplanningtask::FMTreplanningtask(const Models::FMTmodel&,const Models::FMTmodel&,const Models::FMTmodel&))"));
51 define_pylist<Parallel::FMTreplanningtask>();
54 bp::class_<Parallel::FMTplanningtask, bp::bases<Parallel::FMTtask>>(
"FMTplanningtask",
"@DocString(FMTplanningtask)")
55 .def(bp::init<Parallel::FMTplanningtask>())
56 .def(bp::init<
const int&,
const int&,
const std::string&, std::string,
58 bp::args(
"Min output period",
"Max output period",
"Output folder",
"GDAL driver name",
"GDAL driver creation options",
"output level",
"primary file localisation"),
"@DocString(FMTplanningtask::FMTplanningtask(...))"))
61 define_pylist<Parallel::FMTplanningtask>();
63 bp::class_<Parallel::FMTopareaschedulertask, bp::bases<Parallel::FMTtask>>(
"FMTopareaschedulertask",
"@DocString(FMTopareaschedulertask")
64 .def(bp::init<Parallel::FMTopareaschedulertask>())
65 .def(bp::init<
const Models::FMTlpmodel&,
const std::vector<Heuristics::FMToperatingareascheme>&,
67 const std::string&,
const unsigned int&,
69 bp::args(
"model",
"operating areas",
"node",
"output location",
"output yield name",
"maxiterations",
"maxtime",
"returntime_output"),
"@DocString(FMTopareaschedulertask::FMTopareaschedulertask(...))"));
71 define_pylist<Parallel::FMTopareaschedulertask>();
74 bp::class_<Parallel::FMTtaskhandler, bp::bases<Core::FMTobject>>(
"FMTtaskhandler",
"@DocString(FMTtaskhandler)")
75 .def(bp::init<Parallel::FMTtaskhandler>())
76 .def(bp::init<const Parallel::FMTtask&, unsigned int>(bp::args(
"Task to provide to the handler",
"Number of threads"),
"@DocString(FMTtaskhandler::FMTtaskhandler(const Parallel::FMTtask&,unsigned int))"))
80 define_pylist<Parallel::FMTtaskhandler>();
Definition: FMToutput.hpp:39
Definition: FMToutputnode.hpp:20
Definition: FMTlpmodel.hpp:57
Definition: FMTmodel.hpp:60
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 >())
FMToutputlevel
Definition: FMTutility.hpp:17
Definition: PYdefinitions.hpp:14
void exportParallel()
Definition: PYexportParallel.hpp:26