WeibullDataSet Class: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
Line 93: Line 93:
   WDS.AddFailure(120, 4)
   WDS.AddFailure(120, 4)
    
    
  {{APIComment|'Fit failure times to the specified distribution.}}
  {{APIComment|'Fit failure times to the specified distribution}}
   WDS.Calculate()
   WDS.Calculate()
    
    

Revision as of 19:04, 24 June 2015


Provides the functionality of a Weibull++ standard folio, including entering data in a data set, specifying analysis settings and fitting a distribution to the data set. To create plots, use the WAPlots class.

A usage example for this class is available here.

Constructors

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/Remove Data

Analyze Data

  • Calculate Fits the distribution to the current data set using the settings specified in the AnalysisSettings property.
  • CalculateBestFit Automatically finds the best fitting distribution and fits that distribution to the current data set using the settings specified in the BestFitSettings 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 life data analysis. This property is cleared if the analysis could not be completed.
  • AnalysisResults (as WeibullAnalysisResults) Gets the correlation coefficient, likelihood value and percent non-zero values that were estimated from the analysis, if applicable.

Data Set Properties

  • DatasetName (as string) Gets or sets the name of the data set, which will be displayed on any plot you create.
  • 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.

Events

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

The event handlers include:

Usage Example

This example demonstrates how to fit a times-to-failure data set to a life distribution and then use the fitted distribution to calculate the reliability at a specified time. Full application examples are available at Synthesis_API_Reference#Application_Examples.

 'Initialize a new WeibullDataSet object. 
 Dim ADS As New WeibullDataSet("DataSet1")
 
 'Set the life distribution. 
 WDS.AnalysisSettings.Distribution = WeibullSolverDistribution.Weibull
 WDS.AnalysisSettings.Parameters = WeibullSolverNumParameters.MS_2Parameter
 
 'Set the applicable analysis settings. 
 WDS.AnalysisSettings.Analysis = WeibullSolverMethod.MLE
 WDS.AnalysisSettings.RankingMethod = WeibullSolverRankMethod.Median
 WDS.AnalysisSettings.UseRSRegression = False
 WDS.AnalysisSettings.ConfBounds = WeibullSolverCBMethod.FisherMatrix
 WDS.AnalysisSettings.SortBeforeCalculations = True
 WDS.AnalysisSettings.UngroupGroupedData = False
 
 'Set the Application Setup options.  
 WDS.AnalysisSettings.UseSpecialSort = True
 WDS.GeneralSettings.AllowBiasingNormal = False
 WDS.GeneralSettings.DiscardNegLocation = False
 WDS.GeneralSettings.ResetExpLocation = False
 WDS.GeneralSettings.Use3PTrueMLE = False
 WDS.GeneralSettings.UseExtendedGGamma = False
 WDS.GeneralSettings.UsePlottedYPoints = False
 WDS.GeneralSettings.WarnNegLocation = False
 
 'Add failure times. 
 WDS.AddFailure(16, 1)
 WDS.AddFailure(34, 1)
 WDS.AddFailure(53, 1)
 WDS.AddFailure(75, 1)
 WDS.AddFailure(93, 1)
 WDS.AddFailure(120, 1)
 
 'Add 4 suspensions. 
 WDS.AddFailure(120, 4)
 
 'Fit failure times to the specified distribution 
 WDS.Calculate()
 
 'Get the reliability at 300 hours. 
 Dim Rel As Double
 Rel = WDS.FittedModel.Reliability(300)