ALTADataSet Class: Difference between revisions
Chris Kahn (talk | contribs) |
Chris Kahn (talk | contribs) |
||
Line 62: | Line 62: | ||
== Usage Example == | == Usage Example == | ||
{{APIComment| | {{APIComment|Declare the ALTADataSet. See [[ALTADataSet Constructors]] for additional details.}} | ||
Dim ALTADS as New ALTADataSet | Dim ALTADS as New ALTADataSet | ||
{{APIComment| | {{APIComment|Create a time-varying stress profile. See [[ALTAStressProfile Class|ALTAStressProfile]] for additional details.}} | ||
Dim sp = New ALTAStressProfile("Profile1") | Dim sp = New ALTAStressProfile("Profile1") | ||
sp.RepeatCycle = True | sp.RepeatCycle = True | ||
Line 72: | Line 72: | ||
sp.AddSegment(3, 400) | sp.AddSegment(3, 400) | ||
{{APIComment| | {{APIComment|Add exact failure times to the data set. See [[ALTADataSet.AddFailure|AddFailure]] for additional details.}} | ||
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| | {{APIComment|Add suspensions to the data set. See [[ALTADataSet.AddSuspension|AddSuspension]] for additional details.}} | ||
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| | {{APIComment|Get the numbers of failure times. In this example, NumberOfFailures will be 3. See [[ALTADataSet.FailureCount|FailureCount]] for additional details.}} | ||
Dim NumberOfFailures as Integer | Dim NumberOfFailures as Integer | ||
NumberOfFailures = ALTADataSet.FailureCount | NumberOfFailures = ALTADataSet.FailureCount | ||
{{APIComment|Get the number of suspensions. In this example, NumberOfSuspension will be 3. See[[ALTADataSet.SuspensionCount|SuspensionCount]] for additional details.}} | |||
Dim NumberOfSuspension as Integer | Dim NumberOfSuspension as Integer | ||
NumberOfSuspension = ALTADS.SuspensionCount | NumberOfSuspension = ALTADS.SuspensionCount | ||
{{APIComment| | {{APIComment|Calculate the ALTADataSet using default analysis settings. See [[ALTADataSet.Calculate|Calculate]] for additional details.}} | ||
ALTADS.Calculate | ALTADS.Calculate | ||
{{APIComment| | {{APIComment|Use ClearDataSet to clear the data and fitted model. See [[ALTADataSet.ClearDataSet|ClearDataSet]] for additional details.}} | ||
ALTADS.ClearDataSet | '''ALTADS.ClearDataSet''' |
Revision as of 23:51, 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
- AddStressDefinition( String, [ALTASolverLSR], [Double] ) Adds a stress to the data set, using the specified name of the stress, the stress transformation (if any) and the use stress level.
- AddStressProfile( ALTAStressProfile ) Makes an existing time-varying stress profile available for use in the analysis.
Add/Remove Data
- AddFailure( Double, Integer, Object() ) Adds failure times to the data set, using the specified time, the number of failures at that time and an array of stress values/profiles for all the stresses.
- AddFailure( Double, Integer, Object ) Adds failure times to the data set, using the specified time, the number of failures at that time and a single stress value/profile.
- AddFailure( Double, Integer, Object, Object ) Adds failure times to the data set, using the specified time, the number of failures at that time and two stress values/profiles.
- AddSuspension( Double, Integer, Object() ) Adds suspensions to the data set, using the specified time, the number of suspensions at that time and an array of stress values/profiles for all the stresses.
- AddSuspension( Double, Integer, Object ) Adds suspensions to the data set, using the specified time, the number of suspensions at that time and a single stress value/profile.
- AddSuspension( Double, Integer, Object, Object ) Adds suspensions to the data set, using the specified time, the number of suspensions at that time and two stress values/profiles.
- AddFailureInterval( Double, Double, Integer, Object() ) Adds interval censored failures to the data set, using the specified start/end times, the number of failures during the interval and an array of stress values/profiles for all the stresses.
- AddFailureInterval( Double, Double, Integer, Object ) Adds interval censored failures to the data set, using the specified start/end times, the number of failures during the interval and a single stress value/profile.
- AddFailureInterval( Double, Double, Integer, Object, Object ) Adds interval censored failures to the data set, using the specified start/end times, the number of failures during the interval and two stress values/profiles.
- AddSuspensionInterval( Double, Double, Integer, Object() ) Adds interval censored suspensions to the data set, using the specified start/end times, the number of suspensions during the interval and an array of stress values/profiles for all the stresses.
- AddSuspensionInterval( Double, Double, Integer, Object ) Adds interval censored suspensions to the data set, using the specified start/end times, the number of suspensions during the interval and a single stress value/profile.
- AddSuspensionInterval( Double, Double, Integer, Object, Object ) Adds interval censored suspensions to the data set, using the specified start/end times, the number of suspensions during the interval and two stress values/profiles.
- ClearDataSet Clears all data and stresses in the data set, and removes the fitted model, if any.
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
- AnalysisSettings (as ALTAAnalysisOptions) Sets some of the control panel analysis settings for use with the ALTADataSet.Calculate method.
- GeneralSettings (as ALTAGeneralOptions) Sets some of the Application Setup calculation options that can apply to the ALTADataSet.Calculate method.
- PlotUseStress( Integer ) (as double) Sets or gets the use stress value of a particular stress for use in plots (not calculations), using the specified stress index.
- StressRelation( Integer ) (as ALTASolverLSR) Sets or gets the stress transformation of a particular stress, using the specified stress index.
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.
- Message( ALTADataSet, String, String, Boolean ) Called when a message should be displayed. Displays a message.
- Question( ALTADataSet, String, MsgBoxStyle, MsgBoxResult ) Called when an answer to a question is required. Displays a prompt and returns the result.
- UpdateCalculationProgress( ALTADataSet, String, String, Double, Boolean, Long, Boolean ) Called when the calculation progress should be updated. Provides ability to customize the calculation progress display.
- ShowCalculationProgress( ALTADataSet ) Called when calculation progress should be shown. Shows the current calculation progress if the calculation process is running.
- HideCalculationProgress( ALTADataSet ) Called when calculation progress should be hidden. Hides the calculation progress display.
Usage Example
Declare the ALTADataSet. See ALTADataSet Constructors for additional details. Dim ALTADS as New ALTADataSet Create a time-varying stress profile. See ALTAStressProfile for additional details. 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. See AddFailure for additional details. ALTADS.AddFailure(1, 1, sp) ALTADS.AddFailure(2, 1, sp) ALTADS.AddFailure(3, 1, sp) Add suspensions to the data set. See AddSuspension for additional details. ALTADS.AddSuspension(1, 1, sp) ALTADS.AddSuspension(2, 1, sp) ALTADS.AddSuspension(3, 1, sp) Get the numbers of failure times. In this example, NumberOfFailures will be 3. See FailureCount for additional details. Dim NumberOfFailures as Integer NumberOfFailures = ALTADataSet.FailureCount Get the number of suspensions. In this example, NumberOfSuspension will be 3. SeeSuspensionCount for additional details. Dim NumberOfSuspension as Integer NumberOfSuspension = ALTADS.SuspensionCount Calculate the ALTADataSet using default analysis settings. See Calculate for additional details. ALTADS.Calculate Use ClearDataSet to clear the data and fitted model. See ClearDataSet for additional details. ALTADS.ClearDataSet