FMT

An open source forest management library that makes forest planning easier.
https://github.com/bureau-du-forestier-en-chef/fmt

Category: Biosphere
Sub Category: Forest Observation and Management

Keywords

fmt forest-management forest-planning forestry optimization python-library r-package simulation

Last synced: about 21 hours ago
JSON representation

Repository metadata

Forest Management Tool a C++ library for forest planning.

README.md

This page provides only an overview of the installation process and features of FMT. For more details, visit our documentation page here.

📑 Description

FMT (Forest Management Tool) is an open source Forest Management library.

  • It is a C++17 library made to interpret forest planning models based on the Woodstock files formulation.
  • It can be used through Python, Cran-R or directly from C++.
  • It's generic approach to forest planning gives the opportunity to the user to manipulate forest planning models and generate forest planning solutions.
  • It's objective is to bring all forest planning models types onto the same generic library to help the community to develop new approaches to forest planning problems or improve the one that have been there for years.

✨ Features

Spatially referenced forest planning

FMT allows the user to generate and solve spatially referenced type II or 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.

Spatially explicit forest planning

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.

💽 Installation

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 MSVC >= 2017 or MINGW-64 on MSYS2 or CYGWIN.

📦 Dependencies

Required :

Optional :

📖 Documentation

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.

👉 Examples

Here's a short example for reading a forest planning model and solve the type II Linear programming formulation.

  • Using Python
from FMT import Core
from FMT import Models
from FMT import Parser

modelParser = Parser.FMTmodelparser()
### Read the model
MODELS = modelParser.readproject("Examples/Models/TWD_land/TWD_land.pri",["LP"])
TypeIIModel=Models.FMTlpmodel(MODELS[0],Models.FMTsolverinterface.CLP)
## Set a length of 10 periods
LENGTH = 10
TypeIIModel.setparameter(Models.FMTintmodelparameters.LENGTH,10)
## Solve
OPTIMAL = TypeIIModel.doplanning(True)
## Get the objective and outputs values
if OPTIMAL:
  print("OBJECTIVE: ",TypeIIModel.getobjectivevalue())
  for OUTPUT in TypeIIModel.getoutputs():
      for PERIOD in range(0,LENGTH):
          print(PERIOD,TypeIIModel.getoutput(OUTPUT,PERIOD,Core.FMToutputlevel.totalonly))
  • Using R
library(FMT)
modelParser<-new(FMTmodelparser)
### Read the model
MODELS<-modelParser$readproject("Examples/Models/TWD_land/TWD_land.pri",c("LP"),TRUE,TRUE,TRUE)
TypeIIModel<-new(FMTlpmodel,MODELS[[1]],FMTsolverinterface$CLP)
EMPTY_SCHEDULE<-new(FMTschedule)
## Set a length of 10 periods
LENGTH <- 10L
TypeIIModel$setintparameter(FMTintmodelparameters$LENGTH,LENGTH)
EMPTY_SCHEDULES<-list()
## Solve
OPTIMAL <- TypeIIModel$doplanning(TRUE,EMPTY_SCHEDULES)
## Get the objective and outputs values
if (OPTIMAL)
   {
   print(paste("OBJECTIVE: ", TypeIIModel$getobjectivevalue()))
   OUTPUTS <- TypeIIModel$getoutputsdataframe(TypeIIModel$getoutputs(), 1, LENGTH)
   print(OUTPUTS)
   }
  • Using C++
#include <iostream>
#include <vector>
#include "FMTLpModel.h"
#include "FMTModelParser.h"

Parser::FMTModelParser modelParser;
const std::vector<std::string>SCENARIOS(1, "LP");
// Read the model
const std::vector<Models::FMTModel> MODELS = modelparser.readproject("Examples/Models/TWD_land/TWD_land.pri", SCENARIOS);
Models::FMTLpModel TypeIIModel(MODELS.at(0), Models::FMTsolverinterface::CLP);
// Set a length of 10 periods
const int LENGTH = 10;
TypeIIModel.setparameter(Models::FMTintmodelparameters::LENGTH,LENGTH);
// Solve
const bool OPTIMAL = TypeIIModel.doPlanning(true);
// Get the objective and outputs values
if (OPTIMAL)
    {
    std::cout<<"OBJECTIVE: "<<TypeIIModel.getObjectiveValue()<<std::endl;
    for (const Core::FMToutput& OUTPUT : TypeIIModel.getOutputs())
        {
        for(int PERIOD = 0; PERIOD < LENGTH;++PERIOD)
            {
            std::cout<<PERIOD <<" "<<OUTPUT.getName()<<" "<<TypeIIModel.getOutput(OUTPUT,PERIOD,Core::FMToutputlevel::totalonly).at("Total")<<std::endl;
            }
        }
    }

