User:Kate Racaza/test page2: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 17: Line 17:
     {{APIPrefix|Dim}} WDS {{APIPrefix|As New}} WeibullDataSet
     {{APIPrefix|Dim}} WDS {{APIPrefix|As New}} WeibullDataSet
    
    
   {{APIComment|'Add the failure times to the data set.}}
   {{APIComment|'Add failure times to the data set.}}
     WDS.AddFailure(16, 1)
     WDS.AddFailure(16, 1)
     WDS.AddFailure(34, 1)
     WDS.AddFailure(34, 1)
Line 24: Line 24:
     WDS.AddFailure(93, 1)
     WDS.AddFailure(93, 1)
    
    
   {{APIComment|'Add four suspensions to the data set.}}
   {{APIComment|'Add five suspensions to the data set.}}
     WDS.AddSuspension(120, 5)   
     WDS.AddSuspension(120, 5)   
   
   
Line 47: Line 47:
     {{APIPrefix|End Sub}}
     {{APIPrefix|End Sub}}
  {{APIPrefix|End Module}}
  {{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)
Next, we define the analysis settings. The  xxx
  {{APIComment|'Use the 2-parameter Weibull distribution with 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

Revision as of 23:43, 10 May 2016

DRAFT

APIWiki.png


<< Back to Tutorials Main Page

xxx

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.

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 with 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()
  
  'Retrieve the fitted life distribution model. 
   Dim model As cModel
   model = WDS.FittedModel

  'Using the model, calculate the probability of failure at 226 hrs and display the result. 
   Dim r As Double
   r = model.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) 

Next, we define the analysis settings. The xxx

  'Use the 2-parameter Weibull distribution with 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