WeibullDataSet.Calculate: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 2: Line 2:




<onlyinclude>Returns a message box that shows the estimated parameters of the life distribution, based on the settings specified in the <code>AnalysisSettings</code> property of the WeibullDataSet object. In addition, it creates a retrievable [[CModel Class|cModel]] object that represents the fitted model from the life data analysis.</onlyinclude>
<onlyinclude>Analyzes the data set and returns a message box that shows the estimated parameters of the life distribution, based on the settings specified in the <code>AnalysisSettings</code> property of the WeibullDataSet object. In addition, it creates a retrievable [[CModel Class|cModel]] object that represents the fitted model from the life data analysis.</onlyinclude>


If no data set has been defined, the API prompts the user to enter the parameters for the specified distribution.
If no data set has been defined, the API prompts the user to enter the parameters for the specified distribution.
Line 21: Line 21:
   {{APIPrefix|Call}} WDS.AddFailure(130, 1)   
   {{APIPrefix|Call}} WDS.AddFailure(130, 1)   
    
    
  {{APIComment|'Set the life distribution.}}
  {{APIComment|'Set the life distribution. Leave all other settings at default.}}
   WDS.AnalysisSettings.Distribution = WeibullSolverDistribution_Weibull
   WDS.AnalysisSettings.Distribution = WeibullSolverDistribution_Weibull
   WDS.AnalysisSettings.Parameters = WeibullSolverNumParameters_MS_2Parameter
   WDS.AnalysisSettings.Parameters = WeibullSolverNumParameters_MS_2Parameter
    
    
  {{APIComment|'Fit the data to the life distribution, using all default analysis settings.}}
  {{APIComment|'Analyze the data set.}}
   WDS.Calculate()
   WDS.Calculate()
    
    
Line 47: Line 47:
   WDS.AddFailure(130, 1)   
   WDS.AddFailure(130, 1)   
    
    
  {{APIComment|'Set the life distribution.}}
  {{APIComment|'Set the life distribution. Leave all other settings at default.}}
   WDS.AnalysisSettings.Distribution = WeibullSolverDistribution.Weibull
   WDS.AnalysisSettings.Distribution = WeibullSolverDistribution.Weibull
   WDS.AnalysisSettings.Parameters = WeibullSolverNumParameters.MS_2Parameter
   WDS.AnalysisSettings.Parameters = WeibullSolverNumParameters.MS_2Parameter
    
    
  {{APIComment|'Fit the data to the life distribution, using all default analysis settings.}}
  {{APIComment|'Analyze the data set.}}
   WDS.Calculate()
   WDS.Calculate()
    
    

Revision as of 22:09, 19 May 2016

APIWiki.png


Member of: SynthesisAPI.WeibullDataSet


Analyzes the data set and returns a message box that shows the estimated parameters of the life distribution, based on the settings specified in the AnalysisSettings property of the WeibullDataSet object. In addition, it creates a retrievable cModel object that represents the fitted model from the life data analysis.

If no data set has been defined, the API prompts the user to enter the parameters for the specified distribution.

Syntax

.Calculate


Example

VBA

 'Declare a new WeibullDataSet object.  
  Dim WDS As New WeibullDataSet
  
 'Add failure times to the data set. 
  Call WDS.AddFailure(100, 1)
  Call WDS.AddFailure(120, 1)
  Call WDS.AddFailure(130, 1)  
 
 'Set the life distribution. Leave all other settings at default. 
  WDS.AnalysisSettings.Distribution = WeibullSolverDistribution_Weibull
  WDS.AnalysisSettings.Parameters = WeibullSolverNumParameters_MS_2Parameter
 
 'Analyze the data set. 
  WDS.Calculate()
  
 'Retrieve the fitted life distribution model. 
  Dim model As cModel
  Set model = WDS.FittedModel

 'Using the model, calculate the reliability at 100 hrs and display the result. 
  Dim r As Double
  r = model.reliability(100)
  MsgBox("Reliability at 100 hrs: " & r)
VB.NET

 'Declare a new WeibullDataSet object.  
  Dim WDS As New WeibullDataSet
  
 'Add failure times to the data set. 
  WDS.AddFailure(100, 1)
  WDS.AddFailure(120, 1)
  WDS.AddFailure(130, 1)  
 
 'Set the life distribution. Leave all other settings at default. 
  WDS.AnalysisSettings.Distribution = WeibullSolverDistribution.Weibull
  WDS.AnalysisSettings.Parameters = WeibullSolverNumParameters.MS_2Parameter
 
 'Analyze the data set. 
  WDS.Calculate()
  
 'Retrieve the fitted life distribution model. 
  Dim model As cModel
  model = WDS.FittedModel

 'Using the model, calculate the reliability at 100 hrs and display the result. 
  Dim r As Double
  r = model.reliability(100)
  MsgBox("Reliability at 100 hrs: " & r)