Show:
Module: abe-lib

The planting library includes management operations related to artificial and natural regeneration.

Commonalities....

Item Index

Methods

Properties

Methods

dynamic

(
  • options
)

Dynamically schedules planting activities based on provided options.

Parameters:

  • options Object

    Options for configuring the dynamic planting.

    • id String

      A unique identifier for the planting activity (default: 'planting').

    • schedule Schedule

      The planting schedule.

    • speciesSelectivity Object | Function

      Defines the target species and their relative weights. This can be an object with species as keys and weights as values, or a function that returns such an object.

    • speciesDefaults Object

      Default settings for species (default: lib.planting.speciesDefaults).

    • patches String

      should planting should happen only on some selected patches (default: undefined).

    • sendSignal String | Undefined

      signal send out after final femel harvest activity (default: undefined).

    • constraint String | Undefined

      constraint (default: undefined).

general

(
  • options
)

Schedules a general planting activity.

Parameters:

  • options Object

    Options for configuring the general planting.

    • id String

      A unique identifier for the activity (default: 'planting').

    • schedule Number

      The planting schedule (default: 1).

    • species String

      The species to plant. Mandatory.

    • spacing Number

      The spacing between plants (default: 10).

    • fraction Number

      The fraction of the area to be planted (default: 1).

    • treeHeight Number

      Initial tree height (default: 0.3).

    • pattern String | Undefined

      Planting pattern (e.g., "rect2"). (default: undefined).

    • clear Boolean

      Whether to clear existing vegetation before planting (default: false).

    • sendSignal String | Undefined

      signal send after planting activity (default: undefined).

    • constraint String | Undefined

      constraint (default: undefined).

Example:

// NOTE: lib.planting is an object, not a class. No need to use 'new'
                    lib.planting.general({
                        schedule: 2,
                        species: 'Pine',
                        spacing: 12,
                        pattern: 'rect'
                    });

Properties

speciesDefaults

Object

Default planting settings for various species.

Example:

// Accessing default settings for 'piab' (spruce)
                    const spruceDefaults = lib.planting.speciesDefaults.piab;
                    console.log(spruceDefaults);
                    // Output: { species: 'piab', h: 0.3, age: 1, fraction: [Function] }