Modelling with Patchworks

1. Is Patchworks a simulation model or an optimization model?
2. How do I control the simulation?
3. How do I know when the simulation is finished?
4. How can I double-check my input datasets and the numbers that show up in the accounts?
5. How do I calculate the area that is currently eligible for harvest?
6. I have blocks that have already been designated for harvest, how do I ensure that Patchworks will always harvest them?
7. Where do the initialTargetSummary, initialTargetStatus CSV files come from?
8. What is the purpose of the message.csv file that is created by the Matrix Builder?
9. Can the groups that are used to create accounts also be used in the Timing Constraint Editor?
10. What is the difference between using the control.calculateGroups method and loading a group file?
11. Can I have multiple records for one polygon in the groups.csv, or do I need to create multiple group files?
12. Does Patchworks perform 'cut and then grow' or 'grow and cut' calculations? Is the reporting done at the end of the period after all actions have occurred?
13. How can I manually apply a number of treatments?
14. What if I change some of the attributes of my shapefile? Do I just have to rebuild the input files?
15. How can I set up area deferrals, such as marten core area reserves or caribou habitat mosaics that change location over time?

1.

Is Patchworks a simulation model or an optimization model?

Patchworks is a simulation model. The model is a forecasting tool that combines a description of existing forest conditions with predictions of future development patterns. The model also contains a numerical solver that generates high quality solutions to combinatorial problems. You can use the solver to generate harvest patterns that best meet a variety of user specified objectives.

2.

How do I control the simulation?

Most of the simulation environment is controlled by the content of the input datasets that describe initial conditions, development patterns, eligible treatments and responses. In many cases you will have to change values in the input dataset in order to change the modelling formulation.

The Patchworks model is a real-time, interactive simulation model. Once the software is started and initialized you can use it to explore forecasts of future conditions. The indicators within the model will always be in a consistent state, no matter what changes you make to the objective function parameters.

There are several techniques that you can use to control the simulation. The simplest and most precise is to manually assign the management treatments that you would like to apply, either using a batch file or interactively using the mouse. As treatments are selected all of the indicators will update automatically.

You can also use the scheduler to build management allocations automatically. The "Start" and "Pause" buttons are used to control the execution of the scheduler. When the scheduler is running it will attempt to form treatment allocations that best achieve the active management targets. To view and adjust the targets click on the target names in the "Targets" panel.

3.

How do I know when the simulation is finished?

Unlike other simulation and optimization models, Patchworks does not run through a series of steps and terminate with an 'optimal' outcome. Patchworks can be used to explore a range of treatment options, and remains active until you are finished.

As the scheduler executes it searches the solution space testing various treatment timing configurations. The quality of the solution gradually improves as the various objective function values are satisfied. The scheduler does not come to a stopping point however, it instead continues to search for marginal improvements to the schedule and the objective function. Over time the value of the solution will converge towards the optimum value (for a given set of targets). You can monitor the progress of the scheduler using the "Performance meter". This meter displays red when the scheduler is actively improving the solution, turns yellow when the solution begins to converge, and green when the scheduler can find no better solution. In general, there will be very little further improvement to the objective function once the performance meter has stopped showing red.

If you change the target values after the solution has converged, the scheduler will immediately begin to seek the new optimum solution by changing the treatment schedule. Typically the performance meter will once again turn red as solution starts to change.

The red/yellow/green strip chart indicates the number of performance improving changes that the model is making at each time step. When the number of improvements dwindles (there are fewer improvements to be found) the colour turns green.

There is also a 'Performance table' that shows the current target value, change in target value, average target value, average change in target value for each target, as well as the 'penalty' values that are assessed for each account that is not meeting its objective. You can use this table to see what targets are in deficit and what is the bottle neck in the solution.

4.

How can I double-check my input datasets and the numbers that show up in the accounts?

The Patchworks input datasets are in a fully normalized relational layout stored in CSV format. You can browse these files and relate them back to the original input files.

An easier approach would be to start up Patchworks, and browse through the values in the block table (available from the 'Edit' pull-down menu). This table contains polygon, attribute and account values for every polygon in the block dataset. Like most tables, the block table has a slider-bar on the right hand side that lets you move through time periods. All attribute and account values will update as you move the slider through time. All the relationships from the input matrix are reflected in this table, all correctly joined together.

Another approach is to use the Inspect Tracks tool to browse through the growth and yield and treatment options for each block.

5.

How do I calculate the area that is currently eligible for harvest?

This information is available from the block table. Open the block table and select the Query Tool. Select all records where CANDIDATETREATMENTS ne ''. These records list the blocks that are eligible for some kind of management treatment in the currently displayed planning period.

6.

I have blocks that have already been designated for harvest, how do I ensure that Patchworks will always harvest them?

This is a simple three step process:

  1. Set up an 'initialSchedule.csv' file that contains three columns: the block label, the treatment name, and the year from present when the treatment is to be applied. Populate this file with records that describe the initial harvest sequence.

  2. When you start the model you can use a console command or the 'Load a saved scenario' under the File menu to load your 'initialSchedule.csv' file. This will apply the treatments that you have defined and ensure that you are starting from the right spot.

  3. Also make these planned blocks unavailable to the model by using the Timing Constraints Editor. Set the proposed harvest blocks to MANAGED and UNAVAILABLE (yellow). If you set the block green, the model is free to redo the scheduling decisions you have made. If you use red, it will make the block unavailable to the model and it will erase the treatments you have previously planned. For more information see the User Guide documentation on timing constraints.

