R/get_powers_std.R

Defines functions get_powers_std

Documented in get_powers_std

#'@export
get_powers_std <- function(p, L, e){
  ## p - a vector containing the DEB parameters
  ## L - structural length of the individual to calculate dER
  ## e - scaled reserves (=f when in equilibrium with available food)
  
  ## This function calculates scaled powers: assimilation, mobilisation, somatic maintenance, maturity maintenance,
  ## growth, reproduction and dissipation as function of length and scaled reserves for the standard DEB model
  
  #Output
  #
  # pACSJGRD: (n,7)- vector or matrix with scaled powers p_A, p_C, p_S, p_J, p_G, p_R, p_D / L_m^2 {p_Am}
  
  l = L/p$L_m
  pA = e * l^2;                                # assim
  pC = e * l^2 * (p$g + l + p$l_T)/(p$g + e);      # mobilisation
  pS = p$kap * l^2 * (l + p$l_T);               # somatic  maint
  pJ = p$k * p$u_Hp;                           # maturity maint
  pG = p$kap * pC - pS;                        # growth
  pR = (1 - p$kap) * pC - pJ;                  # maturation/reproduction
  pD = pS + pJ + (1 - p$kap_R) * pR ;          # dissipation
  
  power = cbind(pA, pC, pS, pJ, pG , pR, pD);
  return(power)
}
Echinophoria/DEB_output documentation built on Nov. 19, 2019, 10:46 p.m.