bi_logs {timbeR}R Documentation

Simulate log extraction using a Bi (2000) variable-form taper equation that describes the taper of the tree.

Description

Simulate the extraction of logs from a tree from its measurements, taper function (Bi (2000) variable-form taper equation ), trunk quality characteristics and harvest parameters such as stump height and assortments.

Usage

bi_logs(
  dbh,
  h,
  coef,
  assortments,
  stump_height,
  downgrade,
  broken,
  defect_height,
  eliminate,
  total_volume,
  only_vol
)

Arguments

dbh

tree diameter at breast height, in centimeters.

h

total tree height, in meters.

coef

numerical vector containing seven coefficients of the Bi taper equation.

assortments

a data.frame with five columns and n rows, where n is the number of different wood assortments to be obtained from the tree stem. The first column must contain the names of the assortments, the second, numerical, contains the minimum diameters at the small end of the logs, in centimeters. The third column, numerical, contains the minimum lengths of the logs, in meters. The fourth column, numerical, contains the maximum lengths of the logs, in meters. The fifth column, numerical, contains the values in centimeters referring to the loss of wood due to cutting logs. The algorithm prioritizes the extraction of assortments along the stem in the order presented in the data.frame, starting from the first line, to the last.

stump_height

tree cutting height, in meters. Default is 0.

downgrade

if TRUE, the algorithm,from the defect_height onwards, simulates log extraction only for the last assortment in the assortments data.frame. Default is FALSE.

broken

if TRUE, the algorithm will simulate the extraction of logs only up to the defect_height. Default is FALSE.

defect_height

the height, in meters, from which the logs will be downgraded (if downgrade is TRUE) or log extraction simulation will be stopped (if broken is TRUE). Default is 0 for downgrade = TRUE (the whole tree is downgraded) and h * 0.5 for broken = TRUE (the tree is broken from half its original/estimated total height).

eliminate

if TRUE, the algorithm does not get logs for any assortment present in the assortments table. All will be zero. Default is FALSE.

total_volume

if TRUE, it adds an additional column to the results data.frame with the estimate of the total volume of the tree, from the ground height to h if broken argument is FALSE, or to defect_height if broken is TRUE. Default is FALSE.

only_vol

if TRUE returns only volumes (does not return the number of logs). Default is FALSE.

Details

when the broken and downgrade arguments are set to TRUE, the defect_height value is considered as the break height of the tree, and the entire tree is downgraded.

Value

a list of two data.frames, the first (volumes) with the calculated volumes per assortment, and the second (logs) with the number of logs per assortment.

Examples


library(dplyr)
library(minpack.lm)
library(timbeR)

tree_scaling <- tree_scaling %>%
mutate(did = di/dbh,
       hih = hi/h)

bi <-  nlsLM(di ~ taper_bi(dbh, h, hih, b0, b1, b2, b3, b4, b5, b6),
data=tree_scaling,
start=list(b0=1.8,b1=-0.2,b2=-0.04,b3=-0.9,b4=-0.0006,b5=0.07,b6=-.14))

coef_bi <- coef(bi)

dbh <- 25
h <- 20

assortments <- data.frame(
  NAME = c('15-25','4-15'),
  SED = c(15,4),
  MINLENGTH = c(2.65,2),
  MAXLENGTH = c(2.65,4.2),
  LOSS = c(5,5)
)

bi_logs(dbh, h, coef_bi, assortments)


[Package timbeR version 2.0.1 Index]