This page provides only an overview of the installation process and features of FMT. For more details, visit our documentation page here.
FMT (Forest Management Tool) is an open source Forest Management library.
FMT allows the user to generate and solve spatially referenced type III forest planning model problems. The tool can be used to do sensitivity analyses over multiple parameters of the forest planning model. It can also be used for analysing impacts of stochastic events such as fire or spruce budworm using Replanning.
FMT gives a framework to construct heuristics to solve forest planning model. FMT is the perfect tool to solve user specific problems related to forest planning like operating area scheduling. It can also be used to implement simple simulation process. The library offers some tools to spatialize spatially referenced solutions or to generate spatially explicit solutions.
FMT is extremely usefull when it comes to implement metaheuristics such as Simulated Annealing, Genetic or Tabu Search into a forest planning context.
If your main inputs are Woodstock files, FMT is probably the way to go to develop new approaches for optimization or simulation of harvest schedules or even stochastic events.
The easiest way to use FMT is to use Cmake >= 3.15 to generate a shared library for R or Python, or directly from C++. The Cmake script of this repository supports generating FMT on Windows using VS2017/2019 or MINGW-64 on MSYS2 or CYGWIN.
FMT has a handwritten extensive documentation with exercises and examples, along with a doxygen-generated documentation that are both available on the FMT documentation webpage.
If you want to compile the doxygen documentation by yourself, with a powershell prompt, go into the FMT folder and use:
cd Documentation
doxygen FMTdoxygenconfig
To populate comments in R and Python source files (files starting with R and PY):
cd Documentation
python commentsPythonandR.py
Here's a short example for reading a forest planning model and solve the type III Linear programming formulation.
from FMT import Models
from FMT import Parser
modelparser = Parser.FMTmodelparser() models = modelparser.readproject("pathtoprimaryfile",["scenariox"])#read scenario x from the primay file (.pri) optimizationmodel=Models.FMTlpmodel(models[0],Models.FMTsolverinterface.CLP)#Construct a type III linear programming model from the FMTmodel
for period in range(0,10): print(optimizationmodel.buildperiod())
constraints = optimizationmodel.getconstraints() objective = constraints.pop(0) for constraint in constraints: print(optimizationmodel.setconstraint(constraint)) print(optimizationmodel.setobjective(objective))
optimizationmodel.initialsolve()
+ Using R
```R
library(FMT)
modelparser<-new(FMTmodelparser)
models<-modelparser$readproject("pathtoprimaryfile",c("scenariox"),TRUE,TRUE,TRUE)#read scenario x from the primay file (.pri)
optimizationmodel<-new(FMTlpmodel,models[[1]],FMTsolverinterface$CLP)#Construct a type III linear programming model from the FMTmodel
emptyschedule<-new(FMTschedule)
#Build the graph for 10 periods
for (period in 1:10)
{
print(optimizationmodel$buildperiod(emptyschedule,FALSE)$str())
}
#Now add objective function to the FMTlpmodel and all the constraints
allmodelconstraints<-optimizationmodel$getconstraints()
modelobjective<-allmodelconstraints[[1]]
modelconstraints<-allmodelconstraints[2:length(allmodelconstraints)]
for (constraint in modelconstraints)
{
print(optimizationmodel$setconstraint(constraint)$str())
}
print(optimizationmodel$setobjective(modelobjective)$str())
#Do a initial solve of the forest planning model
optimizationmodel$initialsolve()
#include <vector>
#include "FMTlpmodel.h"
#include "FMTmodelparser.h"
Parser::FMTmodelparser modelparser;
const std::vector
## π License
FMT is a [LiLiQ-R 1.1](https://github.com/gcyr/FMT/blob/master/LICENSES/EN/LILIQ-R11EN.pdf) licensed library.
[![License](http://img.shields.io/:license-liliqR11-blue.svg?style=flat-square)](https://forge.gouv.qc.ca/licence/liliq-v1-1/#r%C3%A9ciprocit%C3%A9-liliq-r)
## π Coverage
GNU ![](https://img.shields.io/badge/coverage-70%25-orange)
MSVC ![](https://img.shields.io/badge/coverage-0%25-red)
## π» Build
GNU ![](https://img.shields.io/badge/build-pass-brightgreen)
MSVC ![](https://img.shields.io/badge/build-pass-brightgreen)