FMT 1.2.0
Forest management tools for forest planning
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | Friends | List of all members
Heuristics::FMTOperatingArea Class Reference

Operating area giving information about its mask, neighbors and neighbors perimeter. More...

#include <FMTOperatingArea.h>

Inheritance diagram for Heuristics::FMTOperatingArea:
[legend]
Collaboration diagram for Heuristics::FMTOperatingArea:
[legend]

Public Member Functions

FMTOperatingAreaoperator+= (const double &value)
 Add area to the operating area.
 
std::vector< Core::FMTMaskgetNeighbors () const
 Return a copy of the neighbors masks of the operating area.
 
double getArea () const
 Get the area of the operating area.
 
double getNeighborsPerimeter () const
 Return the percentage of perimeter the operating area needs to share with another operating area to be considered a neighbor.
 
Core::FMTMask getMask () const
 Return the mask of the operating area.
 
void setNeighbors (const std::vector< Core::FMTMask > &lneighbors)
 Set the neighbors masks of the operating area.
 
 FMTOperatingArea (const Core::FMTMask &lmask, const double &lneighborsperimeter)
 Main constructor for FMTOperatingArea from a mask and a neighbors perimeter.
 
void setArea (const double &newarea)
 Set the area of the operating area.
 
 FMTOperatingArea ()=default
 Default constructor for FMTOperatingArea.
 
 FMTOperatingArea (const FMTOperatingArea &rhs)=default
 Copy constructor for FMTOperatingArea.
 
FMTOperatingAreaoperator= (const FMTOperatingArea &rhs)=default
 Copy assignment operator for FMTOperatingArea.
 
bool operator== (const FMTOperatingArea &rhs) const
 Comparison operator for FMTOperatingArea.
 
bool operator!= (const FMTOperatingArea &rhs) const
 Comparison operator for FMTOperatingArea.
 
virtual ~FMTOperatingArea ()=default
 Default destructor for FMTOperatingArea.
 
FMTOperatingArea preSolveOperatingArea (const Core::FMTMaskFilter &filter, const std::vector< Core::FMTTheme > &presolvedthemes) const
 Return a presolved FMTOperatingArea using a mask filter and a subset of the original themes.
 
FMTOperatingArea postSolveOperatingArea (const Core::FMTMaskFilter &filter, const std::vector< Core::FMTTheme > &basethemes) const
 Return a postsolved FMTOperatingArea using a mask filter and the original themes.
 

Protected Attributes

Core::FMTMask m_mask
 The mask describing the operating area.
 
std::vector< Core::FMTMaskm_neighbors
 Neighbors mask of the operating area.
 
double m_neighborsperimeter
 neighborsperimeter is the ratio a operatingarea needs to share to a other operatingarea to be considered neighbor.
 
double m_area
 The initial area of the operating area used as big M for the MIP.
 

Friends

class boost::serialization::access
 Serialize the FMTOperatingArea for multiprocessing across multiple cpus (pickle in Python).
 

Detailed Description

Operating area giving information about its mask, neighbors and neighbors perimeter.

The operating area has to be based on static themes not used within transitions.

Constructor & Destructor Documentation

◆ FMTOperatingArea() [1/3]

Heuristics::FMTOperatingArea::FMTOperatingArea ( const Core::FMTMask lmask,
const double &  lneighborsperimeter 
)

Main constructor for FMTOperatingArea from a mask and a neighbors perimeter.

Before synchronizing to the solver interface, the user has to provide the green up, return time and other parameters for each operating area.

Parameters
[in]lmaskthe mask.
[in]lneighborsperimeterthe neighbors perimeter.

◆ FMTOperatingArea() [2/3]

Heuristics::FMTOperatingArea::FMTOperatingArea ( )
default

Default constructor for FMTOperatingArea.

◆ FMTOperatingArea() [3/3]

Heuristics::FMTOperatingArea::FMTOperatingArea ( const FMTOperatingArea rhs)
default

Copy constructor for FMTOperatingArea.

Parameters
[in]rhsthe FMTOperatingArea to copy.

◆ ~FMTOperatingArea()

virtual Heuristics::FMTOperatingArea::~FMTOperatingArea ( )
virtualdefault

