MultiOptForest: An interactive multi-objective optimization tool for forest planning and scenario analysis [version 1; peer review: awaiting peer review]

MultiOptForest is an open-source software designed to simplify building and solving multi-objective optimization problems for forest planning. It aims to find the optimal portfolio of management regimes that balance the objectives regarding multiple forest ecosystem services and biodiversity. The software flexibly imports data, allowing for the use of a variety of forest simulator outputs. The user provides preference information through a user-friendly graphical interface, where the range of possible values for each objective is provided. MultiOptForest solves the optimization problem producing a set of Pareto optimal solutions, i.e., solutions where none of the objectives can be improved without compromising others. MultiOptForest is versatile enough to design a Pareto optimal forest plan for a small holding to assess management and the trade-off between multiple policy objectives impacting the development of forests across regions and countries.


Introduction
Forests play a critical role in providing multiple ecosystem services and biodiversity, which highlights the importance of planning the use of forests at all levels, from small-scale private forest holdings (Pohjanmies et al., 2017) to national or international policy evaluations (Mazziotta et al., 2022). This has led to a rising demand for tools to quantify the trade-offs between multiple forest objectives. These tools should be able to investigate the conflicts and synergies between objectives, in order to plan the silvicultural and harvesting decisions to be taken to meet a wide range of preferences (Linkevičius et al., 2019;Nordström et al., 2019). To meet a wide range of use cases, a general optimization tool needs to be (a) intuitive to use, to allow for a broad range of users with limited computer skills; (b) powerful and able to handle a large variety of problems from forest holdings to national or even international scales; (c) flexible, i.e., can accommodate disparate types of forest growth information provided by different forest simulators; (d) can account for the several categories of objectives that are expected from forests; and (e) transparent, to facilitate evaluation of the delivered results.
With these motivations in mind, we created the MultiOptForest software (Eyvindson et al., 2023), which utilizes a structured optimization process with a strong theoretical foundation. It assists the human decision maker to analyse the huge search space of possible management regimes for preferable Pareto optimal solutions. These are solutions that can no longer be improved in one objective without deteriorating other objectives. Thereby win-win strategies are always favored whereas all lose-lose strategies are excluded, and in case of trade-off the user can adjust her/his preferences in an interactive dialogue with the software.
The MultiOptForest software builds upon the history of multiobjective optimization frameworks used to create optimized management plans in forestry applications. Forest planning literature often focuses on the production of timber resources, obtaining a relative even-flow of timber over time while minimizing costs of logistics and maximizing timber production (Blattert et al., 2022;Johnson & Scheurman, 1977). These problems have often been highly structured, focusing on harvest intensity and economic priorities. To address a wider range of societal demands, there is a need to shift towards a flexible multi-objective approach. The interactive optimization approach used in MultiOptForest is based on optimizing an achievement scalarizing function to find the multi-objective solution closest to the preference information (e.g. demands for ecosystem services) specified by the user. The methodology is similar to the one in the desdeo-mcdm package (RRID:SCR_023502) in the DESDEO framework (Misitano et al., 2021), adapted to forest management planning problems, data and optimization. The MultiOptForest software is also related to the optimLanduse software (Husmann et al., 2022), which optimizes the spatial land use cover compositions to provide a range of ecosystem functions, biodiversity indicators and social preferences.
MultiOptForest allows advanced users to connect forest simulator data to an interactive optimization framework that non-expert users (e.g., policy makers, consultants, forest owners, nongovernmental organizations) can adjust according to their preferences in an intuitive and transparent manner, without being distracted by the details of the algorithm design and parameters. The MultiOptForest software is designed to use open-source solutions for optimization, although the option to use commercial optimization solvers remains available. The software provides a straightforward approach to construct optimization problem formulations and a systematic method for eliciting preferences from non-expert users.
The input requirements of this software are projections of multiple alternative management trajectories or silvicultural treatments for each forest stand or plot under consideration. This is provided through forest simulation software (Antón-Fernández & Astrup, 2022;Pretzsch et al., 2008;Pretzsch et al., 2002;Rasinmäki et al., 2009;Wikström et al., 2011), where the output represents alternative potential stand-level scenarios dependent on the decisions taken in the forest. The user will then define the individual optimization objectives, based on the interest and ability of the forest owner to provide preference information. Determining appropriate optimization objectives currently requires an advanced user, someone who understands both the simulated forest data and the appropriate interpretations of the parameters used to set the optimization objectives. Ongoing development of the software will integrate the construction of objectives with the graphical user interface, allowing more flexibility and usability of the software. Once the objectives are determined and the multi-objective problem has been formulated, the user can interactively provide preference information and explore the corresponding Pareto optimal solutions to better understand the range of Pareto optimal management scenarios and conflicts or trade-off between objectives.
The MultiOptForest software has so far been used to assess and quantify the coherence and incoherence of forest-oriented policies across Fennoscandia (Blattert et al., 2022;Vergarechea et al., 2023) and in Germany (Toraño Caicoya et al., 2023). These studies indicate how to translate forest-related policies into comprehensive optimization problems and show how the identified forest management scenario can lead to meeting the objectives of the policies. As a flexible approach to constructing multi-objective optimization formulations, this software can be used in a variety of forest planning cases, including tactical, strategic and operational planning cases (Kangas et al., 2015).

