ABE activity scheduled

The “Scheduled” activity is a general purpose activity that makes use of the ABE Scheduler. The activity defines two phases: in the first phase (\(onEvalulate\)) trees are selected for removal, and in the second phase (\(onExecute\)) the planned harvest is executed. The timing of the execution is controlled by the ABE Scheduler.

Property Description
onEvaluate Javascript function that typically selects a population of trees to be harvested, using the management API (the simulate-property of the activity is true). If the function returns true, the activity is passed to the Scheduler for future execution. If the function returns false, the activity is canceled.
onExecute If onExecute is omitted, the default behaviour is to remove all trees that are marked for removal in the onEvaluate function. This default is overridden, if a function is provided.

The code below shows an example use of a scheduled activity used for a final cut.

var a_clearcut =  { type: "scheduled",
                    schedule: { minRel: 0.90, optRel: 1, maxRel: 1.15, force: true },
                    onEvaluate: function(){
                      trees.loadAll();
                      if (stp.options.dbh!=undefined) {
                          trees.harvest("dbh>" + stp.options.dbh );
                          fmengine.log("clearcut: using threshold: " + stp.options.dbh );
                      } else {
                          trees.harvest("dbh>5");
                      }
                      return true; },
                    onExecute: function() {
                                                    trees.removeMarkedTrees(); // but do the same thing as the default operation
                                                  },
                    onCreate: function() { activity.finalHarvest=true; }
                    };

The code snipped demostrates several concepts used by ABE:

Notecitation

Rammer, W., Seidl, R., 2015. Coupling human and natural systems: Simulating adaptive management agents in dynamically changing forest landscapes. Global Environmental Change, 35, 475-485.