Class SecondOrderReaction
Simulates a differential equation of the form dz/dt = c * x * y.
This is the same math as is used to describe a second-order chemical reaction, so I've elected to adopt that terminology.
It should be an apt analogy for every use of this interaction - acid rain happens when air pollution meets rain; predation happens when predator meets prey; etc.
N.B. this class, like all WorldLayerInteractions, does not modify the input layers.
In chemical terms, the inputs are both catalysts by default - they are not affected by the reaction.
If you wish an input to be affected, create another instance of SecondOrderReaction that has that input as its product.
Inheritance
System.Object
SecondOrderReaction
Assembly: Eco.Simulation.dll
Syntax
public class SecondOrderReaction : WorldLayerInteraction<float>, IWorldLayerInteraction, IWorldLayerRelationship
Constructors
SecondOrderReaction()
Declaration
public SecondOrderReaction()
Properties
ActivePostWorldgen
Declaration
public bool ActivePostWorldgen { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
DependencyLayerNames
Declaration
public override string[] DependencyLayerNames { get; }
Property Value
Type |
Description |
System.String[] |
|
Overrides
Eco.Simulation.WorldLayers.WorldLayerInteraction<System.Single>.DependencyLayerNames
DescribeGeneral
Declaration
public override string DescribeGeneral { get; }
Property Value
Type |
Description |
System.String |
|
Overrides
Eco.Simulation.WorldLayers.WorldLayerInteraction<System.Single>.DescribeGeneral
OutputLayerName
Declaration
public override string OutputLayerName { get; }
Property Value
Type |
Description |
System.String |
|
Overrides
Eco.Simulation.WorldLayers.WorldLayerInteraction<System.Single>.OutputLayerName
ProductLayerName
Declaration
public string ProductLayerName { get; set; }
Property Value
Type |
Description |
System.String |
|
ReactantOneLayerName
Declaration
public string ReactantOneLayerName { get; set; }
Property Value
Type |
Description |
System.String |
|
ReactantTwoLayerName
Declaration
public string ReactantTwoLayerName { get; set; }
Property Value
Type |
Description |
System.String |
|
ReactionRate
Declaration
public float ReactionRate { get; set; }
Property Value
Type |
Description |
System.Single |
|
WorldInitDependencyLayerNames
Declaration
public override string[] WorldInitDependencyLayerNames { get; }
Property Value
Type |
Description |
System.String[] |
|
Overrides
Eco.Simulation.WorldLayers.WorldLayerInteraction<System.Single>.WorldInitDependencyLayerNames
Methods
Apply(Single, Single[], WorldLayerNeighborInfo[])
Declaration
public override float Apply(float currentValue, float[] dependencyValues, WorldLayerNeighborInfo[] neighborValues)
Parameters
Type |
Name |
Description |
System.Single |
currentValue |
|
System.Single[] |
dependencyValues |
|
WorldLayerNeighborInfo[] |
neighborValues |
|
Returns
Type |
Description |
System.Single |
|
Overrides
Eco.Simulation.WorldLayers.WorldLayerInteraction<System.Single>.Apply(System.Single, System.Single[], Eco.Simulation.WorldLayers.WorldLayerNeighborInfo[])
DescribeAggregated(IEnumerable<Single>)
Declaration
protected override string DescribeAggregated(IEnumerable<float> intermediateDescriptions)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<System.Single> |
intermediateDescriptions |
|
Returns
Type |
Description |
System.String |
|
Overrides
Eco.Simulation.WorldLayers.WorldLayerInteraction<System.Single>.DescribeAggregated(System.Collections.Generic.IEnumerable<System.Single>)
DescribeSpecific(Single, Single[], WorldLayerNeighborInfo[])
Declaration
protected override float DescribeSpecific(float currentValue, float[] dependencyValues, WorldLayerNeighborInfo[] neighborValues)
Parameters
Type |
Name |
Description |
System.Single |
currentValue |
|
System.Single[] |
dependencyValues |
|
WorldLayerNeighborInfo[] |
neighborValues |
|
Returns
Type |
Description |
System.Single |
|
Overrides
Eco.Simulation.WorldLayers.WorldLayerInteraction<System.Single>.DescribeSpecific(System.Single, System.Single[], Eco.Simulation.WorldLayers.WorldLayerNeighborInfo[])
PostWorldgen(Single, Single[], WorldLayerNeighborInfo[])
Declaration
public override float PostWorldgen(float currentValue, float[] dependencyValues, WorldLayerNeighborInfo[] neighborValues)
Parameters
Type |
Name |
Description |
System.Single |
currentValue |
|
System.Single[] |
dependencyValues |
|
WorldLayerNeighborInfo[] |
neighborValues |
|
Returns
Type |
Description |
System.Single |
|
Overrides
Eco.Simulation.WorldLayers.WorldLayerInteraction<System.Single>.PostWorldgen(System.Single, System.Single[], Eco.Simulation.WorldLayers.WorldLayerNeighborInfo[])
Implements