8#ifndef REXPORTMODEL_H_INCLUDED
9#define REXPORTMODEL_H_INCLUDED
63 Rcpp::class_<Models::FMTmodel>(
"FMTmodel",
"@DocString(FMTmodel)")
65 .constructor<Models::FMTmodel>(
"@DocString(FMTmodel(Models::FMTmodel))")
66 .constructor(
"@DocString(FMTmodel())")
68 "@DocString(FMTmodel::getname)")
70 "@DocString(FMTmodel::getyields)")
72 "@DocString(FMTmodel::setyields)")
74 "@DocString(FMTmodel::getarea)")
76 "@DocString(FMTmodel::setarea)")
78 "@DocString(FMTmodel::getthemes)")
80 "@DocString(FMTmodel::setthemes)")
82 "@DocString(FMTmodel::getactions)")
84 "@DocString(FMTmodel::setactions)")
86 "@DocString(FMTmodel::getoutputs)")
88 "@DocString(FMTmodel::setoutputs)")
90 "@DocString(FMTmodel::getconstraints)")
92 "@DocString(FMTmodel::setconstraints)")
94 "@DocString(FMTmodel::gettransitions)")
96 "@DocString(FMTmodel::settransitions)")
98 "@DocString(FMTmodel::setname)")
100 "@DocString(FMTmodel::setareaperiod)")
102 "@DocString(FMTmodel::getlifespan)")
104 "@DocString(FMTmodel::setlifespan)")
106 "@DocString(FMTmodel::isvalid)")
108 "@DocString(FMTmodel::getpostsolvefilter)")
110 "@DocString(FMTmodel::isoptimal)")
112 "@DocString(FMTmodel::getobjectivevalue)")
113 .method(
"setboolparameter",
115 "@DocString(Models::FMTmodel::setparameter(const FMTboolmodelparameters,const bool))")
116 .method(
"setintparameter",
118 "@DocString(Models::FMTmodel::setparameter(const FMTintmodelparameters,const int))")
119 .method(
"setdblparameter",
121 "@DocString(Models::FMTmodel::setparameter(const FMTdblmodelparameters,const int))")
123 "@DocString(FMTmodel::showparameters)")
125 "@DocString(FMTmodel::doplanning)");
127 Rcpp::class_<Models::FMTsemodel>(
"FMTsemodel",
"@DocString(FMTsemodel)")
129 .constructor(
"@DocString(FMTsemodel())")
132 "@DocString(FMTsemodel::getmapping)")
134 "@DocString(FMTsemodel::getschedule)")
136 "@DocString(FMTsemodel::getdisturbances)")
138 "@DocString(FMTsemodel::setinitialmapping)")
140 "@DocString(FMTsemodel::getschedule)")
142 "@DocString(FMTsemodel::getdisturbancestats)");
145 Rcpp::class_<Models::FMTsesmodel>(
"FMTsesmodel",
"@DocString(FMTsesmodel)")
147 .constructor(
"@DocString(FMTsesmodel())")
150 "@DocString(FMTsesmodel:::greedyreferencebuild)");
153 Rcpp::class_<Models::FMTlpsolver>(
"FMTlpsolver",
"@DocString(FMTlpsolver)")
154 .constructor(
"@DocString(FMTlpsolver())")
156 "@DocString(FMTlpsolver::isProvenOptimal)")
158 "@DocString(FMTlpsolver::getObjValue)")
160 "@DocString(FMTlpsolver::writeLP)")
162 "@DocString(FMTlpsolver::writeMPS)");
165 Rcpp::class_<Models::FMTsrmodel>(
"FMTsrmodel",
"@DocString(FMTsrmodel)")
167 .constructor(
"@DocString(FMTsrmodel())")
169 "@DocString(FMTsrmodel::buildperiod)")
171 "@DocString(FMTsrmodel::boundsolution)")
173 "@DocString(FMTsrmodel::getsolution)")
175 "@DocString(FMTsrmodel::setsolution)")
177 "@DocString(FMTsrmodel::setsolutionbylp)")
178 .method(
"getoutputsdataframe", &Models::FMTsrmodel::getoutputsdataframe,
179 "@DocString(FMTsrmodel::getoutputsdataframe)")
181 "@DocString(FMTsrmodel::getoutput)")
183 "@DocString(FMTsrmodel::getstats)");
185 Rcpp::class_<Models::FMTnssmodel>(
"FMTnssmodel",
"@DocString(FMTnssmodel)")
187 .constructor(
"@DocString(FMTnssmodel())")
188 .constructor<
Models::FMTmodel,
unsigned int>(
"@DocString(FMTnssmodel(Models::FMTmodel,unsigned int))")
190 "@DocString(FMTnssmodel::simulate)");
194 Rcpp::class_<Models::FMTlpmodel>(
"FMTlpmodel",
"@DocString(FMTlpmodel)")
196 .constructor<Models::FMTmodel, Models::FMTsolverinterface>(
"@DocString(FMTlpmodel(Models::FMTmodel,Models::FMTsolverinterface))")
197 .constructor(
"@DocString(FMTlpmodel())")
200 "@DocString(FMTlpmodel::setobjective)")
202 "@DocString(FMTlpmodel::setconstraint)")
204 "@DocString(FMTlpmodel::eraseconstraint)")
206 "@DocString(FMTlpmodel::eraseperiod)")
208 "@DocString(FMTlpmodel::resolve)")
210 "@DocString(FMTlpmodel::initialsolve)")
211 .method(
"eq", &Models::FMTlpmodel::operator ==,
212 "@DocString(FMTlpmodel::operator==)")
213 .method(
"ne", &Models::FMTlpmodel::operator !=,
214 "@DocString(FMTlpmodel::operator!=)")
216 "@DocString(FMTlpmodel::getoperatingareaschedulerheuristics)")
218 "@DocString(FMTlpmodel::getvariabilities)")
220 "@DocString(FMTlpmodel::getareavariabilities)")
222 "@DocString(FMTlpmodel::writeLP)")
224 "@DocString(FMTlpmodel::setstrictlypositivesoutputsmatrix)")
226 "@DocString(FMTlpmodel::getObjValue)")
228 "@DocString(FMTlpmodel::writeMPS)");;
234 Rcpp::class_<Models::FMTsamodel>(
"FMTsamodel",
"@DocString(FMTsamodel)")
236 .constructor<Models::FMTmodel>(
"@DocString(FMTsamodel(FMTmodel))")
237 .constructor(
"@DocString(FMTsamodel())")
239 "@DocString(FMTsamodel::initialsolve)");
RCPP_EXPOSED_WRAP(Models::FMTmodel)
RCPP_EXPOSED_AS(Models::FMTmodel)
RCPP_DEFINEVECTOR(Models::FMTmodel)
RCPP_DEFINEMAP(std::string, double)
RCPP_EXPOSED_ENUM_NODECL(Models::FMTsolverinterface)
Definition: FMTobject.hpp:50
Definition: FMTlpmodel.hpp:57
void writeMPS(const std::string &location)
Graph::FMTgraphstats eraseconstraint(const Core::FMTconstraint &constraint, int period=-1)
Graph::FMTgraphstats eraseperiod(bool constraintsonly=false)
Graph::FMTgraphstats setconstraint(const Core::FMTconstraint &constraint)
void writeLP(const std::string &location)
Graph::FMTgraphstats setobjective(const Core::FMTconstraint &objective)
void setstrictlypositivesoutputsmatrix()
std::map< std::string, std::vector< double > > getvariabilities(const std::vector< Core::FMToutput > &outputs, const int &periodstart, const int &periodstop)
double getObjValue() const
std::vector< Heuristics::FMToperatingareascheduler > getoperatingareaschedulerheuristics(const std::vector< Heuristics::FMToperatingareascheme > &opareas, const Core::FMToutputnode &node, size_t numberofheuristics=1, bool copysolver=true)
std::map< std::string, std::vector< double > > getareavariabilities(const std::vector< Core::FMToutput > &localoutputs, const std::vector< Core::FMTmask > &globalmasks, std::vector< double > tolerances=std::vector< double >()) const
Definition: FMTlpsolver.hpp:39
bool isProvenOptimal() const
double getObjValue() const
void writeLP(const std::string &location) const
void writeMPS(const std::string &location) const
Definition: FMTmodel.hpp:60
void setname(const std::string &newname)
void setyields(const Core::FMTyields &lylds)
Core::FMTlifespans getlifespan() const
Definition: FMTmodel.hpp:233
virtual bool setparameter(const FMTintmodelparameters &key, const int &value)
void setconstraints(const std::vector< Core::FMTconstraint > &lconstraint)
std::string getname() const
Definition: FMTmodel.hpp:193
void setarea(const std::vector< Core::FMTactualdevelopment > &ldevs)
std::vector< Core::FMToutput > getoutputs() const
Definition: FMTmodel.hpp:241
Core::FMTyields getyields() const
Definition: FMTmodel.hpp:225
virtual bool isoptimal() const
std::vector< Core::FMTtransition > gettransitions() const
Definition: FMTmodel.hpp:217
virtual void showparameters(const bool &showhelp=false) const
Core::FMTmaskfilter getpostsolvefilter(const std::vector< Core::FMTtheme > &originalthemes, const Core::FMTmask &devmask) const
std::vector< Core::FMTaction > getactions() const
Definition: FMTmodel.hpp:209
std::vector< Core::FMTtheme > getthemes() const
Definition: FMTmodel.hpp:201
virtual std::vector< Core::FMTactualdevelopment > getarea(int period=0, bool beforegrowanddeath=false) const
void setareaperiod(const int &period)
void setlifespan(const Core::FMTlifespans &llifespan)
void settransitions(const std::vector< Core::FMTtransition > <ransitions)
void setoutputs(const std::vector< Core::FMToutput > &newoutputs)
void setactions(const std::vector< Core::FMTaction > &lactions)
virtual bool doplanning(const bool &solve, std::vector< Core::FMTschedule > schedules=std::vector< Core::FMTschedule >())
virtual double getobjectivevalue() const
void setthemes(const std::vector< Core::FMTtheme > <hemes)
std::vector< Core::FMTconstraint > getconstraints() const
Definition: FMTmodel.hpp:249
Definition: FMTnssmodel.hpp:31
Definition: FMTsamodel.hpp:44
Definition: FMTsemodel.hpp:33
virtual Spatial::FMTlayer< double > getspatialoutput(const Core::FMToutput &output, int period) const
std::string getdisturbancestats() const
std::vector< Core::FMTschedule > getschedule(bool withlock=false) const
Spatial::FMTspatialschedule getspschedule() const
Definition: FMTsemodel.hpp:100
Spatial::FMTforest getmapping() const
bool setinitialmapping(Spatial::FMTforest forest)
Definition: FMTsesmodel.hpp:28
std::map< std::string, double > greedyreferencebuild(const Core::FMTschedule &schedule, const size_t &randomiterations, unsigned int seed=0, double tolerance=FMT_DBL_TOLERANCE)
Definition: FMTsrmodel.hpp:44
bool setsolutionbylp(int period, const Core::FMTschedule &schedule, double tolerance=FMT_DBL_TOLERANCE)
Graph::FMTgraphstats buildperiod(Core::FMTschedule schedule=Core::FMTschedule(), bool forcepartialbuild=false, int compressageclassoperability=1)
Graph::FMTgraphstats getstats() const
bool boundsolution(int period, double tolerance=FMT_DBL_TOLERANCE)
virtual std::map< std::string, double > getoutput(const Core::FMToutput &output, int period, Core::FMToutputlevel level=Core::FMToutputlevel::standard) const
bool setsolution(int period, const Core::FMTschedule &schedule, double tolerance=FMT_DBL_TOLERANCE)
Core::FMTschedule getsolution(int period, bool withlock=false) const final
FMTdblmodelparameters
Definition: FMTmodelparameters.hpp:37
FMTsolverinterface
Definition: FMTsolverinterface.hpp:21
FMTintmodelparameters
Definition: FMTmodelparameters.hpp:24
FMTboolmodelparameters
Definition: FMTmodelparameters.hpp:45
Definition: RexportCore.hpp:153
void exportModel()
Definition: RexportModel.hpp:61