Software description
This optimization framework has been constructed entirely in Python (RRID:SCR_008394), using a variety of open-sourced packages: Pandas, NumPy, MatPlotLib (RRID:SCR_018214, RRD:SCR_008633, RRID:SCR_008624). The backbone package for the optimization is OR-Tools (Perron & Furnon, 2022), which we use to construct the optimization problem. This approach allows for the use of openly available solvers (such as coin-or branch and cut (CBC), coin-or linear programming (CLP), Google linear optimization package (GLOP)) and commercial solvers (such as CPLEX, GUROBI TM , XPRESS). For small problems, open solvers are quite capable, but larger problems may require the use of commercial solvers and may require more computational power to conduct the optimizations in a reasonable timeframe. The specific minimum system requirement depends on the size of the input data; however for the example cases found in the source code (Eyvindson et al., 2023, or from Code Ocean) were able to be run with a virtual machine running Ubuntu 18.04, with 3 Gb of ram.

Software architecture
To enable ease of interaction with the multi-objective optimization component, we constructed a three-layer organization of the code (Figure 1). At the top level, we have the user interface, where the user can provide only the core information required; the forest simulator data and the preferences on ecosystem services. At this level, the user can identify the location of the data and provide preference information for the objectives selected in the multi-objective optimization problem. These objectives are predefined, set by an advanced user in the middle layer of the code.
The second layer of the code allows for more generalizability of the functionalities defined in the third layer of the code. This second layer contains forest simulator-specific information, allowing for flexible interpretation of data, and allows more advanced users to pre-construct objective functions. This will require the user to have a comprehensive understanding of the forest simulation data and the competence to construct python dictionaries according to a predefined template. This code calls specific functions to construct the multi-objective optimization problems in an organized fashion.
The third layer of the code is the core of the software, which is used to construct an object containing the core functions used in optimization and visualization. As the heart of the code, it is designed to flexibly add objective functions, constraints and calculate the key information to construct the multi-objective optimization problem.
Our software has been tested to import data from four forest simulators, and minor modifications to the second layer of the software will be required to ensure consistency of the data and its interpretation.
Software functionalities Importing data. Data can be imported from various forest simulators, we have adapted the software to import data from SIMO (Rasinmäki et al., 2009), SiTree (Antón-Fernández & Astrup, 2022), Silva (Pretzsch et al., 2008;Pretzsch et al., 2002), and Heureka (Wikström et al., 2011). MultiOptForest required only minor modifications of the second layer to ensure consistency of the data and its interpretation. These forest simulators provide projections of the development of the forest across time. The projections depend on the forest management regime implemented, which can include the specific timing or intensity of operations (thinning, final felling). The simulations can be at the forest stand level (a relatively homogeneous parcel of forest land) or the forest plot level (a fixed size of forested land, obtained using sampling approaches to represent larger forest areas).
Data can be provided from a variety of different forest simulators, but a minimum standard set of information from all forest simulators is required, indexed data (stand ID, year, management regime) and indicators representing the state of the forest and ecosystem services (country or model specific) Formulating objective functions. The procedure to create the individual objective functions is based on a pre-defined set of optimization options (Listing 1). For any of the forest simulator outputs, it is possible to formulate objectives related to temporal development of the specific output. In the current version of the code, there are 12 options for how the temporal aspect is treated (for a list of all, Table 1). For instance, from an ecological perspective, to meet biodiversity targets, we may want to increase the quantity of deadwood in the forest by a specific year, and to ensure that quantity is kept for the rest of the planning horizon. From a timber harvesting perspective, the objective could be to maximize the minimum or to ensure a minimum yearly increase in harvests across the planning horizon. The implementation of each objective is based on eight standardized attributes, linking the data to a specific temporal and spatial aggregation interpretation, see Listing 1 for examples.

