AGI STK VGT 11 Send comments on this topic.
IAgCrdnEventArrayExtrema Interface
Windows






Windows & Linux

Description

Determines times of local minimum and/or maximum of specified scalar calculation. Determination is performed within interval list using Sampling and Convergence parameters.

Object Model





Public Properties

Public Property CalculationThe scalar calculation.
Public Property ConvergenceThe Convergence definition, which uses time tolerance to determine when times of extrema are found.
Public Property CustomTimeLimitsA custom interval list or a single interval. It is by default set to overall availability of host object. This determines time limits within extrema are sought. The time limits will be used if UseCustomTimeLimits is set to true.
Public Property ExtremumTypeThe extremum type of interest (either minimum or maximum) for scalar calculation.
Public Property IsGlobalIndicates whether to perform local or global search. The default is false.
Public Property SamplingThe Sampling definition, which can use a fixed step, relative tolerance or curvature tolerance. Relative tolerance uses a combination of relative and absolute changes in scalar values between samples. Curvature tolerance also uses changes in slope between samples.
Public Property SaveDataOptionSpecify whether computed times of extrema are saved/loaded, otherwise it is recomputed on load if necessary.
Public Property UseCustomTimeLimitsIndicate whether to use specified custom time limits (see CustomTimeLimits).

Example

Create and configure extrema event array.
[C#]Copy Code
IAgCrdnEventArray eventArray = provider.EventArrays.Factory.CreateEventArrayExtrema("MyEventArrayExtrema",  "MyDescription"); 
IAgCrdnEventArrayExtrema asExtrema = eventArray as IAgCrdnEventArrayExtrema; 
 
asExtrema.Calculation = provider.CalcScalars["GroundTrajectory.Detic.LLA.Altitude"]; 
 
asExtrema.IsGlobal = true
asExtrema.ExtremumType = AgECrdnExtremumConstants.eCrdnExtremumMaximum; 
 
IAgCrdnFindTimesResult timeArrays = eventArray.FindTimes(); 
if (timeArrays.IsValid) 

    Console.WriteLine("Times"); 
    int numTimes = timeArrays.Times.GetLength(0); 
    for (int i = 0; i < numTimes; ++i) 
    { 
        Console.WriteLine(timeArrays.Times.GetValue(i)); 
    } 
 
    foreach (IAgCrdnInterval timeArray in timeArrays.Intervals) 
    { 
        Console.WriteLine("Start: " + timeArray.Start); 
        Console.WriteLine("Stop: " + timeArray.Stop); 
    } 

 

Create and configure extrema event array.
[Visual Basic .NET]Copy Code
Dim eventArray As IAgCrdnEventArray = provider.EventArrays.Factory.CreateEventArrayExtrema("MyEventArrayExtrema", "MyDescription")
Dim asExtrema As IAgCrdnEventArrayExtrema = TryCast(eventArray, IAgCrdnEventArrayExtrema)

asExtrema.Calculation = provider.CalcScalars("GroundTrajectory.Detic.LLA.Altitude")

asExtrema.IsGlobal = True
asExtrema.ExtremumType = AgECrdnExtremumConstants.eCrdnExtremumMaximum

Dim timeArrays As IAgCrdnFindTimesResult = eventArray.FindTimes()
If timeArrays.IsValid Then
    Console.WriteLine("Times")
    Dim numTimes As Integer = timeArrays.Times.GetLength(0)
    Dim i As Integer = 0
    While i <>
        Console.WriteLine(timeArrays.Times.GetValue(i))
        System.Threading.Interlocked.Increment(i)
    End While

    For Each timeArray As IAgCrdnInterval In timeArrays.Intervals
        Console.WriteLine("Start: " + timeArray.Start)
        Console.WriteLine("Stop: " + timeArray.[Stop])
    Next
End If

CoClasses that Implement IAgCrdnEventArrayExtrema

© 2018 Analytical Graphics, Inc. All Rights Reserved.