Class PlantInteraction<TIntermediateDescription>
Base class for Plant interactions. Contains common methods.
Inheritance
Inherited Members
Namespace: Eco.Simulation.WorldLayers.LayerInteractions
Assembly: Eco.Simulation.dll
Syntax
public abstract class PlantInteraction<TIntermediateDescription> : WorldLayerInteraction<TIntermediateDescription>, IWorldLayerInteraction, IWorldLayerRelationship
Type Parameters
Name | Description |
---|---|
TIntermediateDescription |
Constructors
PlantInteraction(PlantSpecies)
Declaration
protected PlantInteraction(PlantSpecies species)
Parameters
Type | Name | Description |
---|---|---|
PlantSpecies | species |
Fields
Species
Declaration
protected readonly PlantSpecies Species
Field Value
Type | Description |
---|---|
PlantSpecies |
Methods
ApplyCapacityConstraints(ref Single, ref String, Single[])
Applies capacity constraints to availablePopulationExtension
.
It uses two layers {Plant}Capacity and {Plant}ConsumedCapacity for calculation.
For every plant there may be few capacity constraints like required fertile ground per plant and required canopy space per plant.
Then it calculates how plants may be planted in available capacity (total - consumed) and reduces availablePopulationExtension
if it is greater than the value.
After applying these constraints it ensures that layer value is capped by all capacities (can't be increased more than for updated availablePopulationExtension
).
Declaration
protected void ApplyCapacityConstraints(ref float availablePopulationExtension, ref string layerName, float[] dependencyValues)
Parameters
Type | Name | Description |
---|---|---|
System.Single | availablePopulationExtension | Currently available population extension. |
System.String | layerName | Restricting layer name if any layer reduced limit. |
System.Single[] | dependencyValues | Dependency values for calculations. |
ApplyResourceConstraints(ref Single, ref String, Single[])
Applies resource limit to current limit modifier.
Declaration
protected void ApplyResourceConstraints(ref float habitability, ref string layerName, float[] dependencyValues)
Parameters
Type | Name | Description |
---|---|---|
System.Single | habitability | Current limit modifier [0; 1]. May be reduced if restricted by resources. |
System.String | layerName | Restricting layer name if any layer reduced limit. |
System.Single[] | dependencyValues | Dependency values for calculations. |
EnvironmentHabitability(Single[])
Declaration
protected float EnvironmentHabitability(float[] dependencyValues)
Parameters
Type | Name | Description |
---|---|---|
System.Single[] | dependencyValues |
Returns
Type | Description |
---|---|
System.Single |