Formulating constraints.
If some aspect of the problem is to be optimized, it should be formulated as an objective. However, there are situations when optimizing an aspect is not needed but only restrictions are required. To facilitate this, our program can generate two types of constraints that can 1) restrict management options on specified stands or plots (e.g., protected areas cannot be harvested), 2) require indicators not to exceed a specific reduction (e.g., to avoid species extinction). For example, the first constraint type can be used to limit management on drained peatlands to be only managed using either no management, or continuous cover forestry (Listing 2). The second constraint type can be used to ensure specific threatened species not to go below a specific threshold (see documentation on the git).
Multi-objective problem. The core component of the software is where the optimization problem is constructed. To ease the Interface -users can interact with (allows for setting of objectives and constraints). T2.1 Accounting for risks and uncertainties in forest-based businesses, sectoral projections, and policy design. Optimization -code that links the core functions to prepare for the interactive component. MultiOptForest -basic functionality used to conduct the optimization and visualization. REG refers to the regional specific code allowing for minor adaptions to input data and objectives.

Function Abbreviation
Plan language interpretation of the temporal aspect The dictionary key is a unique description of the objective (e.g. Total_Harvest_V_2025), and the value of the dictionary is a 6-element list. The elements in the lists starting at lines 3 and 8 are 1) a human-readable string, 2) the column name of the simulation output dataset, 3) "max" or "min" if increase or decrease is aimed for, 4) how to handle temporal aspects, 5) how to handle spatial aspects, 6) the target year or a string of periodic targets (may not be required depending on how the temporal aspects are handled in 4). (cf. (Blattert et al., 2022)).

Listing 2. Example of an enabled constraint that guarantees that only certain managements (different variants of continuous cover forestry [CCF] and set aside [SA]) are allowed on forest stands situated on peatland ("PEAT").
The dictionary key is a unique description of the constraint, and the value of the dictionary is a 4 or 5-element list, depending on the constraint type. For the "Allowed regimes" constraint type: The elements on line 4 are 1) the constraint type, 2) a human-readable string, 3) the management regimes allowed and 4) the column that identifies the stands or plots where the restriction occurs. For other constraint types, the variables of the list will vary slightly. implementation, we use a theoretically sound multi-objective problem formulation to find efficient solutions for each optimization scenario. This is accomplished using the core of multi-objective optimization (Miettinen, 1999): where Equation 1 describes an optimization that aims to simultaneously minimize a set of n objective functions (or simply 'objectives') f i (x), i = 1, ..., n, with x being the decision vector for the management regimes, and S is the decision space, i.e., the set all feasible management regimes. In this formulation, all the objectives are to be minimized. If some objective is to be maximized, it is equivalent to minimize -f i .
The technical implementation of the optimization was accomplished using two components. The first component uses the achievement scalarizing function of Wierzbicki (1986). This component uses reference points to quantify the preferences between the defined objectives. The second component uses the ε-constraint method (Miettinen, 1999), which sets strict requirements for the specific objective and can be interpreted as a maximal (or minimal) level for each objective. Our software will construct both the achievement scalarizing function and epsilon constraint for each objective defined in the 'formulating objective functions' section.
The generalized formulation of the combined multi-objective problem formulation is a combination of the achievement scalarizing function to be minimized (Hartikainen et al., 2016), while incorporating the ε-constraint method: subject to: (3) Equation 2 evaluates the distance away from ideal vector z ideal ∈ R n consists of the optimal values for each objective when optimized individually while the nadir vector z nadir ∈ R n consists of the worst values for each objective. The reference point z ref ∈ R n is constructed by using the user-defined aspiration levels, the ideal vector and the nadir vector depending on the preferences for the objectives. The second half of the equation is an augmentation term that guarantees that the solutions are Pareto optimal, with ρ set as an arbitrary small positive constant (the choice of the value may depend on the software, solver or other technical choices). Equation 3 is the ε-constraint so that each objective meets or exceeds the value from vector ε. An interesting technical detail is that the achievement scalarization function is not using the Euclidean distance to the reference point, but the Chebychev distance to the reference point. This choice leads to a more balanced approximation of the aspiration levels for the different objectives.

Graphical user interface
The graphical user interface consists of three sections (Figure 2). In the first section, named "Constraint values", users can provide epsilon constraint values (requiring the solution to have values higher than the target). In the second section, named "Reference point", users can provide aspiration levels for each objective (desired value for each objective). The aspiration levels jointly constitute a reference point from which a measure of preferability can be made. In the third section, "Enabled constraints", users can include specified constraints to the decision problem (cf. Figure 2). In the first and second sections ("Constraint values" and "Reference point"), values can be set either by slider bars (see "formulating objective functions") or by typing the desired reference directly in the box (Listing 2). In the third section, constraints can be enabled with a check box (see "formulating constraints"). The ranges of the slider bars on the first and second sections are set to the antiideal and ideal values of each indicator, to allow the decision maker to set preferences that are feasible for the specific problem. To engage the additional defined constraints (Enabled constraints) requires a two-step process, first to click the check box and then to click the "Change constraints" box. Once the optimization is completed, options are available to export and visualize the results. Data exportation means constructing text files for both the aggregate level and the stand level. To aid visualization, the optimized solution can be explored through simple temporal line graphs or maps.

