Slu.Heureka.HeurekaAPI.Calculators Namespace > GrowthCalculator Class > GrowStand Method : GrowStand(ApiCompartment,DateTime,DateTime) Method |
'Declaration
Public Overloads Function GrowStand( _ ByVal compartment As ApiCompartment, _ ByVal fromDate As Date, _ ByVal toDate As Date _ ) As ApiState
'Usage
Dim instance As GrowthCalculator Dim compartment As ApiCompartment Dim fromDate As Date Dim toDate As Date Dim value As ApiState value = instance.GrowStand(compartment, fromDate, toDate)
public ApiState GrowStand( ApiCompartment compartment, DateTime fromDate, DateTime toDate )
public: ApiState^ GrowStand( ApiCompartment^ compartment, DateTime fromDate, DateTime toDate )
var compartment = ApiCompartment.CreateTestCompartment(fromDate); var result = compartment.GrowStand(compartment, fromDate, toDate); // Get basal area in next period: var basalAreaNextPer = result.TreeLayers.Sum(s => s.LayerBasalAreaPerHa); // The basal area can also be obtained like this: var basalAreaNextPer = compartment.GetState(toDate).BasalAreaHa; // ...or like this: var basalAreaNextPer = compartment.ProjectedStates[1].BasalAreaHa; //To get for example the volume of pine trees in the next period you can do write like this: var pineNextPeriod = result.GetLayer(SpeciesCode.Pinus).VolPerHa; //...which is the same as the following, if we know that the result is stored at position 1 in ProjectedStates: compartment.ProjectedStates[1].GetLayer(SpeciesCode.Pinus).VolPerHa;
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2