FMT 1.2.0
Forest management tools for forest planning
Loading...
Searching...
No Matches
FMTOperatingAreaClusterBinary.h
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#ifdef FMTWITHOSI
9
10#ifndef FMToperatingareaclusterbinary_Hm_included
11#define FMToperatingareaclusterbinary_Hm_included
12
13#include <boost/serialization/serialization.hpp>
14#include <boost/serialization/nvp.hpp>
15#include <boost/serialization/export.hpp>
16#include "FMTOperatingArea.h"
17
18
19namespace Core
20{
21 class FMTOutput;
22}
23
24namespace Heuristics
25{
26// DocString: FMTOperatingAreaClusterBinary
32 {
33 public:
34 // DocString: FMTOperatingAreaClusterBinary::FMTOperatingAreaClusterBinary()
39 // DocString: FMTOperatingAreaClusterBinary::FMTOperatingAreaClusterBinary(const FMTOperatingAreaClusterBinary&)
44 // DocString: FMTOperatingAreaClusterBinary::operator=
50 // DocString: FMTOperatingAreaClusterBinary::~FMTOperatingAreaClusterBinary()
55 // DocString: FMTOperatingAreaClusterBinary::FMTOperatingAreaClusterBinary(const FMTOperatingArea&)
61 // DocString: FMTOperatingAreaClusterBinary::filterNeighbors
67 std::vector<FMTOperatingAreaClusterBinary> filterNeighbors(std::vector<FMTOperatingAreaClusterBinary> potentiallink) const;
68 // DocString: FMTOperatingAreaClusterBinary::getOutputIntersect
76 const std::vector<Core::FMTTheme>& themes) const;
77 // DocString: FMTOperatingAreaClusterBinary::setStatistic
82 void setStatistic(const double& statvalue);
83 // DocString: FMTOperatingAreaClusterBinary::setVariable
88 void setVariable(const int& lvariable);
89 // DocString: FMTOperatingAreaClusterBinary::getVariable
94 inline const int& getVariable() const
95 {
96 return m_variable;
97 }
98 // DocString: FMTOperatingAreaClusterBinary::getStatistic
103 inline const double& getStatistic() const
104 {
105 return m_statistic;
106 }
107
108 private:
109 friend class boost::serialization::access;
110 // DocString: FMTOperatingAreaClusterBinary::serialize
117 template<class Archive>
118 void serialize(Archive& ar, const unsigned int version)
119 {
120 ar & boost::serialization::make_nvp("operatingarea", boost::serialization::base_object<FMTOperatingArea>(*this));
121 ar & boost::serialization::make_nvp("variable", m_variable);
122 ar & boost::serialization::make_nvp("statistic", m_statistic);
123 }
124 // DocString: FMTOperatingAreaClusterBinary::m_variable
126 int m_variable;
127 // DocString: FMTOperatingAreaClusterBinary::m_statistic
129 double m_statistic;
130 };
131
132}
133BOOST_CLASS_EXPORT_KEY(Heuristics::FMTOperatingAreaClusterBinary)
134#endif
135#endif
#define FMTEXPORT
Definition: FMTutility.h:125
Class letting the user formulate a constraint in the optimize section or collect data across the grap...
Definition: FMTOutput.h:37
Definition of a non clustered operating area, used by the FMTOperatingAreaCluster.
Definition: FMTOperatingAreaClusterBinary.h:32
const int & getVariable() const
Return the binary variable of the LP model representing the operating area.
Definition: FMTOperatingAreaClusterBinary.h:94
FMTOperatingAreaClusterBinary()=default
Default constructor for FMTOperatingAreaClusterBinary.
~FMTOperatingAreaClusterBinary()=default
Default destructor for FMTOperatingAreaClusterBinary.
void setVariable(const int &lvariable)
Set the binary variable of the LP model representing the operating area.
Core::FMTOutput getOutputIntersect(const Core::FMTOutput &output, const std::vector< Core::FMTTheme > &themes) const
Intersect the mask of an output with the mask of the operating area to get an output targeting only t...
void setStatistic(const double &statvalue)
Set the statistic of the cluster binary used in the global objective to minimize heterogeneity.
const double & getStatistic() const
Return the statistic value of the operating area.
Definition: FMTOperatingAreaClusterBinary.h:103
FMTOperatingAreaClusterBinary(const FMTOperatingArea &oparea)
Construct a FMTOperatingAreaClusterBinary from a base operating area.
std::vector< FMTOperatingAreaClusterBinary > filterNeighbors(std::vector< FMTOperatingAreaClusterBinary > potentiallink) const
Filter a list of potential binary links by looking at the neighbors of each binary to keep only the r...
FMTOperatingAreaClusterBinary(const FMTOperatingAreaClusterBinary &)=default
Default copy constructor for FMTOperatingAreaClusterBinary.
Operating area giving information about its mask, neighbors and neighbors perimeter.
Definition: FMTOperatingArea.h:29
The Core namespace provides classes for simulating stands/strata growth/harvest through time.
Definition: FMTAction.h:34
Namespace regrouping all tools for solving LP/MIP problems using an heuristic.
Definition: FMTAreaParser.h:47