FMT 0.9.8
Forest management tools for forest planning
|
#include <FMTmodel.hpp>
Public Member Functions | |
Models::FMTmodel | aggregateAllActions (const std::vector< std::string > &p_Aggregates) const |
Aggregate actions together and create en enterly new model with new -actions,transitions,outputs,constraints,yields,lifespan. | |
std::vector< Core::FMTschedule > | aggregateSchedules (const std::vector< Core::FMTschedule > &p_schedules) const |
Build new schedule based on p_schedules with the corresponding aggregated actions. | |
virtual void | setparallellogger (Logging::FMTlogger &logger) |
virtual void | clearcache () |
FMTmodel (const std::vector< Core::FMTactualdevelopment > &larea, const std::vector< Core::FMTtheme > <hemes, const std::vector< Core::FMTaction > &lactions, const std::vector< Core::FMTtransition > <ransitions, const Core::FMTyields &lyields, const Core::FMTlifespans &llifespan, const std::string &lname, const std::vector< Core::FMToutput > &loutputs, std::vector< Core::FMTconstraint > lconstraints=std::vector< Core::FMTconstraint >(), FMTmodelparameters lparameters=FMTmodelparameters()) | |
FMTmodel () | |
virtual | ~FMTmodel ()=default |
FMTmodel (FMTmodel &&rhs)=default | |
FMTmodel & | operator= (FMTmodel &&rhs)=default |
virtual std::vector< Core::FMTactualdevelopment > | getarea (int period=0, bool beforegrowanddeath=false) const |
virtual std::unique_ptr< FMTmodel > | getcopy (int period=0) const |
FMTmodel | basepresolve () const |
Core::FMTmaskfilter | getpresolvefilter (const std::vector< Core::FMTtheme > &originalthemes) const |
Core::FMTmaskfilter | getpostsolvefilter (const std::vector< Core::FMTtheme > &originalthemes, const Core::FMTmask &devmask) const |
Core::FMTmask | getselectedmask (const std::vector< Core::FMTtheme > &originalthemes) const |
virtual std::unique_ptr< FMTmodel > | presolve (std::vector< Core::FMTactualdevelopment > optionaldevelopments=std::vector< Core::FMTactualdevelopment >()) const |
virtual void | postsolve (const FMTmodel &originalbasemodel) |
Core::FMTschedule | presolveschedule (const Core::FMTschedule &originalbaseschedule, const FMTmodel &originalbasemodel) const |
FMTmodelstats | getmodelstats () const |
void | cleanactionsntransitions () |
std::string | getname () const |
std::vector< Core::FMTtheme > | getthemes () const |
std::vector< Core::FMTaction > | getactions () const |
std::vector< Core::FMTtransition > | gettransitions () const |
Core::FMTyields | getyields () const |
Core::FMTlifespans | getlifespan () const |
std::vector< Core::FMToutput > | getoutputs () const |
std::vector< Core::FMTconstraint > | getconstraints () const |
void | addoutput (const std::string &name, const std::string &maskstring, Core::FMTotar outputtarget, std::string action=std::string(), std::string yield=std::string(), std::string description=std::string(), int targettheme=-1) |
template<typename T > | |
void | addyieldhandlers (const std::vector< T > &yieldhandlers) |
void | addyieldhandlersfromptr (const std::vector< std::unique_ptr< Core::FMTyieldhandler > > &yieldhandlers) |
bool | operator== (const FMTmodel &rhs) const |
bool | operator< (const FMTmodel &rhs) const |
void | setarea (const std::vector< Core::FMTactualdevelopment > &ldevs) |
void | setthemes (const std::vector< Core::FMTtheme > <hemes) |
void | setactions (const std::vector< Core::FMTaction > &lactions) |
void | settransitions (const std::vector< Core::FMTtransition > <ransitions) |
void | setconstraints (const std::vector< Core::FMTconstraint > &lconstraint) |
void | setyields (const Core::FMTyields &lylds) |
void | setlifespan (const Core::FMTlifespans &llifespan) |
void | setname (const std::string &newname) |
void | setoutputs (const std::vector< Core::FMToutput > &newoutputs) |
bool | isvalid () |
std::vector< Core::FMTtheme > | locatestaticthemes (const Core::FMToutput &output, bool ignoreoutputvariables=false) const |
std::vector< Core::FMTtheme > | locatestaticthemes (const Core::FMToutputnode &output, bool ignoreoutputvariables=false) const |
std::vector< Core::FMTtheme > | locatedynamicthemes (const Core::FMToutput &outpu, bool ignoreoutputvariables=false) const |
Core::FMTmask | getdynamicmask (const Core::FMToutput &output, bool ignoreoutputvariables=false) const |
Core::FMTmask | getdynamicmask (const Core::FMToutputnode &node, bool ignoreoutputvariables=false) const |
Core::FMTmask | getstaticmask (const Core::FMToutputnode &node, bool ignoreoutputvariables=false) const |
bool | isstaticnode (const Core::FMToutputnode &node, double ratioofset=0.1) const |
std::vector< Core::FMTtheme > | locatestatictransitionsthemes () const |
std::vector< Core::FMTtheme > | locatenodestaticthemes (const Core::FMToutputnode &node, bool ignoreoutputvariables=false, std::vector< Core::FMTtheme > basethemes=std::vector< Core::FMTtheme >()) const |
FMTmodel (const FMTmodel &rhs) | |
FMTmodel & | operator= (const FMTmodel &rhs) |
bool | empty () const |
void | push_back (const FMTmodel &rhs) |
double | getinitialarea () const |
void | setareaperiod (const int &period) |
Core::FMTschedule | getpotentialschedule (std::vector< Core::FMTactualdevelopment > toremove, std::vector< Core::FMTactualdevelopment > selection, bool withlock=true) const |
virtual std::vector< Core::FMTconstraint > | getreplanningconstraints (const std::string &modeltype, const std::vector< Core::FMTconstraint > &localconstraints, const int &period) const |
virtual bool | doplanning (const bool &solve, std::vector< Core::FMTschedule > schedules=std::vector< Core::FMTschedule >()) |
virtual std::map< std::string, double > | getoutput (const Core::FMToutput &output, int period, Core::FMToutputlevel level=Core::FMToutputlevel::standard) const |
virtual Core::FMTschedule | getsolution (int period, bool withlock=false) const |
virtual std::map< std::string, std::vector< std::vector< double > > > | getoutputsfromperiods (const std::vector< Core::FMToutput > &theoutputs, const int &firstperiod, const int &lastperiod, Core::FMToutputlevel level=Core::FMToutputlevel::standard) const |
virtual std::unique_ptr< FMTmodel > | clone () const |
virtual bool | setparameter (const FMTintmodelparameters &key, const int &value) |
virtual bool | setparameter (const FMTdblmodelparameters &key, const double &value) |
virtual bool | setparameter (const FMTboolmodelparameters &key, const bool &value) |
int | getparameter (const FMTintmodelparameters &key) const |
double | getparameter (const FMTdblmodelparameters &key) const |
bool | getparameter (const FMTboolmodelparameters &key) const |
bool | setcompresstime (const int &periodstart, const int &periodstop, const int &value) |
std::vector< int > | getcompresstime () const |
std::vector< Core::FMTconstraint > | goalconstraints (double penalty=999999) const |
std::vector< Core::FMTconstraint > | gettacticalconstraints (double penalty=999999, double scheduleweight=999999, double objective=0, double objectivefactor=1.0) const |
virtual void | showparameters (const bool &showhelp=false) const |
virtual bool | build (std::vector< Core::FMTschedule > schedules=std::vector< Core::FMTschedule >()) |
virtual bool | solve () |
virtual bool | isoptimal () const |
virtual double | getobjectivevalue () const |
Public Member Functions inherited from Core::FMTobject | |
FMTobject () | |
virtual | ~FMTobject () |
FMTobject (const std::shared_ptr< Exception::FMTexceptionhandler > exhandler) | |
FMTobject (const FMTobject &rhs) | |
FMTobject & | operator= (const FMTobject &rhs) |
virtual void | passinlogger (const std::shared_ptr< Logging::FMTlogger > &logger) |
void | passinexceptionhandler (const std::shared_ptr< Exception::FMTexceptionhandler > &exhandler) |
void | redirectlogtofile (const std::string &location) |
virtual void | setdefaultlogger () |
virtual void | setquietlogger () |
virtual void | settasklogger () |
virtual void | setdebuglogger () |
void | setdefaultexceptionhandler () |
void | setquietexceptionhandler () |
void | setdebugexceptionhandler () |
void | setfreeexceptionhandler () |
void | disablenestedexceptions () |
void | enablenestedexceptions () |
void | seterrorstowarnings (const std::vector< Exception::FMTexc > &errors) |
void | setmaxwarningsbeforesilenced (const size_t &maxwarningcount) |
Static Public Member Functions | |
static Core::FMTaction | defaultdeathaction (const Core::FMTlifespans &llifespan, const std::vector< Core::FMTtheme > <hemes) |
static Core::FMTtransition | defaultdeathtransition (const Core::FMTlifespans &llifespan, const std::vector< Core::FMTtheme > <hemes) |
Static Public Member Functions inherited from Core::FMTobject | |
static std::string | getruntimelocation () |
static unsigned long long | getavailablememory () |
Protected Member Functions | |
void | setdefaultobjects () |
Core::FMTmask | getbasemask (std::vector< Core::FMTactualdevelopment > optionaldevelopments) const |
std::vector< size_t > | getstatictransitionthemes () const |
std::vector< Core::FMTtheme > | getstaticpresolvethemes () const |
void | clearactionscache () |
void | clearyieldcache () |
void | cleartransitioncache () |
virtual void | swap_ptr (const std::unique_ptr< FMTmodel > &rhs) |
std::vector< Core::FMTschedule > | setupschedulesforbuild (const std::vector< Core::FMTschedule > &schedules) const |
bool | useactionserie () const |
size_t | getseriesmaxsize () const |
Protected Member Functions inherited from Core::FMTobject | |
template<class Archive > | |
void | forcesave (Archive &ar, const unsigned int version) const |
template<class Archive > | |
void | forceload (Archive &ar, const unsigned int version) |
void | checksignals () const |
void | setCPLhandler () |
Protected Attributes | |
FMTmodelparameters | parameters |
std::vector< Core::FMTactualdevelopment > | area |
Actualdevelopments for period 0, seen in the area section or the shapefile/raster. | |
std::vector< Core::FMTtheme > | themes |
Model themes of the landscape section file. | |
std::vector< Core::FMTaction > | actions |
Model actions from the action file and also the _death action. | |
std::vector< Core::FMTtransition > | transitions |
Model transitions from the transition file and also the _death transition. | |
Core::FMTyields | yields |
Yields data comming from the yield file. | |
Core::FMTlifespans | lifespan |
lifespan data comming from the lifespan file | |
std::vector< Core::FMToutput > | outputs |
Outputs comming from the ouput file. | |
std::vector< Core::FMTconstraint > | constraints |
Outputs comming from the optimization file. | |
std::string | name |
The name of the Model (name of the .pri file without extension) | |
std::vector< size_t > | statictransitionthemes |
The location of the themes static from transitions. | |
Friends | |
template<class T1 , class T2 > | |
class | Graph::FMTgraph |
class | Graph::FMTlinegraph |
class | Spatial::FMTspatialschedule |
class | Spatial::FMTspatialnodescache |
class | Parser::FMTmodelparser |
class | Graph::FMTgraphvertextoyield |
class | boost::serialization::access |
Additional Inherited Members | |
Static Protected Member Functions inherited from Core::FMTobject | |
static std::chrono::time_point< std::chrono::high_resolution_clock > | getclock () |
template<class chrono > | |
static double | getduration (const std::chrono::time_point< std::chrono::high_resolution_clock > &startclock) |
static std::string | getdurationinseconds (const std::chrono::time_point< std::chrono::high_resolution_clock > &startclock) |
Static Protected Attributes inherited from Core::FMTobject | |
static std::shared_ptr< Exception::FMTexceptionhandler > | _exhandler |
A shared pointer to the exception handler. | |
static std::shared_ptr< Logging::FMTlogger > | _logger |
A shared pointer to the logger. | |
FMTmodel is the base class of multiple models in FMT It' is the formulation has seen in the Woodstock files of a forest planning problem. FMTlpmodel / FMTsamodel / FMTsesmodel use the FMTmodel protected member to generate the problem based on LP/SA or to simply simulate the FMTmodel.
Models::FMTmodel::FMTmodel | ( | const std::vector< Core::FMTactualdevelopment > & | larea, |
const std::vector< Core::FMTtheme > & | lthemes, | ||
const std::vector< Core::FMTaction > & | lactions, | ||
const std::vector< Core::FMTtransition > & | ltransitions, | ||
const Core::FMTyields & | lyields, | ||
const Core::FMTlifespans & | llifespan, | ||
const std::string & | lname, | ||
const std::vector< Core::FMToutput > & | loutputs, | ||
std::vector< Core::FMTconstraint > | lconstraints = std::vector< Core::FMTconstraint >() , |
||
FMTmodelparameters | lparameters = FMTmodelparameters() |
||
) |
Main constructor for FMTmodel used in Parser::FMTmodelparser, the constraints and parameters are optional. For the FMTsesmodel no constraints are needed.
Models::FMTmodel::FMTmodel | ( | ) |
Default constructor of FMTmodel.
|
virtualdefault |
Default virtual desctructor of FMTmodel.
void Models::FMTmodel::addoutput | ( | const std::string & | name, |
const std::string & | maskstring, | ||
Core::FMTotar | outputtarget, | ||
std::string | action = std::string() , |
||
std::string | yield = std::string() , |
||
std::string | description = std::string() , |
||
int | targettheme = -1 |
||
) |
Change the function to accept a FMTouptut******** Adds one output to the model base only on strings. name = output name maskstring = string of the mask "? ? ?" outputtarget = type of ouput created action = action string targeted yield = yield string targeted description = description of the output
|
inline |
Add FMTyieldhandler from vector (yieldhandlers) to yields. Can only be use for FMTageyieldhandler and FMTtimeyieldhandler. If you want to add FMTmodelyieldhandler or FMTcomplexyieldhander it must be added in the .yld file to parse with the model.
void Models::FMTmodel::addyieldhandlersfromptr | ( | const std::vector< std::unique_ptr< Core::FMTyieldhandler > > & | yieldhandlers | ) |
Add unique pointer of FMTyieldhandler from vector (yieldhandlers) to yields.
Models::FMTmodel Models::FMTmodel::aggregateAllActions | ( | const std::vector< std::string > & | p_Aggregates | ) | const |
Aggregate actions together and create en enterly new model with new -actions,transitions,outputs,constraints,yields,lifespan.
p_Aggregates | the actions aggregate we want to merge together |
std::vector< Core::FMTschedule > Models::FMTmodel::aggregateSchedules | ( | const std::vector< Core::FMTschedule > & | p_schedules | ) | const |
Build new schedule based on p_schedules with the corresponding aggregated actions.
p_schedules | the schedules of the original model. |
FMTmodel Models::FMTmodel::basepresolve | ( | ) | const |
This function use the existin area and call the presolve function The function can reduce the number of global themes/actions/transitions/yields/lifespans/outputs/constraints data if the model is badly formulated.
|
inlinevirtual |
Virtual function overrided all type of models. In child class, this function is use to build the elements needed to solve the model.
Reimplemented in Models::FMTlpmodel, Models::FMTnssmodel, Models::FMTsamodel, and Models::FMTsesmodel.
void Models::FMTmodel::cleanactionsntransitions | ( | ) |
Function do delete action that have no defined transition and to delete transition that have no defined action. Actions and transitions are then sorted.
|
protected |
|
virtual |
Clear caching element to reduce memory usage.
Reimplemented in Models::FMTlpmodel.
|
protected |
|
protected |
|
virtual |
Get a clone of the FMTmodel
Reimplemented in Models::FMTlpmodel, Models::FMTnssmodel, Models::FMTsemodel, Models::FMTsesmodel, Models::FMTsamodel, and Models::FMTsrmodel.
|
static |
Returns the default death action when not specified by the user, base on specific lifespan and themes.
|
static |
Returns the default death transition when not specified by the user, base on specific lifespan and themes.
|
virtual |
Build the model and do the initialsolve or simulate. This function use the build and solve overrided functions of the differents model type.
bool Models::FMTmodel::empty | ( | ) | const |
Returns true if the FMTmodel is empty.
|
inline |
Getter returning a copy of the FMTactions vector<> of the model.
|
virtual |
Virtual function to get the area of a given period into actualdevelopement. If before grow = true it will returns the developement before it grow and death to the next period.
Reimplemented in Models::FMTsemodel, and Models::FMTsrmodel.
|
protected |
Return a mask covering the actual bits used by the FMTmodel and the optionaldevelopements.
std::vector< int > Models::FMTmodel::getcompresstime | ( | ) | const |
Return avec vector with compresstime value for each periods. First period is the index 0 in the vector. See FMTmodelparameters.h.
|
inline |
Getter returning a copy of the FMTconstraints vector<> of the model.
|
virtual |
This function returns a copy of the FMTmodel of the selected period. The function is going to clean the FMTconstraints and keep the objective.
Reimplemented in Models::FMTlpmodel, Models::FMTnssmodel, Models::FMTsamodel, Models::FMTsemodel, Models::FMTsesmodel, and Models::FMTsrmodel.
Core::FMTmask Models::FMTmodel::getdynamicmask | ( | const Core::FMToutput & | output, |
bool | ignoreoutputvariables = false |
||
) | const |
Based on static and dynamic themes will return a mask where the static attributes will have a value of 0 and dynamic value a value of 1.
Core::FMTmask Models::FMTmodel::getdynamicmask | ( | const Core::FMToutputnode & | node, |
bool | ignoreoutputvariables = false |
||
) | const |
Based on static and dynamic themes will return a mask where the static attributes will have a value of 0 and dynamic value a value of 1.
double Models::FMTmodel::getinitialarea | ( | ) | const |
Returns the sum of the area of the area vector.
|
inline |
Getter returning a copy of the FMTlifespan data of the model.
FMTmodelstats Models::FMTmodel::getmodelstats | ( | ) | const |
Return the statistics of the model, the number of themes, yields, actions, transitions etc...
|
inline |
Returns the name of the FMTmodel
|
virtual |
Return the value of the globalobjective
Reimplemented in Models::FMTsemodel, and Models::FMTsrmodel.
|
virtual |
Get the output value of a output for a given period using the spatial solution. the map key returned consist of output name if level == FMToutputlevel::standard || level == FMToutputlevel::totalonly, or developement name if level == FMToutputlevel::developpement
Reimplemented in Models::FMTlpmodel, Models::FMTsemodel, and Models::FMTsrmodel.
|
inline |
Getter returning a copy of the FMToutputs vector<> of the model.
|
virtual |
For each output get a vector of outputs values starting for first period to last period.
bool Models::FMTmodel::getparameter | ( | const FMTboolmodelparameters & | key | ) | const |
Getter for bool model parameters. Return the parameters value. See FMTmodelparameters.h.
double Models::FMTmodel::getparameter | ( | const FMTdblmodelparameters & | key | ) | const |
Getter for double model parameters. Return the parameters value. See FMTmodelparameters.h.
int Models::FMTmodel::getparameter | ( | const FMTintmodelparameters & | key | ) | const |
Getter for int model parameters. Return the parameters value. See FMTmodelparameters.h.
Core::FMTmaskfilter Models::FMTmodel::getpostsolvefilter | ( | const std::vector< Core::FMTtheme > & | originalthemes, |
const Core::FMTmask & | devmask | ||
) | const |
Get the postsolve filter used by the presolve (in case you want to turn presolved mask into postsolve mask).
Core::FMTschedule Models::FMTmodel::getpotentialschedule | ( | std::vector< Core::FMTactualdevelopment > | toremove, |
std::vector< Core::FMTactualdevelopment > | selection, | ||
bool | withlock = true |
||
) | const |
The function will remove (toremove) developments from a selected vector (selection). Test operability of the difference and return a schedule containing an area of 1.0 if the developement is operable to this actions.
Core::FMTmaskfilter Models::FMTmodel::getpresolvefilter | ( | const std::vector< Core::FMTtheme > & | originalthemes | ) | const |
Get the presolve filter.
|
virtual |
Ajust constraints that need to be set to a value (getoutput) of the global or local model and return all constraint.
Reimplemented in Models::FMTlpmodel.
Core::FMTmask Models::FMTmodel::getselectedmask | ( | const std::vector< Core::FMTtheme > & | originalthemes | ) | const |
If the model is presolved you can call this function to get the selection mask that you need to use to presolve a FMTmask.
|
protected |
Get the maximal serie size for the whole model.
|
virtual |
Get the standard solution for a given period (FMTschedule dont have natural growth solution included). If with lock is true then the schedule will contain locked developement.
Reimplemented in Models::FMTsemodel, and Models::FMTsrmodel.
Core::FMTmask Models::FMTmodel::getstaticmask | ( | const Core::FMToutputnode & | node, |
bool | ignoreoutputvariables = false |
||
) | const |
Based on static and dynamic themes will return a mask where the static attributes will have a value of 1 and dynamic value a value of 0.
|
protected |
Using the transition themes look at constraints and actions or yields actions to return only themes that are not part of the model.
|
protected |
locate the static transition themes.
std::vector< Core::FMTconstraint > Models::FMTmodel::gettacticalconstraints | ( | double | penalty = 999999 , |
double | scheduleweight = 999999 , |
||
double | objective = 0 , |
||
double | objectivefactor = 1.0 |
||
) | const |
Get the constraints adapted for a tactical model.
|
inline |
Getter returning a copy of the FMTthemes vector<> of the model.
|
inline |
Getter returning a copy of the FMTtransitions vector<> of the model.
|
inline |
Getter returning a copy of the FMTyields data of the model.
std::vector< Core::FMTconstraint > Models::FMTmodel::goalconstraints | ( | double | penalty = 999999 | ) | const |
Return all constraints and objective with goals and penalty
|
virtual |
Return true if the FMTmodel is optimal
Reimplemented in Models::FMTsrmodel.
bool Models::FMTmodel::isstaticnode | ( | const Core::FMToutputnode & | node, |
double | ratioofset = 0.1 |
||
) | const |
Based on static and dynamic themes will return true if the node can be used in staticmask fonctions. More that ratio of set is high the more you will get true from this fonction.
bool Models::FMTmodel::isvalid | ( | ) |
This function validate all the FMTmodel FMTtheme ->FMTactualdevelopements-> FMTyields -> FMTaction -> FMTtransition -> FMToutput -> FMTconstraint return true if the model is valid.
std::vector< Core::FMTtheme > Models::FMTmodel::locatedynamicthemes | ( | const Core::FMToutput & | outpu, |
bool | ignoreoutputvariables = false |
||
) | const |
Returns themes used in the transition scheme.
std::vector< Core::FMTtheme > Models::FMTmodel::locatenodestaticthemes | ( | const Core::FMToutputnode & | node, |
bool | ignoreoutputvariables = false , |
||
std::vector< Core::FMTtheme > | basethemes = std::vector< Core::FMTtheme >() |
||
) | const |
Returns the static themes based on model transitions.
std::vector< Core::FMTtheme > Models::FMTmodel::locatestaticthemes | ( | const Core::FMToutput & | output, |
bool | ignoreoutputvariables = false |
||
) | const |
Based on the FMTmodel looks at every theme to located in the FMTtransitions and return themes that are not used into the transition and in a given output (staticthemes)... will return themes based on spatial units.
std::vector< Core::FMTtheme > Models::FMTmodel::locatestaticthemes | ( | const Core::FMToutputnode & | output, |
bool | ignoreoutputvariables = false |
||
) | const |
Based on the FMTmodel looks at every theme to located in the FMTtransitions and return themes that are not used into the transition and in a given output node (staticthemes)... will return themes based on spatial units.
std::vector< Core::FMTtheme > Models::FMTmodel::locatestatictransitionsthemes | ( | ) | const |
Returns the static themes based on model transitions.
bool Models::FMTmodel::operator< | ( | const FMTmodel & | rhs | ) | const |
less than operator of FMTlpmodel
Default move assignment for FMTmodel.
bool Models::FMTmodel::operator== | ( | const FMTmodel & | rhs | ) | const |
Comparison operator of FMTlpmodel
|
virtual |
Reimplemented in Models::FMTsemodel, and Models::FMTsrmodel.
|
virtual |
This function use a vector of developments and the actual transitions of the model and return new presolved FMTmodel. The function can reduce the number of global themes/actions/transitions/yields/lifespans/outputs/constraints data if the model is badly formulated.
Reimplemented in Models::FMTlpmodel, Models::FMTnssmodel, Models::FMTsamodel, Models::FMTsemodel, Models::FMTsesmodel, and Models::FMTsrmodel.
Core::FMTschedule Models::FMTmodel::presolveschedule | ( | const Core::FMTschedule & | originalbaseschedule, |
const FMTmodel & | originalbasemodel | ||
) | const |
Using the original schedule (not presolved) and the original model (not presolved) it returns a new schedule with presolved FMTdevelopements masks and actions.
void Models::FMTmodel::push_back | ( | const FMTmodel & | rhs | ) |
void Models::FMTmodel::setactions | ( | const std::vector< Core::FMTaction > & | lactions | ) |
Setter for the FMTactions of the model will replace the originals.
void Models::FMTmodel::setarea | ( | const std::vector< Core::FMTactualdevelopment > & | ldevs | ) |
Setter for initial FMTactualdevelopment (area section) will replace the originals. This function also check if the actualdevelopement lifespan is shorter than the lock. If not so, it raise the error FMTdeathwithlock and if the error is set to warning, the locks of the FMTactualdevelpement will be reduced accordingly.
void Models::FMTmodel::setareaperiod | ( | const int & | period | ) |
Change to initial area period to the new targeted period.
bool Models::FMTmodel::setcompresstime | ( | const int & | periodstart, |
const int & | periodstop, | ||
const int & | value | ||
) |
Set compresstime value for a range of periods (periodstart,periodstop). See FMTmodelparameters.h.
void Models::FMTmodel::setconstraints | ( | const std::vector< Core::FMTconstraint > & | lconstraint | ) |
Setter for the FMTconstraints of the model will replace the original.
|
protected |
If the user has not defined the _DEATH action and/or the _DEATH transition default _DEATH action and transition are going to be defined when the FMTmodel class is constructed.
void Models::FMTmodel::setlifespan | ( | const Core::FMTlifespans & | llifespan | ) |
Setter for the FMTlifespans data of the model will replace the original.
void Models::FMTmodel::setname | ( | const std::string & | newname | ) |
Set the names of the FMTmodel
void Models::FMTmodel::setoutputs | ( | const std::vector< Core::FMToutput > & | newoutputs | ) |
Setter for the model's outputs.
|
virtual |
Solver's logger cannot work in parallel so you need to pass a logger owned by the thead to the solver to make sure it does not work in concurrency.
Reimplemented in Models::FMTsrmodel.
|
virtual |
Setter for bool model parameters. See FMTmodelparameters.h.
Reimplemented in Models::FMTnssmodel, and Models::FMTsrmodel.
|
virtual |
Setter for double model parameters. See FMTmodelparameters.h.
|
virtual |
Setter for int model parameters. See FMTmodelparameters.h.
Reimplemented in Models::FMTnssmodel, and Models::FMTsrmodel.
void Models::FMTmodel::setthemes | ( | const std::vector< Core::FMTtheme > & | lthemes | ) |
Setter for the FMTthemes of the model will replace the originals.
void Models::FMTmodel::settransitions | ( | const std::vector< Core::FMTtransition > & | ltransitions | ) |
Setter for the FMTtransitions of the model will replace the originals.
|
protected |
Base on the FORCE_PARTIAL_BUILD it will prepare the pass in schedules for building. Will make sure that the length is covered with a schedule or an empty one. It will always return a filled vector.
void Models::FMTmodel::setyields | ( | const Core::FMTyields & | lylds | ) |
Setter for the FMTyields data of the model will replace the original.
|
virtual |
Show parameters values. If (showhelp) a brief description of each parameters will appear.
|
inlinevirtual |
Virtual function overrided all type of models. In child class, this function is use to solve the model.
Reimplemented in Models::FMTlpmodel, Models::FMTnssmodel, Models::FMTsamodel, and Models::FMTsesmodel.
|
protectedvirtual |
Swap *this for the element at the end of the rhs unique_ptr.
Reimplemented in Models::FMTsamodel.
|
protected |
Returns true if the model make use of action series.
|
friend |
Save function is for serialization, used to do multiprocessing across multiple cpus (pickle in Pyhton)
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
protected |
Model actions from the action file and also the _death action.
|
protected |
Actualdevelopments for period 0, seen in the area section or the shapefile/raster.
|
protected |
Outputs comming from the optimization file.
|
protected |
lifespan data comming from the lifespan file
|
protected |
The name of the Model (name of the .pri file without extension)
|
protected |
Outputs comming from the ouput file.
|
protected |
Parameters needed for the function doplanning by the different types of FMTmodel. See FMTmodelparameters for detail description or use FMTmodel::showparameters(true) to see your parameters and a brief description.
|
protected |
The location of the themes static from transitions.
|
protected |
Model themes of the landscape section file.
|
protected |
Model transitions from the transition file and also the _death transition.
|
protected |
Yields data comming from the yield file.