Heureka API .NET Documentation
GrowStand(ApiCompartment,DateTime,DateTime) Method
Example 



The compartment.
From date.
To date.
Calculates growth and development for a stand from fromDate to a target date toDate. Results for both fromDate and toDate area stored in the list Slu.Heureka.HeurekaAPI.Data.ApiCompartment.ProjectedStates. Slu.Heureka.HeurekaAPI.Data.ApiCompartment.ProjectedStates[0] always refer to the intialstate, and Slu.Heureka.HeurekaAPI.Data.ApiCompartment.InitialState is set equal to Slu.Heureka.HeurekaAPI.Data.ApiCompartment.ProjectedStates[0] after the first call to GrowStand. A call to this method will initialize the compartment if it isn't already.
Syntax
'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)

Parameters

compartment
The compartment.
fromDate
From date.
toDate
To date.

Return Value

An Slu.Heureka.HeurekaAPI.Data.ApiState object data that holds data after growth projection, at time toDate. This result is also stored in the list ApiCompartment.ProjectedStates[]. The last element in this list hold the period that corresponds to toDate
Example

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;
Requirements

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

See Also

Reference

GrowthCalculator Class
GrowthCalculator Members
Overload List

Send Feedback