Klasse IntercroppingFunctions

java.lang.Object
net.simplace.sim.components.experimental.intercropping.IntercroppingFunctions

public class IntercroppingFunctions extends Object
  • Konstruktordetails

    • IntercroppingFunctions

      public IntercroppingFunctions()
  • Methodendetails

    • calcRowAndColSums

      public static Double[][] calcRowAndColSums(Double[][] m)
      Calculates sum of rows, cols and total of a 2-dimensional array
      Parameter:
      m - 2-dimensional Array (1st index rows, 2nd index cols)
      Gibt zurück:
      Array of rowsums, colsums and total sum
    • getRowSums

      public static Double[] getRowSums(Double[][] sums)
      Retrieves the rowsums calculated by calcRowAndColSums
      Parameter:
      sums - Array of rowsums, colsums and total sum
      Gibt zurück:
      Array of rowsums
      Siehe auch:
    • getColSums

      public static Double[] getColSums(Double[][] sums)
      Retrieves the colums calculated by calcRowAndColSums
      Parameter:
      sums - Array of rowsums, colsums and total sum
      Gibt zurück:
      Array of colsums
      Siehe auch:
    • getTotalSum

      public static Double getTotalSum(Double[][] sums)
      Retrieves the total sum calculated by calcRowAndColSums
      Parameter:
      sums - Array of rowsums, colsums and total sum
      Gibt zurück:
      total sum
      Siehe auch:
    • calcWeightsMatrix

      public static Double[][][] calcWeightsMatrix(Double[][] m)
      Divides the elements of a matrix by its total sum and calculates row- and colsums.
      Parameter:
      m - 2-dimensional Array
      Gibt zurück:
      weights matrix as well as weighted rowsums and colsums
      Siehe auch:
    • getWeightsMatrix

      public static Double[][] getWeightsMatrix(Double[][][] weights)
      Retrieves the weights matrix
      Parameter:
      weights - as calculated by calcWeightsMatrix
      Gibt zurück:
      the 2-dimensional weighted matrix
    • getWeightsMatrixRow

      public static Double[] getWeightsMatrixRow(Double[][][] weights, int row)
      Retrieves a specific row from the weights matrix
      Parameter:
      weights - as calculated by calcWeightsMatrix
      row - number of the row to retrieve
      Gibt zurück:
      a row from the weighted matrix
      Siehe auch:
    • getWeightsRowsum

      public static Double[] getWeightsRowsum(Double[][][] weights)
      Retrieves the rowsums for a weight matrix
      Parameter:
      weights - as calculated by calcWeightsMatrix
      Gibt zurück:
      an 1-dimensional Array with sums for each row
    • getWeightsColsum

      public static Double[] getWeightsColsum(Double[][][] weights)
      Retrieves the colsums for a weight matrix
      Parameter:
      weights - as calculated by calcWeightsMatrix
      Gibt zurück:
      an 1-dimensional Array with sums for each column
    • BelowgroundAllocationFactors

      public static IntercroppingFunctions.BelowGroundAllocationFactorsResult BelowgroundAllocationFactors(Double[] r1, Double[] r2)
      Calculates belowground allocation factors from given root information per layer of two plants Root information can be root length density per layer or root restriction factor or any information that reflects root uptake capacity.
      Parameter:
      r1 - root information of plant 1
      r2 - root information of plant 2
      Gibt zurück:
      factors per layer as well as total factor for each plant
    • calcViewFactor

      public static double calcViewFactor(double height, double width)
      Calculates view factor
      Parameter:
      height -
      width -
      Gibt zurück:
      view factor
    • calcSoilInterceptionFractionPath

      public static double calcSoilInterceptionFractionPath(double width_strip, double width_path, double k, double lai, double height)
      Calculates radiation fraction that is intercepted by the soil
      Parameter:
      width_strip - Width of strip
      width_path - Width of path
      k - Extinction coefficient
      lai - Leaf area index
      height - Height of crop
      Gibt zurück:
      fraction intercepted by the soil
    • calcSoilInterceptionFractionStrip

      public static double calcSoilInterceptionFractionStrip(double width_strip, double width_path, double k, double lai, double height)
      Calculates radiation fraction that is intercepted by the crop
      Parameter:
      width_strip - Width of strip
      width_path - Width of path
      k - Extinction coefficient
      lai - Leaf area index
      height - Height of crop
      Gibt zurück:
      fraction intercepted by the crop
    • calcInterceptionFractionOneCrop

      public static double calcInterceptionFractionOneCrop(double width_strip, double width_path, double k, double lai, double height)
      Calculates radiation fraction that is intercepted by the crop if only one crop is present
      Parameter:
      width_strip - Width of strip
      width_path - Width of path
      k - Extinction coefficient
      lai - Leaf area index
      height - Height of crop
      Gibt zurück:
      fraction intercepted by the crop
    • calcInterceptionFractionsSorted

      public static Double[] calcInterceptionFractionsSorted(double width_1, double space_1, double k_1, double lai_1, double height_1, double width_2, double space_2, double k_2, double lai_2, double height_2)
      Calculates radiation interception for two crops where height of first crop is bigger than of second
      Parameter:
      width_1 - Width of first crop's strip
      space_1 - Space of first crop
      k_1 - Extinction coefficient of first crop
      lai_1 - LAI of first crop
      height_1 - Height of first crop
      width_2 - Width of second crop's strip
      space_2 - Space of second crop
      k_2 - Extinction coefficient of second crop
      lai_2 - LAI of second crop
      height_2 - Height of second crop
      Gibt zurück:
      fractions as array with two entries
    • calcInterceptionFractions

      public static Double[] calcInterceptionFractions(double width_1, double space_1, double k_1, double lai_1, double height_1, double width_2, double space_2, double k_2, double lai_2, double height_2)
      Calculates radiation interception fractions for two crops
      Parameter:
      width_1 - Width of first crop's strip
      space_1 - Space of first crop
      k_1 - Extinction coefficient of first crop
      lai_1 - LAI of first crop
      height_1 - Height of first crop
      width_2 - Width of second crop's strip
      space_2 - Space of second crop
      k_2 - Extinction coefficient of second crop
      lai_2 - LAI of second crop
      height_2 - Height of second crop
      Gibt zurück:
      fractions as array with two entries