User:Kate Racaza/test page: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
<div style="border:1px solid #D0CDE8; background:#EEEDF7; border-radius:10px; width:auto; margin:0 0 1em 1em; padding:1em; float:right;">
=DRAFT=
'''[[{{{Link}}}|<< {{{Text}}}]]'''
{{Template:API}}{{Template:BacktoPrevPage}}
 
With the Synthesis API, you can leverage the ALTA analysis engine to perform accelerated life testing data analysis on an external data source. In this tutorial, you will learn how to use the API to create and analyze a data set, and then estimate the probability of failure.
 
 
==Tutorial: Accelerated Life Testing Data Analysis - Single Stress==
The following example demonstrates how to define an ALTA data set and obtain analysis results from a single stress model. A discussion of the example follows.
 
'''VB.NET'''
{{APIPrefix|Imports}} SynthesisAPI
{{APIPrefix|Module}} Module1
    {{APIPrefix|Sub}} Main()
  {{APIComment|'Declare a new ALTADataSet object.}}
    {{APIPrefix|Dim}} ADS {{APIPrefix|As New}} ALTADataSet
  {{APIComment|'Define a stress type with use stress level &#61; 300.}}
    ADS.AddStressDefinition("Stress1",,300)
  {{APIComment|'Add failure times to the data set.}}
    ADS.AddFailure(245, 1, 353)
    ADS.AddFailure(110, 1, 373)
    ADS.AddFailure(180, 1, 373) 
    ADS.AddFailure(200, 1, 373)
    ADS.AddFailure(50, 1, 393)
    ADS.AddFailure(70, 1, 393)
    ADS.AddFailure(88, 1, 393)
    ADS.AddFailure(112, 1, 393)
    ADS.AddFailure(140, 1, 393)
    ADS.AddFailure(160, 1, 393)
   
  {{APIComment|'Add suspensions to the data set.}}
    ADS.AddSuspension(250, 5, 353) 
    ADS.AddSuspension(250, 2, 353)
 
  {{APIComment|'Use the 2-parameter Weibull distribution and the rank regression on X (RRX) analysis method.}}
  {{APIComment|'Keep all other analysis settings at default.}}
    ADS.AnalysisSettings.Distribution = WeibullSolverDistribution.Weibull
    ADS.AnalysisSettings.Parameters = WeibullSolverNumParameters.MS_2Parameter
    ADS.AnalysisSettings.Analysis = WeibullSolverMethod.RRX
 
  {{APIComment|'Analyze the data set.}}
    ADS.Calculate()
  {{APIComment|'Calculate the probability of failure at 226 hrs and display the result.}}
    {{APIPrefix|Dim}} r {{APIPrefix|As}} Double
    r = ADS.FittedModel.unreliability(226)
    MsgBox({{APIString|"Prob. Fail: "}} & r)
    {{APIPrefix|End Sub}}
{{APIPrefix|End Module}}
 
 
==Discussion==
 
The [[WeibullDataSet Class|WeibullDataSet]] class represents a Weibull++ standard folio data sheet. The class contains all the methods and properties that allow you to define a data set and fit a statistical distribution to the data.
 
  {{APIComment|'Declare a new WeibullDataSet object.}}
    {{APIPrefix|Dim}} WDS {{APIPrefix|As New}} WeibullDataSet
 
The data set can contain failures, suspensions, interval data or free-form data. The following example shows how to use the [[WeibullDataSet.AddFailure|AddFailure]] method to define failures and the [[WeibullDataSet.AddSuspension|AddSuspension]] method to define suspensions.
 
{{APIComment|'Add failure times to the data set.}}
  WDS.AddFailure(16, 1)
  WDS.AddFailure(34, 1)
  WDS.AddFailure(53, 1) 
  WDS.AddFailure(75, 1)
  WDS.AddFailure(93, 1)
 
{{APIComment|'Add five suspensions to the data set.}}
  WDS.AddSuspension(120, 5)
 
The AnalysisSetting property returns a [[WeibullAnalysisOptions Class|WeibullAnalysisOptions]] object, which represents the analysis settings of the WeibullDataSet object. In the following example, we use the <code>Distribution</code>, <code>Parameters</code> and <code>Analysis</code> properties of the WeibullAnalysisOptions class to specify the life distribution and analysis method.
 
{{APIComment|'Use the 2-parameter Weibull distribution and the rank regression on X (RRX) analysis method.}}
{{APIComment|'Keep all other analysis settings at default.}}
  WDS.AnalysisSettings.Distribution = WeibullSolverDistribution.Weibull
  WDS.AnalysisSettings.Parameters = WeibullSolverNumParameters.MS_2Parameter
  WDS.AnalysisSettings.Analysis = WeibullSolverMethod.RRX
 
To analyze the data set, use the [[WeibullDataSet.Calculate|Calculate]] method. The method returns a message box that shows the estimated parameters of the life distribution, based on the settings specified in the AnalysisSettings property.
 
{{APIComment|'Analyze the data set.}}
  WDS.Calculate()
 
The FittedModel property gets a [[CModel Class|cModel]] object that represents the fitted model of the life data analysis. From the model, you can calculate useful metrics such as reliability, failure rate, mean time, etc. In this example, we calculate for the probability of failure (unreliability).
 
  {{APIComment|'Calculate the probability of failure at 226 hrs and display the result.}}
    {{APIPrefix|Dim}} r {{APIPrefix|As}} Double
    r = WDS.FittedModel.unreliability(226)
    MsgBox({{APIString|"Prob. Fail: "}} & r)
 
 
==References==
*[[WeibullDataSet Class]]
*[[WeibullDataSet.AddFailure|WeibullDataSet.AddFailure Method]]
*[[WeibullDataSet.AddSuspension| WeibullDataSet.AddSuspension Method]]
*[[WeibullDataSet.Calculate|WeibullDataSet.Calculate Method]]
*[[WeibullAnalysisOptions Class]]
*[[CModel Class|cModel Class]]

Revision as of 21:17, 11 May 2016

DRAFT

APIWiki.png


<< Back to Tutorials Main Page

With the Synthesis API, you can leverage the ALTA analysis engine to perform accelerated life testing data analysis on an external data source. In this tutorial, you will learn how to use the API to create and analyze a data set, and then estimate the probability of failure.


Tutorial: Accelerated Life Testing Data Analysis - Single Stress

The following example demonstrates how to define an ALTA data set and obtain analysis results from a single stress model. A discussion of the example follows.

VB.NET

Imports SynthesisAPI 

Module Module1
   Sub Main()

  'Declare a new ALTADataSet object.  
   Dim ADS As New ALTADataSet

  'Define a stress type with use stress level = 300.  
   ADS.AddStressDefinition("Stress1",,300)

  'Add failure times to the data set. 
   ADS.AddFailure(245, 1, 353)
   ADS.AddFailure(110, 1, 373)
   ADS.AddFailure(180, 1, 373)  
   ADS.AddFailure(200, 1, 373)
   ADS.AddFailure(50, 1, 393)
   ADS.AddFailure(70, 1, 393)
   ADS.AddFailure(88, 1, 393)
   ADS.AddFailure(112, 1, 393)
   ADS.AddFailure(140, 1, 393)
   ADS.AddFailure(160, 1, 393)
   
  'Add suspensions to the data set. 
   ADS.AddSuspension(250, 5, 353)   
   ADS.AddSuspension(250, 2, 353) 
 
  'Use the 2-parameter Weibull distribution and the rank regression on X (RRX) analysis method. 
  'Keep all other analysis settings at default. 
   ADS.AnalysisSettings.Distribution = WeibullSolverDistribution.Weibull
   ADS.AnalysisSettings.Parameters = WeibullSolverNumParameters.MS_2Parameter
   ADS.AnalysisSettings.Analysis = WeibullSolverMethod.RRX
 
  'Analyze the data set. 
   ADS.Calculate()

  'Calculate the probability of failure at 226 hrs and display the result. 
   Dim r As Double
   r = ADS.FittedModel.unreliability(226)
   MsgBox("Prob. Fail: " & r)

   End Sub
End Module


Discussion

The WeibullDataSet class represents a Weibull++ standard folio data sheet. The class contains all the methods and properties that allow you to define a data set and fit a statistical distribution to the data.

  'Declare a new WeibullDataSet object.  
   Dim WDS As New WeibullDataSet

The data set can contain failures, suspensions, interval data or free-form data. The following example shows how to use the AddFailure method to define failures and the AddSuspension method to define suspensions.

 'Add failure times to the data set. 
  WDS.AddFailure(16, 1)
  WDS.AddFailure(34, 1)
  WDS.AddFailure(53, 1)  
  WDS.AddFailure(75, 1)
  WDS.AddFailure(93, 1)
  
 'Add five suspensions to the data set. 
  WDS.AddSuspension(120, 5) 

The AnalysisSetting property returns a WeibullAnalysisOptions object, which represents the analysis settings of the WeibullDataSet object. In the following example, we use the Distribution, Parameters and Analysis properties of the WeibullAnalysisOptions class to specify the life distribution and analysis method.

 'Use the 2-parameter Weibull distribution and the rank regression on X (RRX) analysis method. 
 'Keep all other analysis settings at default. 
  WDS.AnalysisSettings.Distribution = WeibullSolverDistribution.Weibull
  WDS.AnalysisSettings.Parameters = WeibullSolverNumParameters.MS_2Parameter
  WDS.AnalysisSettings.Analysis = WeibullSolverMethod.RRX

To analyze the data set, use the Calculate method. The method returns a message box that shows the estimated parameters of the life distribution, based on the settings specified in the AnalysisSettings property.

 'Analyze the data set. 
  WDS.Calculate()

The FittedModel property gets a cModel object that represents the fitted model of the life data analysis. From the model, you can calculate useful metrics such as reliability, failure rate, mean time, etc. In this example, we calculate for the probability of failure (unreliability).

  'Calculate the probability of failure at 226 hrs and display the result. 
   Dim r As Double
   r = WDS.FittedModel.unreliability(226)
   MsgBox("Prob. Fail: " & r)


References