ALTADataSet.Calculate: Difference between revisions

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




<onlyinclude>Fits a life distribution and life-stress relationship to the current data set, and creates a [[CModel Class|cModel]] object that represents the fitted model. Returns a message box that shows the estimated parameters of the fitted model.</onlyinclude>
<onlyinclude>Fits a life distribution and life-stress relationship to the current data set, and creates a [[CModel Class|cModel]] object that represents the fitted model.</onlyinclude>


To specify the life distribution, life-stress relationship and other analysis settings, use the <code>AnalysisSettings</code> and <code>GeneralSettings</code> properties of the associated <code>ALTADataSet</code> object .  
 
'''Remarks''': To specify the distribution, life-stress relationship and other analysis settings, use the <code>AnalysisSettings</code> and <code>GeneralSettings</code> properties of the object. To return the <code>cModel</code> object that is produced, use the <code>FittedModel</code> property of the object.


== Syntax ==
== Syntax ==

Revision as of 16:20, 17 August 2016

APIWiki.png


Member of: SynthesisAPI.ALTADataSet


Fits a life distribution and life-stress relationship to the current data set, and creates a cModel object that represents the fitted model.


Remarks: To specify the distribution, life-stress relationship and other analysis settings, use the AnalysisSettings and GeneralSettings properties of the object. To return the cModel object that is produced, use the FittedModel property of the object.

Syntax

.Calculate()


Example

VBA

 'Declare a new ALTADataSet object. 
  Dim ADS As New ALTADataSet
 
 'Define a stress type with use stress level = 300. 
  Call ADS.AddStressDefinition("Stress1",,300)

 'Add failure times for Stress1 = 190 and 235. 
  Call ADS.AddFailure_2(100, 1, 190)
  Call ADS.AddFailure_2(120, 1, 190)
  Call ADS.AddFailure_2(130, 1, 235)
  Call ADS.AddFailure_2(140, 1, 235)

 'Analyze the data set, using all default analysis settings. 
  Call ADS.Calculate()
   
 'Calculate the reliability at 100 hrs and display the result. 
  Dim r As Double
  r = ADS.FittedModel.Reliability(100)
  MsgBox("Reliability at 100 hrs: " & r)
VB.NET

 'Declare a new ALTADataSet object. 
  Dim ADS As New ALTADataSet
 
 'Define a stress type with use stress level = 300. 
  ADS.AddStressDefinition("Stress1",,300)

 'Add failure times for Stress1 = 190 and 235. 
  ADS.AddFailure(100, 1, 190)
  ADS.AddFailure(120, 1, 190)
  ADS.AddFailure(130, 1, 235)
  ADS.AddFailure(140, 1, 235)

 'Analyze the data set, using all default analysis settings. 
  ADS.Calculate()
 
 'Calculate the reliability at 100 hrs and display the result. 
  Dim r As Double
  r = ADS.FittedModel.Reliability(100)
  MsgBox("Reliability at 100 hrs: " & r)