WeibullDataSet.Calculate: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
{{Template:APIClass|WeibullDataSet Class|WeibullDataSet}}
{{Template:API}}{{Template:APIBreadcrumb|.[[WeibullDataSet Class|WeibullDataSet]]}}
{{Template:WeibullDataSet.Calculate.Cmt}}  


This is equivalent to clicking the '''Calculate''' icon on the standard folio control panel and publishing the results.
 
<onlyinclude>Estimates the parameters of the data set, based on the settings specified in the AnalysisSettings property of the class. Returns a message box that shows the values of the parameters.</onlyinclude>
 
In addition, the method automatically creates a retrievable [[CModel Class|cModel]] object that represents the fitted model from the life data analysis.


== Syntax  ==
== Syntax  ==
*Calculate()
'''.Calculate


== Usage Example ==


  {{APIComment|'Declare a new WeibullDataSet object. See [[WeibullDataSet Class|WeibullDataSet]].}}
== Example ==
  Dim WDS As New WeibullDataSet("AddFailure_Example")
  '''VB.NET'''
   
   
{{APIComment|'Declare a new WeibullDataSet object.}}
  {{APIPrefix|Dim}} WDS {{APIPrefix|As New}} WeibullDataSet
 
  {{APIComment|'Add failure times to the data set.}}
  {{APIComment|'Add failure times to the data set.}}
  WDS.AddFailure(100, 1)
  {{APIPrefix|Call}} WDS.AddFailure(100, 1)
  WDS.AddFailure(120, 1)
  {{APIPrefix|Call}} WDS.AddFailure(120, 1)
  WDS.AddFailure(130, 1)   
  {{APIPrefix|Call}} WDS.AddFailure(130, 1)   
    
    
  {{APIComment|'Set the life distribution.}}
  {{APIComment|'Set the life distribution.}}
  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|'Fit the data to the life distribution, using all default analysis settings.}}
  WDS.Calculate()
  WDS.Calculate()
 
{{APIComment|'Retrieve the fitted life distribution model.}}
  {{APIPrefix|Dim}} model {{APIPrefix|As}} cModel
  {{APIPrefix|Set}} model = WDS.FittedModel
{{APIComment|'Using the model, calculate the reliability at 100 hrs and display the result.}}
  {{APIPrefix|Dim}} r {{APIPrefix|As}} Double
  r = model.reliability(100)
  MsgBox(r)
 
'''VB.NET'''
{{APIComment|'Declare a new WeibullDataSet object.}}
  {{APIPrefix|Dim}} WDS {{APIPrefix|As New}} WeibullDataSet
 
{{APIComment|'Add failure times to the data set.}}
  WDS.AddFailure(100, 1)
  WDS.AddFailure(120, 1)
  WDS.AddFailure(130, 1) 
    
    
  {{APIComment|'Retrieve the fitted life distribution model. See [[cModel Class|cModel]].}}
{{APIComment|'Set the life distribution.}}
  Dim model As cModel
  WDS.AnalysisSettings.Distribution = WeibullSolverDistribution.Weibull
  model = WDS.FittedModel
  WDS.AnalysisSettings.Parameters = WeibullSolverNumParameters.MS_2Parameter
 
{{APIComment|'Fit the data to the life distribution, using all default analysis settings.}}
  WDS.Calculate()
 
  {{APIComment|'Retrieve the fitted life distribution model.}}
  {{APIPrefix|Dim}} model {{APIPrefix|As}} cModel
  model = WDS.FittedModel
{{APIComment|'Using the model, calculate the reliability at 100 hrs and display the result.}}
  {{APIPrefix|Dim}} r {{APIPrefix|As}} Double
  r = model.reliability(100)
  MsgBox(r)

Revision as of 22:12, 30 March 2016

APIWiki.png


Member of: SynthesisAPI.WeibullDataSet


Estimates the parameters of the data set, based on the settings specified in the AnalysisSettings property of the class. Returns a message box that shows the values of the parameters.

In addition, the method automatically creates a retrievable cModel object that represents the fitted model from the life data analysis.

Syntax

.Calculate


Example

VB.NET

 '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. 
  WDS.AnalysisSettings.Distribution = WeibullSolverDistribution_Weibull
  WDS.AnalysisSettings.Parameters = WeibullSolverNumParameters_MS_2Parameter
 
 'Fit the data to the life distribution, using all default analysis settings. 
  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(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. 
  WDS.AnalysisSettings.Distribution = WeibullSolverDistribution.Weibull
  WDS.AnalysisSettings.Parameters = WeibullSolverNumParameters.MS_2Parameter
 
 'Fit the data to the life distribution, using all default analysis settings. 
  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(r)