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.
- Host: GitHub
- URL: https://github.com/bureau-du-forestier-en-chef/fmt
- Owner: Bureau-du-Forestier-en-chef
- Created: 2020-08-31T19:46:23.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2026-10-30T20:42:54.000Z (3 days ago)
- Last Synced: 2026-11-02T05:01:21.022Z (about 21 hours ago)
- Topics: fmt, forest-management, forest-planning, forestry, optimization, python-library, r-package, simulation
- Language: C++
- Homepage: https://bureau-du-forestier-en-chef.github.io/FMTdocs/
- Size: 317 MB
- Stars: 18
- Watchers: 5
- Forks: 2
- Open Issues: 79
- Releases: 12
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.fr.md
- License: LICENSES/EN/LILIQ-R11EN.odt
- Agents: AGENTS.md
- Claude: CLAUDE.md
- Copilot: .github/copilot-instructions.md
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 :
- Boost (http://boost.org)
Optional :
- GEOS library (http://trac.orgeo.org/geos/)
- GDAL library (http://GDAL.org)
- Mosek library (http://mosek.com)
- GLPK library (https://github.com/Sonderfall/GLPK)
- CLP library (https://github.com/coin-or/Clp)
- OSI library (http://github.com/coin/Cbc)
- Boost Python library
- Rcpp and cran-R with at least Rtools40 (http://cran.r-project.org)
- OnnxRuntime library (https://github.com/microsoft/onnxruntime)
📖 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.
📈 Coverage
GNU
GNU
MSVC
MSVC
Owner metadata
- Name: Bureau du forestier en chef
- Login: Bureau-du-Forestier-en-chef
- Email: bureau@fec.gouv.qc.ca
- Kind: organization
- Description: Le Forestier en chef a pour mission principale de déterminer les possibilités forestières des forêts publiques du Québec.
- Website: https://forestierenchef.gouv.qc.ca/
- Location: Canada
- Twitter: Forestierenchef
- Company:
- Icon url: https://avatars.githubusercontent.com/u/99218695?v=4
- Repositories: 2
- Last ynced at: 2026-11-01T04:33:08.661Z
- Profile URL: https://github.com/Bureau-du-Forestier-en-chef
GitHub Events
Total
- Create event: 24
- Delete event: 20
- Issue comment event: 13
- Issues event: 43
- Pull request event: 12
- Pull request review comment event: 1
- Push event: 159
- Release event: 2
- Watch event: 2
Last Year
- Create event: 7
- Delete event: 8
- Issue comment event: 1
- Issues event: 17
- Pull request event: 9
- Pull request review comment event: 1
- Push event: 76
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 | 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:
- fec.gouv.qc.ca: 4
- 225302pt.intranet.mrn.gouv: 2
- 241315pt.intranet.mrn.gouv: 1
- 223229pt.intranet.mrn.gouv: 1
- mv-analyste-p38.intranet.mrn.gouv: 1
- ulaval.ca: 1
- mrnf.gouv.qc.ca: 1
- live.ca: 1
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
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
- Total packages: 2
- Total downloads: unknown
- Total dependent packages: 0 (may contain duplicates)
- Total dependent repositories: 0 (may contain duplicates)
- Total versions: 16
proxy.golang.org: github.com/Bureau-du-Forestier-en-chef/FMT
- Homepage:
- Documentation: https://pkg.go.dev/github.com/Bureau-du-Forestier-en-chef/FMT#section-documentation
- Licenses:
- Latest release: v1.4.0 (published 10 days ago)
- Last Synced: 2026-11-01T04:34:31.594Z (2 days ago)
- Versions: 8
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent packages count: 5.401%
- Average: 5.583%
- Dependent repos count: 5.764%
proxy.golang.org: github.com/bureau-du-forestier-en-chef/fmt
- Homepage:
- Documentation: https://pkg.go.dev/github.com/bureau-du-forestier-en-chef/fmt#section-documentation
- Licenses:
- Latest release: v1.4.0 (published 7 days ago)
- Last Synced: 2026-11-01T04:34:31.976Z (2 days ago)
- Versions: 8
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent packages count: 5.401%
- Average: 5.583%
- Dependent repos count: 5.764%
Dependencies
- 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
- 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