Use case
The optimization tool was recently used to develop forest landscape management scenarios that match the multiple societal demands for forest ecosystem services stated in sectoral policies in Finland (Blattert et al., 2022), Norway (Vergarechea et al., 2023 and Germany (Toraño Caicoya et al., 2023). The modular character of the tool allowed to address the diverse objectives of national policies in a flexible way. For illustration, we describe one optimization problem that reflects the societal demands of the Finnish Bioeconomy Policy (FMME et al., 2014).
The Finnish Bioeconomy Policy anticipates a need for increased roundwood and biomass extraction to offset fossil fuels as a means to mitigate CO 2 emissions that leads to a warming climate (FMME et al., 2014). The overall aim of the policy is to simultaneously mobilize forest resources for bioeconomy purposes while safeguarding biodiversity. The forest optimization problem strives to maximize an even-flow of harvested roundwood and biomass under the constraint that biodiversity indicators should not decline (Table 2). Further, the objectives for the recreational value of forests were maximized as the policy also emphasized the importance of forest recreational value for society. Input data for the optimization was a Finland-wide systematic sample of forest stands (FFC, 2021) that had been simulated with alternative management regimes representing even-aged rotation forest with final clearcut (data are   Blattert et al., 2022)).  According to the results of the optimization, the policy objectives for the Bioeconomy Policy would require that approximately 2/3 of the forests would be managed by practices that include continuous cover forestry regimes and protected areas ( Figure 3). The remaining 1/3 of the forest should instead be intensively managed for wood production.

Discussion
The MultiForestOpt software simplifies the interactive assessment of complex forest planning challenges. Moreover, the software eases the building of multi-objective optimization problems and integration of new objectives for forest planning. This includes a rich and intuitive interface for formulating objectives and provides a common framework to explore the impact of management and targets for the forest using various sources of input data. The software user interface allows for interactive exploration of the set of Pareto optimal solutions using multi-objective optimization and constraint handling.
The MultiForestOpt software was designed in a research project that aimed to critically compare the consistency between forest-related policy documents guiding the national/regional administration and management of forest ecosystem services and biodiversity (Antón-Fernández et al., 2022). At a national level in Finland (Blattert et al., 2022) and Norway (Vergarechea et al., 2023), at a regional level in Germany (Toraño Caicoya et al., 2023), and international level  this software has been used to unveil synergies and conflicts between these government policies guiding forest use. With the help of this software, researchers were able to explore how forest management could be applied to balance conflicting objectives and best meet the stated policy goals in each country. The flexibility and functionalities of the software allowed to design a wide variety of objectives that match the diverse interpretations and contextual considerations of sustainable forest management state in these national policy documents.
This software has great potential to be used in a variety of forest planning and forest policy development research, as the tool constructs objective functions in a systematic fashion and allows for the comparison of alternative multi-objective optimization scenarios. While the optimization framework can use simulation data from multiple sources, this software integrates with nationally/regionally specific forest management software to enable nationally/regionally relevant scenarios.
Although the current use of the software has focused on very large-scale problems, it can be applied at smaller spatial scales, such as forest holdings, or certain landscapes. The software has not yet been used in commercial settings, however forest planners could integrate this as an iterative approach to improve forest planning.
Due to the simplicity of its user interface, the MultiForestOpt can also become a tool to help untrained users to understand the conflicts among forest ecosystem services and biodiversity. This could be used, for instance, in participatory workshops seeking consensus solutions where forest stakeholders from different sectors examine the consequences of their preferences. The nested construction from simpler to more complex multi-objective optimization problems also allow to use the tool for educational purposes.

Conclusions
The key benefit of the MultiForestOpt software is the flexibility to define the specific objectives of interest to the decision maker. The software utilizes theoretically sound multi-objective optimization techniques, packaged in a user-friendly software package with which decision-makers can interact. The easy-tounderstand interface enables users with no training in coding to modify preferences, evaluate different optimized scenarios and gain an understanding of the trade-offs and synergies involved in their decisions.

Data availability
Source data Input data for the use case presented (and example cases from Germany, Sweden and Norway) is available in the data folder in: https://doi.org/10.5281/zenodo.7885954. And is originally available from https://doi.org/10.5281/zenodo.6631110 (Blattert et al., 2022a) under a CC-BY 4.0 license.