3.2.5. financial module

This module contains a number of functions used for calculating silviculture credits and harvest costs.

financial.harv_cost(piece_size, is_finalcut, is_toleranthw, partialcut_extracare=False, A=1.97, B=0.405, C=0.169, D=0.164, E=0.202, F=13.6, G=8.83, K=0.0, rv=False)[source]

Returns harvest cost.

Parameters:
  • piece_size (float) – Piece size.

  • is_finalcut (bool) – Treatment type (final cut or not).

  • is_toleranthw (bool) – Stand type (tolerant hardwood or not).

  • partialcut_extracare (bool) – Partialcut “extra care” flag.

  • A (float) – Series of regression coefficients (A, B, C, D, E, F, G, K, all with defaults that are extracted from MERIS technical documentation; also see Sebastien Lacroix, BMMB).

  • rv (bool) – Types of variables (default Variables are deterministic).

financial.harv_cost_rv(tv_mu, tv_sigma, N_mu, N_sigma, psr, is_finalcut, is_toleranthw, partialcut_extracare=False, tv_min=50.0, N_min=200.0, ps_min=0.05, E_fromintegral=False, e=0.01, n=1000)[source]

Returns harvest cost.

Parameters:
  • is_finalcut (bool) – Treatment type (final cut or not).

  • is_toleranthw (bool) – Stand type (tolerant hardwood or not).

  • partialcut_extracare (bool) – Partialcut “extra care” flag.

  • A (float) – Series of regression coefficients (A, B, C, D, E, F, G, K, all with defaults that are extracted from MERIS technical documentation; also see Sebastien Lacroix, BMMB).

  • rv (bool) – Types of variables (default Variables random variates). Can use either PaCAL numerical integration (sssslow!), or custom numerical integration using Monte Carlo sampling (default).

financial.harv_cost_wec(piece_size, is_finalcut, is_toleranthw, sigma, nsigmas=3, **kwargs)[source]

Estimate harvest cost with error correction.

Parameters:
  • piece_size (float) – Mean piece size.

  • is_finalcut (bool) – True if harvest treatment is final cut, False otherwise.

  • is_toleranthw (bool) – True if tolerant hardwood cover type, False otherwise.

  • sigma (bool) – Standard deviation of piece size estimator.

  • nsigmas (int) – Number of standard deviations to model on either side of the mean (default 3).

  • binw (float) – Width of bins for weighted numerical integration, in multiples of sigma (default 1.0).

financial.piece_size_ratio(treatment_type, cover_type, piece_size_ratios)[source]

Returns piece size ratio.

Assume Action.is_harvest in [0, 1, 2, 3]

Assume cover_type in [‘r’, ‘m’, ‘f’]

Return vr/vp ratio, where
  • vr is mean piece size of harvested stems, and

  • vp is mean piece size of stand before harvesting.

financial.sylv_cred(P, vr, vp, formula)[source]

This function returns sylviculture credit ($ per hectare).

Parameters:
  • P (float) – Volume harvested per hectare.

  • vr (float) – Mean piece size of harvested stems.

  • vp (float) – mean piece size of stand before harvesting.

  • formula – formula index (1 to 7).

financial.sylv_cred_formula(treatment_type, cover_type)[source]

Returns sylviculture credit formula index.

Parameters:
  • treatment_type (str) – Treatment type.

  • cover_type (str) – Cover type.

financial.sylv_cred_rv(P_mu, P_sigma, tv_mu, tv_sigma, N_mu, N_sigma, psr, treatment_type=None, cover_type=None, formula=None, P_min=20.0, tv_min=50.0, N_min=200.0, ps_min=0.05, E_fromintegral=False, e=0.01, n=1000)[source]

This function returns sylviculture credit ($ per hectare).

Parameters:
  • P (float) – Volume harvested per hectare.

  • vr (float) – Mean piece size of harvested stems.

  • vp (float) – mean piece size of stand before harvesting.

  • formula – formula index (1 to 7).

Note

Assumes that variables (P, vr, vp) are random variates (returns expected value of function, using PaCAL packages to model random variates, assuming normal distribution for all three variables). Can use either PaCAL numerical integration (sssslow!), or custom numerical integration using Monte Carlo sampling (default).