Default destructor for FMTOperatingArea.

Member Function Documentation

◆ getArea()

double Heuristics::FMTOperatingArea::getArea ( ) const

Get the area of the operating area.

Returns
the area.

◆ getMask()

Core::FMTMask Heuristics::FMTOperatingArea::getMask ( ) const

Return the mask of the operating area.

Returns
the mask.

◆ getNeighbors()

std::vector< Core::FMTMask > Heuristics::FMTOperatingArea::getNeighbors ( ) const

Return a copy of the neighbors masks of the operating area.

Returns
the neighbors masks.

◆ getNeighborsPerimeter()

double Heuristics::FMTOperatingArea::getNeighborsPerimeter ( ) const

Return the percentage of perimeter the operating area needs to share with another operating area to be considered a neighbor.

Returns
the neighbors perimeter.

◆ operator!=()

bool Heuristics::FMTOperatingArea::operator!= ( const FMTOperatingArea rhs) const

Comparison operator for FMTOperatingArea.

Parameters
[in]rhsthe FMTOperatingArea to compare to.
Returns
true if both operating areas are different else false.

◆ operator+=()

FMTOperatingArea & Heuristics::FMTOperatingArea::operator+= ( const double &  value)

Add area to the operating area.

Parameters
[in]valuethe area to add.
Returns
a reference to this FMTOperatingArea.

◆ operator=()

FMTOperatingArea & Heuristics::FMTOperatingArea::operator= ( const FMTOperatingArea rhs)
default

Copy assignment operator for FMTOperatingArea.

Parameters
[in]rhsthe FMTOperatingArea to copy.
Returns
a reference to this FMTOperatingArea.

◆ operator==()

bool Heuristics::FMTOperatingArea::operator== ( const FMTOperatingArea rhs) const

Comparison operator for FMTOperatingArea.

Parameters
[in]rhsthe FMTOperatingArea to compare to.
Returns
true if both operating areas are equal else false.

◆ postSolveOperatingArea()

FMTOperatingArea Heuristics::FMTOperatingArea::postSolveOperatingArea ( const Core::FMTMaskFilter filter,
const std::vector< Core::FMTTheme > &  basethemes 
) const

Return a postsolved FMTOperatingArea using a mask filter and the original themes.

Parameters
[in]filterthe mask filter.
[in]basethemesthe base themes.
Returns
the postsolved operating area.

◆ preSolveOperatingArea()

FMTOperatingArea Heuristics::FMTOperatingArea::preSolveOperatingArea ( const Core::FMTMaskFilter filter,
const std::vector< Core::FMTTheme > &  presolvedthemes 
) const

Return a presolved FMTOperatingArea using a mask filter and a subset of the original themes.

Parameters
[in]filterthe mask filter.
[in]presolvedthemesthe presolved themes.
Returns
the presolved operating area.

◆ setArea()

void Heuristics::FMTOperatingArea::setArea ( const double &  newarea)

Set the area of the operating area.

Parameters
[in]newareathe new area.

◆ setNeighbors()

void Heuristics::FMTOperatingArea::setNeighbors ( const std::vector< Core::FMTMask > &  lneighbors)

Set the neighbors masks of the operating area.

Parameters
[in]lneighborsthe neighbors masks.

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Serialize the FMTOperatingArea for multiprocessing across multiple cpus (pickle in Python).

Template Parameters
Archivethe archive type.
Parameters
[in,out]arthe archive to serialize to or from.
[in]versionthe serialization version.

Member Data Documentation

◆ m_area

double Heuristics::FMTOperatingArea::m_area
protected

The initial area of the operating area used as big M for the MIP.

◆ m_mask

Core::FMTMask Heuristics::FMTOperatingArea::m_mask
protected

The mask describing the operating area.

◆ m_neighbors

std::vector<Core::FMTMask> Heuristics::FMTOperatingArea::m_neighbors
protected

Neighbors mask of the operating area.

◆ m_neighborsperimeter

double Heuristics::FMTOperatingArea::m_neighborsperimeter
protected

neighborsperimeter is the ratio a operatingarea needs to share to a other operatingarea to be considered neighbor.


The documentation for this class was generated from the following file: