8#ifndef FMTDEV_H_INCLUDED
9#define FMTDEV_H_INCLUDED
12#include <boost/serialization/serialization.hpp>
13#include <boost/serialization/nvp.hpp>
14#include <boost/serialization/string.hpp>
18#include <boost/serialization/export.hpp>
23 class FMTgraphvertextoyield;
30class FMTfuturdevelopment;
35class FMTdevelopmentpath;
49 friend class boost::serialization::access;
50 template<
class Archive>
51 void serialize(Archive& ar,
const unsigned int version)
54 ar & boost::serialization::make_nvp(
"FMTobject", boost::serialization::base_object<FMTobject>(*
this));
55 ar & BOOST_SERIALIZATION_NVP(mask);
56 ar & BOOST_SERIALIZATION_NVP(age);
57 ar & BOOST_SERIALIZATION_NVP(lock);
58 ar & BOOST_SERIALIZATION_NVP(period);
61 _exhandler->printexceptions(
"",
"FMTdevelopment::serialize", __LINE__, __FILE__);
84 return static_cast<int>(age);
92 return static_cast<int>(lock);
100 return static_cast<int>(period);
167 virtual std::unique_ptr<FMTdevelopment>
Clone()
const;
215 virtual operator std::string()
const;
234 const std::vector<FMTtheme>& themes)
const;
274 const std::vector<FMTaction>& allactions)
const noexcept;
282 boost::hash_combine(seed, boost::hash<Core::FMTmask>()(mask));
283 boost::hash_combine(seed, boost::hash<uint8_t>()(age));
284 boost::hash_combine(seed, boost::hash<uint8_t>()(lock));
285 boost::hash_combine(seed, boost::hash<uint8_t>()(period));
297 struct hash<
Core::FMTdevelopment>
#define FMTEXPORT
Definition: FMTutility.hpp:92
Definition: FMTaction.hpp:42
Definition: FMTdevelopment.hpp:44
std::vector< int > anyworthtestingoperability(const std::vector< const FMTaction * > &actions, const FMTaction &firstaction) const
FMTyieldrequest getyieldrequest(const Graph::FMTgraphvertextoyield *graphyieldrequest=nullptr) const
FMTdevelopment(const FMTdevelopment &rhs)
virtual ~FMTdevelopment()=default
std::vector< FMTdevelopmentpath > operate(const FMTaction &action, const FMTtransition &Transition, const Core::FMTyields &ylds, const std::vector< FMTtheme > &themes) const
void setage(const int &lage)
int getlock() const
Definition: FMTdevelopment.hpp:90
Core::FMTmask getmaskcopy() const
Definition: FMTdevelopment.hpp:114
FMTdevelopment(const FMTmask &lmask, const int &lage, const int &llock, const int &lperiod)
FMTdevelopment clearlock() const
void setlock(const int &llock)
virtual double getarea() const
std::vector< bool > isanyworthtestingoperability(const std::vector< const FMTaction * > &actions, const std::vector< FMTaction > &allactions) const noexcept
const Core::FMTmask & getmask() const
Definition: FMTdevelopment.hpp:106
bool worthtestingoperability(const FMTaction &action) const
void setperiod(const int &lperiod)
FMTdevelopment(const FMTmask &mask, const int &age, const int &lock)
void setmask(const Core::FMTmask &lmask)
bool is(const FMTspec &specification, const Core::FMTyields &ylds, const Graph::FMTgraphvertextoyield *graphyieldrequest=nullptr) const
bool operable(const FMTaction &action, const Core::FMTyields &ylds, const Graph::FMTgraphvertextoyield *graphyieldrequest=nullptr) const
bool anyoperable(const std::vector< const FMTaction * > &actions, const Core::FMTyields &ylds, const Graph::FMTgraphvertextoyield *graphyieldrequest=nullptr) const
size_t hash() const
Definition: FMTdevelopment.hpp:279
double getinventorycoef(const Core::FMTyields &ylds, const std::string &target_yield, const Graph::FMTgraphvertextoyield *graphyieldrequest=nullptr) const
int getage() const
Definition: FMTdevelopment.hpp:82
double getharvestcoef(const std::vector< FMTdevelopmentpath > &topaths, const FMTaction &action, const Core::FMTyields &ylds, const std::string &target_yield, const Graph::FMTgraphvertextoyield *graphyieldrequest=nullptr) const
int getperiod() const
Definition: FMTdevelopment.hpp:98
FMTfuturdevelopment grow() const
virtual std::unique_ptr< FMTdevelopment > Clone() const
Definition: FMTfuturdevelopment.hpp:24
Definition: FMTmask.hpp:96
Definition: FMTobject.hpp:50
Definition: FMTbounds.hpp:342
Definition: FMTtransition.hpp:37
Definition: FMTyieldrequest.hpp:36
Definition: FMTyields.hpp:40
Definition: FMTgraphvertextoyield.hpp:27
The Core namespace provides classes for simulating stands/strata growth/harvest through time.
Definition: FMTaction.hpp:31
Namespace for using/building unidirectional graphs in FMT.
Definition: FMTareaparser.hpp:31
Definition: FMTaction.hpp:364
std::size_t operator()(const Core::FMTdevelopment &dev) const
Definition: FMTdevelopment.hpp:299