FMT 0.9.8
Forest management tools for forest planning
Loading...
Searching...
No Matches
FMTsemodel.hpp
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 FMTSEM_H_INCLUDED
9#define FMTSEM_H_INCLUDED
10
11#include "FMTmodel.hpp"
13#include <boost/serialization/vector.hpp>
14#include <boost/serialization/serialization.hpp>
15#include <boost/serialization/nvp.hpp>
16#include <boost/serialization/export.hpp>
17
18namespace Spatial
19{
20 template <typename T>
21 class FMTlayer;
22}
23
24namespace Models
25{
26// DocString: FMTsemodel
33 {
34 // DocString: FMTsemodel::Serialize
38 friend class boost::serialization::access;
39 template<class Archive>
40 void serialize(Archive& ar, const unsigned int version)
41 {
42 ar & boost::serialization::make_nvp("model", boost::serialization::base_object<FMTmodel>(*this));
43 ar & BOOST_SERIALIZATION_NVP(solution);
44 }
45 virtual void swap_ptr(const std::unique_ptr<FMTmodel>& rhs);
46 protected:
47 // DocString: FMTsemodel::spschedule
50 public:
51 // DocString: FMTsemodel()
56 // DocString: ~FMTsemodel()
60 virtual ~FMTsemodel() = default;
61 // DocString: FMTsemodel(const FMTsemodel)
66 // DocString: FMTsemodel(const FMTmodel, const FMTforest)
70 FMTsemodel(const FMTmodel& rhs,const Spatial::FMTforest& forest);
71 // DocString: FMTsemodel(const FMTmodel, const FMTforest)
75 FMTsemodel(const FMTmodel& rhs);
76 // DocString: FMTsemodel::operator=
80 FMTsemodel& operator = (const FMTsemodel& rhs);
81 // DocString: FMTsemodel(FMTsemodel&&)
85 FMTsemodel(FMTsemodel&& rhs)=default;
86 // DocString: FMTsemodel::operator=(FMTsemodel&& rhs)
90 FMTsemodel& operator =(FMTsemodel&& rhs) =default;
91 // DocString: FMTsemodel::getmapping
96 // DocString: FMTsemodel::getspschedule
101 {
102 return solution;
103 }
104 // DocString: FMTsemodel::getdisturbancestats
108 std::string getdisturbancestats() const;
109 // DocString: FMTsemodel::getschedule
115 std::vector<Core::FMTschedule> getschedule(bool withlock=false) const;
116 // DocString: FMTsemodel::setinitialmapping
122 // DocString: FMTsemodel::LogConstraintsInfeasibilities
127 // DocString: FMTsemodel::LogConstraintsFactors
132 // DocString: FMTsemodel::presolve
137 virtual std::unique_ptr<FMTmodel>presolve(
138 std::vector<Core::FMTactualdevelopment> optionaldevelopments = std::vector<Core::FMTactualdevelopment>()) const;
139 // DocString: FMTsemodel::postsolve
144 virtual void postsolve(const FMTmodel& originalbasemodel);
145 // DocString: FMTsemodel::getoutput
152 virtual std::map<std::string, double> getoutput(const Core::FMToutput& output,
153 int period, Core::FMToutputlevel level = Core::FMToutputlevel::standard) const;
154 // DocString: FMTsemodel::getoutput
158 virtual Spatial::FMTlayer<double> getspatialoutput(const Core::FMToutput& output,int period) const;
159 // DocString: FMTsemodel::getsolution
164 virtual Core::FMTschedule getsolution(int period, bool withlock = false) const;
165 // DocString: FMTsemodel::clone
169 virtual std::unique_ptr<FMTmodel>clone() const;
170 // DocString: FMTsemodel::getarea
174 virtual std::vector<Core::FMTactualdevelopment>getarea(int period = 0, bool beforegrowanddeath = false) const;
175 // DocString: FMTsemodel::getcopy
180 virtual std::unique_ptr<FMTmodel> getcopy(int period = 0) const;
181 // DocString: FMTmodel::getobjectivevalue
185 virtual double getobjectivevalue() const;
186 };
187
188}
189
190BOOST_CLASS_EXPORT_KEY(Models::FMTsemodel)
191
192#endif // FMTSEM_H_INCLUDED
#define FMTEXPORT
Definition: FMTutility.hpp:92
Definition: FMToutput.hpp:39
Definition: FMTschedule.hpp:31
Definition: FMTmodel.hpp:60
Definition: FMTsemodel.hpp:33
virtual Spatial::FMTlayer< double > getspatialoutput(const Core::FMToutput &output, int period) const
void LogConstraintsFactors() const
std::string getdisturbancestats() const
FMTsemodel(const FMTmodel &rhs, const Spatial::FMTforest &forest)
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)
Spatial::FMTspatialschedule solution
Contains the builded spatialsolution latest or best one.
Definition: FMTsemodel.hpp:49
virtual double getobjectivevalue() const
virtual std::unique_ptr< FMTmodel > presolve(std::vector< Core::FMTactualdevelopment > optionaldevelopments=std::vector< Core::FMTactualdevelopment >()) const
virtual Core::FMTschedule getsolution(int period, bool withlock=false) const
virtual ~FMTsemodel()=default
virtual std::unique_ptr< FMTmodel > getcopy(int period=0) const
virtual std::vector< Core::FMTactualdevelopment > getarea(int period=0, bool beforegrowanddeath=false) const
FMTsemodel(FMTsemodel &&rhs)=default
void LogConstraintsInfeasibilities() const
FMTsemodel(const FMTsemodel &rhs)
FMTsemodel(const FMTmodel &rhs)
virtual void postsolve(const FMTmodel &originalbasemodel)
virtual std::unique_ptr< FMTmodel > clone() const
virtual std::map< std::string, double > getoutput(const Core::FMToutput &output, int period, Core::FMToutputlevel level=Core::FMToutputlevel::standard) const
Definition: FMTforest.hpp:27
Definition: FMTlayer.hpp:29
Definition: FMTspatialschedule.hpp:44
FMToutputlevel
Definition: FMTutility.hpp:17
@ standard
Definition: FMTutility.hpp:18
Namespace containing all enumerator and classes used to construct or manipulate the different type of...
Definition: FMTareaparser.hpp:50
The spatial namespace provides classes for spatialy explicit simulation/optimization based on raster ...
Definition: FMTareaparser.hpp:36