Class CustomDateTimeTrackerPositionAlgorithmBase
Base class for custom date time tracker position algorithms.
Just override the Initialise() function
- Use the SetTrackerCount() to set the tracker count.
- Use the AddTimeStep() function to add a time step along with positions (rotations) for each tracker. The trackerPositions collection should contain the same count as the tracker count.
Namespace: Scripting
Syntax
public abstract class CustomDateTimeTrackerPositionAlgorithmBase : IScriptingCustomDateTimeTrackerPositionAlgorithm
Properties
TrackerPositionsTimeStepCollection
Gets the tracker positions time step collection.
Declaration
public SolarFarmer.Calculation.Dto.Trackers.TrackerPositionsTimeStepCollectionDto TrackerPositionsTimeStepCollection { get; }
Property Value
Type | Description |
---|---|
GH.SolarFarmer.Calculation.Dto.Trackers.TrackerPositionsTimeStepCollectionDto |
Methods
AddTimeStep(DateTime, IEnumerable<Double>)
Adds the time step.
Declaration
public void AddTimeStep(DateTime time, IEnumerable<double> trackerPositions)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | time | The time. |
System.Collections.Generic.IEnumerable<System.Double> | trackerPositions | The tracker positions. |
CalculateTrackerPosition(TrackerSystemProperties, TrackerLayoutRegionProperties, EnvironmentalInstantaneousCondition)
Calculates the tracker position for the specified properties.
Declaration
public TrackerAlgorithmPosition CalculateTrackerPosition(TrackerSystemProperties trackerSystemProperties, TrackerLayoutRegionProperties trackerLayoutRegionProperties, EnvironmentalInstantaneousCondition environmentInstantaneousCondition)
Parameters
Type | Name | Description |
---|---|---|
TrackerSystemProperties | trackerSystemProperties | The tracker system properties. |
TrackerLayoutRegionProperties | trackerLayoutRegionProperties | The tracker layout region properties. |
EnvironmentalInstantaneousCondition | environmentInstantaneousCondition | The environment instantaneous condition. |
Returns
Type | Description |
---|---|
TrackerAlgorithmPosition | The Scripting.TrackerAlgorithmPosition for the given inputs. |
CalculateTrackerPositions(TrackerSystemProperties, TrackerLayoutRegionProperties, Double[], Double[], DateTime[])
Calculates the tracker positions for the specified properties and arrays of sun azimuth and zenith angles.
Declaration
public IList<TrackerAlgorithmPosition> CalculateTrackerPositions(TrackerSystemProperties trackerSystemProperties, TrackerLayoutRegionProperties trackerLayoutRegionProperties, double[] sunAzimuths, double[] sunZeniths, DateTime[] dateTimes)
Parameters
Type | Name | Description |
---|---|---|
TrackerSystemProperties | trackerSystemProperties | The tracker system properties. |
TrackerLayoutRegionProperties | trackerLayoutRegionProperties | The tracker layout region properties. |
System.Double[] | sunAzimuths | The sun azimuths (in radians). |
System.Double[] | sunZeniths | The sun zeniths (in radians). |
System.DateTime[] | dateTimes | The date times. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<TrackerAlgorithmPosition> | A list of Scripting.TrackerAlgorithmPosition objects, one for each entry in the sun angle arrays. |
CalculateTrackerPositionsFromTrackerIndices(TrackerSystemProperties, TrackerLayoutRegionProperties, EnvironmentalInstantaneousCondition, IEnumerable<Int32>)
Calculates the tracker positions for the specified properties for the specified tracker indices.
Declaration
public Dictionary<int, TrackerAlgorithmPosition> CalculateTrackerPositionsFromTrackerIndices(TrackerSystemProperties trackerSystemProperties, TrackerLayoutRegionProperties trackerLayoutRegionProperties, EnvironmentalInstantaneousCondition environmentInstantaneousCondition, IEnumerable<int> trackerIndices)
Parameters
Type | Name | Description |
---|---|---|
TrackerSystemProperties | trackerSystemProperties | The tracker system properties. |
TrackerLayoutRegionProperties | trackerLayoutRegionProperties | The tracker layout region properties. |
EnvironmentalInstantaneousCondition | environmentInstantaneousCondition | The environment instantaneous condition. |
System.Collections.Generic.IEnumerable<System.Int32> | trackerIndices | The tracker indices. |
Returns
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.Int32, TrackerAlgorithmPosition> | A dictionary, indexed by tracker index, containing the tracker positions. |
Initialise()
Performs any initialization before any tracker positions are calculated. Override in the derived class.
Declaration
public abstract bool Initialise()
Returns
Type | Description |
---|---|
System.Boolean |
|
SetTrackerCount(Int32)
Sets the tracker count.
Declaration
public void SetTrackerCount(int trackerCount)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | trackerCount | The tracker count. |