Talk:Perform Life Data Analysis on External Data Source/Notes: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
(Created page with '=DRAFT= {{Template:API}}{{Template:BacktoPrevPage}} With the Synthesis API, you can leverage the Weibull++ analysis engine to perform life data analysis on an external data sour…')
 
No edit summary
Line 2: Line 2:
{{Template:API}}{{Template:BacktoPrevPage}}
{{Template:API}}{{Template:BacktoPrevPage}}


With the Synthesis API, you can leverage the Weibull++ analysis engine to perform life 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.
With the Synthesis API, you can leverage the Weibull++ analysis engine to perform life 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 obtain analysis results from the model.  




==Tutorial: Life Data Analysis==
==Tutorial: Life Data Analysis==
The following example demonstrates how to define a Weibull++ data set, fit a life distribution to the data and obtain analysis results from the model. A discussion of the example follows.  
The following example demonstrates how to define and analyze a Weibull++ data set, and use the result to estimate the probability of failure. A discussion of the example follows.  


The following table shows the data set used in this example.
This example uses the following data set:
{|{{table}}
{|{{table}}
|Number in State||State||Time to F or S
|Number in State||State||Time to F or S
Line 82: Line 82:
   WDS.AddSuspension(120, 5)  
   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.
The AnalysisSetting property returns a [[WeibullAnalysisOptions Class|WeibullAnalysisOptions]] object, which represents the analysis settings of the data set. In the following example, we use the <code>Distribution</code>, <code>Parameters</code> and <code>Analysis</code> properties of the object 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|'Use the 2-parameter Weibull distribution and the rank regression on X (RRX) analysis method.}}
Line 90: Line 90:
   WDS.AnalysisSettings.Analysis = WeibullSolverMethod.RRX
   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.  
Use the [[WeibullDataSet.Calculate|Calculate]] method to analyze the data set. The method returns a message box that shows the estimated parameters of the life distribution, based on the settings specified in the <code>AnalysisSettings</code> property.  


  {{APIComment|'Analyze the data set.}}
  {{APIComment|'Analyze the data set.}}
   WDS.Calculate()
   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).
The <code>FittedModel</code> 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 use the [[CModel.Unreliability|cModel.Unreliability]] method to calculate for the probability of failure.


   {{APIComment|'Calculate the probability of failure at 226 hrs and display the result.}}
   {{APIComment|'Calculate the probability of failure at 226 hrs and display the result.}}

Revision as of 20:32, 12 May 2016

DRAFT

APIWiki.png


<< Back to Tutorials Main Page

With the Synthesis API, you can leverage the Weibull++ analysis engine to perform life 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 obtain analysis results from the model.


Tutorial: Life Data Analysis

The following example demonstrates how to define and analyze a Weibull++ data set, and use the result to estimate the probability of failure. A discussion of the example follows.

This example uses the following data set:

Number in State State Time to F or S
1 F 16
1 F 34
1 F 53
1 F 75
1 F 93
5 S 120
VB.NET

Imports SynthesisAPI 

Module Module1
   Sub Main()

  'Declare a new WeibullDataSet object.  
   Dim WDS As New WeibullDataSet
  
  '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)   

  '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
 
  'Analyze the data set. 
   WDS.Calculate()

  '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)

   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 data set. In the following example, we use the Distribution, Parameters and Analysis properties of the object 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

Use the Calculate method to analyze the data set. 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 use the cModel.Unreliability method to calculate for the probability of failure.

  '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