7.

Where do the initialTargetSummary, initialTargetStatus CSV files come from?

The initialTargetSummary and initialTargetStatus CSV files can be created by saving and renaming the target summary and target status reports.

To export these reports, select File > Save a Scenario from the menu and highlight only targetStatus and targetSummary from the 'Scenario data files' folder. These reports get exported as targetSummary.csv and targetStatus.csv, so you will have to rename them to initialTargetSummary.csv and initialTargetStatus.csv.

For more information see the Patchworks data model documentation relating to the input files, their structure and how they are related.

8.

What is the purpose of the message.csv file that is created by the Matrix Builder?

This file is generated during the Matrix building process. It lists the stratification variables that failed to find matches to feature, product, treatment, retention and succession conditions. Ideally, this file should not contain any records. Note that the occurrence of a failing match does not necessarily indicate a dataset error. For example, blocks that do not match to any treatments will cause error messages, and these blocks will be treated as unmanaged. This may be acceptable if the blocks are supposed to be unmanged. You may suppress this type of error by including a matching track element that does not contain any treatments.

9.

Can the groups that are used to create accounts also be used in the Timing Constraint Editor?

Yes.

Groups that have been defined using the calculateGroups method or loaded from group files can be used in expressions that define the units column. Group names are contained in the GROUPS column of the block table, and can be queried with an expression such as

indexOf(GROUPS, 'groupa') >= 0

10.

What is the difference between using the control.calculateGroups method and loading a group file?

Both perform the same function, but the best practice is to use the control.calculateGroups method to define group associations. Group files may become out of date when you make updates to the block file. The control.calculateGroups method always uses the up to date values in the block file and maintains referential integrity.

11.

Can I have multiple records for one polygon in the groups.csv, or do I need to create multiple group files?

You may place all of your group definitions into a single file, or you may divide the group definitions in to multiple files. The choice is a matter of organizational convenience.

12.

Does Patchworks perform 'cut and then grow' or 'grow and cut' calculations? Is the reporting done at the end of the period after all actions have occurred?

Patchworks uses 'grow then cut', but all harvest calculations are performed on an annual basis so there is not much difference from a 'cut then grow' type of approach. Harvest activities are scheduled with annual resolution within the model. Product values (e.g. harvests volumes) are computed at the value of the curve for the year of treatment. For example, if a stand is 80 years old at the beginning of the simulation, and was harvested in year 1, the harvest volume would be computed at year 81 on the yield curve. Feature values are computed at the final year of the planning period.

13.

How can I manually apply a number of treatments?

You may use the Treatment Editor solution to apply treatments on an individual block level (right click on the block, select edit treatments, right click in the line chart to select and apply a treatment). This approach may be out of the question for large areas and numbers of Blocks.

Another solution is to create a 'start-up' schedule.csv file and load the file prior to running the scenario. A schedule file must contain the Block number, year from present it is to be treated (delta) and the treatment type.

[Note]Note

You will need to take care that the treatments in the schedule.csv file that you wish to load do not conflict with and already scheduled treatments. For instance, if the model has already been running and has scheduled a treatment for Block 1 in Year 1, then it would not be possible to apply a new treatment for Block 1 in year 1, because it would not be an eligible treatment in an already treated stand. In this case you will need to cancel the treatment before applying the new schedule. The usual best practice is to load a treatment schedule file at the start of the simulation prior to running the model.

A block availability file should also accompany this initial schedule file to make the scheduled Blocks unavailable to the model in all periods prior to and including the period you have scheduled a treatment. Without making these blocks unavailable, the model could either schedule another treatment at that time, or an earlier treatment that would make your treatment invalid. The block availability file could also be constructed in an outside application and loaded when 'Loading a previously saved scenario' in Patchworks.

14.

What if I change some of the attributes of my shapefile? Do I just have to rebuild the input files?

If you change the stratification variables of a polygon then you will have to rebuild the growth and yield matrix. If you are changing a column that is only used for assigning timing constraints then you only need to restart the Patchworks program.

15.

How can I set up area deferrals, such as marten core area reserves or caribou habitat mosaics that change location over time?

There is a good chapter on this in the User Guide: Timing Constraints. Each polygon can have a status of 'available' or 'unavailable' in any time period. The Timing Constraints editor is a convenience feature that lets you toggle the status of many polygons simultaneously.

First select a column in the block attribute file that represents your classification (e.g. MARTEN). The tool will scan the attribute table for unique codes, and present a matrix of codes by period. You can then toggle the colour code of the cells in the matrix to make up your scheduling constraints by zone and planning period. When you are happy with the set of constraints you click on the 'apply' button. The polygons will then be set to the status that you have chosen.

Once you have the correct classification, you can add lines to the PIN file or the ScenarioSet's to automatically apply these timing constraints when Patchworks starts or when scenarios are run.