🔑 License

FMT is a LiLiQ-R 1.1 licensed library.

License

📈 Coverage

GNU
GNU
MSVC
MSVC


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 2 days ago

Total Commits: 1,525
Total Committers: 14
Avg Commits per committer: 108.929
Development Distribution Score (DDS): 0.463

Commits in past year: 430
Committers in past year: 4
Avg Commits per committer in past year: 107.5
Development Distribution Score (DDS) in past year: 0.37

Name Email Commits
Guillaume Cyr G****r@f****a 819
Landry-G g****y@l****a 318
Bruno Forest B****t@f****a 237
Marc-Alexandre Martel m****l@g****m 67
Forest F****3@f****a 28
bouto3 t****d@m****a 18
Rémy Huot r****1@u****a 11
U-INTRANET\CYRGU3 C****3@M****V 10
Clement Hardy 4****t 6
Cyr C****3@f****a 6
admlocal a****l@2****V 2
admlocal a****l@2****V 1
admlocal a****l@2****V 1
U-INTRANET\FORBR3 F****3@2****V 1

Committer domains:


Issue and Pull Request metadata

Last synced: 2 days ago

Total issues: 254
Total pull requests: 43
Average time to close issues: about 1 month
Average time to close pull requests: 2 days
Total issue authors: 12
Total pull request authors: 5
Average comments per issue: 0.81
Average comments per pull request: 0.21
Merged pull request: 33
Bot issues: 0
Bot pull requests: 0

Past year issues: 82
Past year pull requests: 15
Past year average time to close issues: 27 days
Past year average time to close pull requests: 2 days
Past year issue authors: 4
Past year pull request authors: 2
Past year average comments per issue: 0.88
Past year average comments per pull request: 0.13
Past year merged pull request: 14
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/bureau-du-forestier-en-chef/fmt

Top Issue Authors

  • gcyr (120)
  • Landry-G (53)
  • BrunoForest (33)
  • martel21324 (24)
  • Klemet (9)
  • JFCarle (7)
  • frad123 (2)
  • BFECLucasMoreau (2)
  • felipearomani (1)
  • peret2 (1)
  • saraahmadi95 (1)
  • LA-Giasson (1)

Top Pull Request Authors

  • Landry-G (17)
  • martel21324 (17)
  • gcyr (7)
  • BFECLucasMoreau (1)
  • Klemet (1)

Top Issue Labels

  • bug (111)
  • enhancement (88)
  • priority:high (26)
  • CC (25)
  • BFECopt (21)
  • Interface (18)
  • documentation (15)
  • priority:normal (13)
  • Carbone (12)
  • Replanification (8)
  • priority:low (6)
  • Machine Learning (5)
  • Excel (4)
  • validation (4)
  • Debug facilities (3)
  • Diffusion (2)
  • wontfix (2)
  • help wanted (2)
  • NeedTommyPower (1)

Top Pull Request Labels

  • priority:high (4)
  • bug (3)
  • enhancement (2)
  • CC (1)
  • Carbone (1)
  • Replanification (1)

Package metadata

proxy.golang.org: github.com/Bureau-du-Forestier-en-chef/FMT

proxy.golang.org: github.com/bureau-du-forestier-en-chef/fmt


Dependencies

Excel/FMTExcel/FMTExcel/FMTExcel.csproj nuget
  • Aspose.Cells 26.1.0.0
  • ExcelApi 1.7.4.11
  • ExcelDna.Integration 1.1.0.0
  • ExcelDna.IntelliSense 1.1.0.0
  • Microsoft.Office.Interop.Excel 15.0.0.0
  • NetOffice 1.7.4.11
  • Office 15.0.0.0
  • OfficeApi 1.7.4.11
  • VBIDEApi 1.7.4.11
Excel/FMTExcel/FMTExcel/packages.config nuget
  • Aspose.Cells 26.1.0
  • ExcelDna.AddIn 1.9.0
  • ExcelDna.Integration 1.9.0
  • ExcelDna.IntelliSense 1.9.0
  • NetOffice.Core 1.7.4.11
  • NetOffice.Excel 1.7.4.11
  • System.Runtime.Loader 4.3.0

Score: -Infinity