ALTADataSet Class: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
Line 62: Line 62:


== Usage Example ==
== Usage Example ==
       {{APIComment|Declare the ALTADataSet.}}
       {{APIComment|'Declare the ALTADataSet.}}
         Dim ALTADS as New ALTADataSet
         Dim ALTADS as New ALTADataSet
 
       
       {{APIComment|Declare an [[ALTAStressProfile Class|ALTAStressProfile]] so stress levels can vary with time.}}
       {{APIComment|'Declare an [[ALTAStressProfile Class|ALTAStressProfile]] so stress levels can vary with time.}}
         Dim sp = New ALTAStressProfile("Profile1")
         Dim sp = New ALTAStressProfile("Profile1")
         sp.RepeatCycle = True
         sp.RepeatCycle = True
Line 71: Line 71:
         sp.AddSegment(2, 300)
         sp.AddSegment(2, 300)
         sp.AddSegment(3, 400)
         sp.AddSegment(3, 400)
 
       
       {{APIComment|Add failure values to the data set. Each failure is obtained during time-varying stress levels.}}
       {{APIComment|'Add exact failure times to the data set. Each failure is obtained during time-varying stress levels.}}
         ALTADS.AddFailure(1, 1, sp)
         ALTADS.AddFailure(1, 1, sp)
         ALTADS.AddFailure(2, 1, sp)
         ALTADS.AddFailure(2, 1, sp)
         ALTADS.AddFailure(3, 1, sp)
         ALTADS.AddFailure(3, 1, sp)
 
       
       {{APIComment|Add suspension values to the data set.}}
       {{APIComment|'Add suspensions to the data set.}}
         ALTADS.AddSuspension(1, 1, sp)
         ALTADS.AddSuspension(1, 1, sp)
         ALTADS.AddSuspension(2, 1, sp)
         ALTADS.AddSuspension(2, 1, sp)
         ALTADS.AddSuspension(3, 1, sp)
         ALTADS.AddSuspension(3, 1, sp)
 
       
       {{APIComment|Get the number of failures and suspensions for later use.}}
       {{APIComment|'Get the number of failures and suspensions for later use.}}
         Dim NumberOfFailures as Integer
         Dim NumberOfFailures as Integer
         NumberOfFailures = ALTADataSet.FailureCount
         NumberOfFailures = ALTADataSet.FailureCount
         Dim NumberOfSuspension as Integer
         Dim NumberOfSuspension as Integer
         NumberOfSuspension = ALTADS.SuspensionCount
         NumberOfSuspension = ALTADS.SuspensionCount
 
       
       {{APIComment|Calculate the ALTADataSet using all default analysis settings.}}
       {{APIComment|'Calculate the ALTADataSet using all default analysis settings.}}
         ALTADS.Calculate
         ALTADS.Calculate
 
       
       {{APIComment|Use ClearDataSet to clear data and fitted model.}}
       {{APIComment|'Use ClearDataSet to clear data and fitted model.}}
         ALTADS.ClearDataSet
         ALTADS.ClearDataSet

Revision as of 23:44, 18 March 2014


Provides the functionality of an ALTA standard folio, including entering data in a data set, specifying analysis settings and fitting a distribution and life-stress relationship to the data set. To create plots, use the WAPlots class.

A usage example for this class is available here.

Constructors

  • ALTADataSet Creates a new ALTADataSet object with an empty data set name.
  • ALTADataSet( String ) Creates a new ALTADataSet object with the user-specified data set name.

Methods

Use these methods to enter data points into a data sheet and analyze them. The settings for the analysis are specified with this class's properties.

Add Stresses and Stress Profiles

Add/Remove Data

Analyze Data

  • Calculate Fits the model (i.e., distribution and life-stress relationship) to the current data set using the settings specified in the AnalysisSettings property.

Properties

Use these properties to specify analysis settings and view analysis results, as well as view or edit properties of the data set.

Analysis Settings

Analysis Results

  • FittedModel (as cModel) Gets the fitted model from the accelerated life testing analysis.
  • AnalysisResults (as ALTAAnalysisResults) Gets the likelihood function value that was estimated from the analysis.

Data Set Properties

  • DatasetName (as string) Provides the ability to retrieve or set the name of the data set.
  • FailureCount (as integer) Gets the total number of failures in the data set.
  • SuspensionCount (as integer) Gets the total number of suspensions in the data set.
  • NumStresses (as integer) Gets the total number of stresses in the data set.

Events

The ALTAEvents class contains all the event handlers that can be called by ALTADataSet. To use events, you must inherit the class, override its methods and assign its instance to the Events property of an ALTADataSet. ALTAEvents inheritance is not available in VB6/VBA.

Usage Example

       'Declare the ALTADataSet. 
       Dim ALTADS as New ALTADataSet
       
       'Declare an ALTAStressProfile so stress levels can vary with time. 
       Dim sp = New ALTAStressProfile("Profile1")
       sp.RepeatCycle = True
       sp.AddSegment(1, 250)
       sp.AddSegment(2, 300)
       sp.AddSegment(3, 400)
       
       'Add exact failure times to the data set. Each failure is obtained during time-varying stress levels. 
       ALTADS.AddFailure(1, 1, sp)
       ALTADS.AddFailure(2, 1, sp)
       ALTADS.AddFailure(3, 1, sp)
       
       'Add suspensions to the data set. 
       ALTADS.AddSuspension(1, 1, sp)
       ALTADS.AddSuspension(2, 1, sp)
       ALTADS.AddSuspension(3, 1, sp)
       
       'Get the number of failures and suspensions for later use. 
       Dim NumberOfFailures as Integer
       NumberOfFailures = ALTADataSet.FailureCount
       Dim NumberOfSuspension as Integer
       NumberOfSuspension = ALTADS.SuspensionCount
       
       'Calculate the ALTADataSet using all default analysis settings. 
       ALTADS.Calculate
       
       'Use ClearDataSet to clear data and fitted model. 
       ALTADS.ClearDataSet