ALTADataSet.Calculate: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(9 intermediate revisions by the same user not shown)
Line 2: Line 2:




<onlyinclude>Returns a message box that shows the estimated parameters of the model (i.e., distribution and life-stress relationship), based on the settings specified in the <code>AnalysisSettings</code> property of the ALTADataSet object. In addition, it creates a retrievable [[CModel Class|cModel]] object that represents the fitted model from the accelerated life testing data analysis.</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>
 
 
'''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 <code>ALTADataSet</code> object.


== Syntax ==
== Syntax ==
Line 16: Line 19:
   {{APIPrefix|Dim}} ADS {{APIPrefix|As New}} ALTADataSet
   {{APIPrefix|Dim}} ADS {{APIPrefix|As New}} ALTADataSet
    
    
  {{APIComment|'Define a stress type with use stress level &#61; 25.}}
  {{APIComment|'Define a stress type with use stress level &#61; 300.}}
   {{APIPrefix|Call}} ADS.AddStressDefinition({{APIString|"Stress1"}},,300)
   {{APIPrefix|Call}} ADS.AddStressDefinition({{APIString|"Stress1"}},,300)
   
   
  {{APIComment|'Add failure times for Stress1 &#61; 190.}}
  {{APIComment|'Add failure times for Stress1 &#61; 190 and 235.}}
  {{APIPrefix|Dim}} Stress(0) {{APIPrefix|As}} Variant
   {{APIPrefix|Call}} ADS.AddFailure_2(100, 1, 190)
  Stress(0) = 190
   {{APIPrefix|Call}} ADS.AddFailure_2(120, 1, 190)
   {{APIPrefix|Call}} ADS.AddFailure(100, 1, Stress)
   {{APIPrefix|Call}} ADS.AddFailure_2(130, 1, 235)
   {{APIPrefix|Call}} ADS.AddFailure(120, 1, Stress)
   {{APIPrefix|Call}} ADS.AddFailure_2(140, 1, 235)
  Stress(0) = 235
   {{APIPrefix|Call}} ADS.AddFailure(130, 1, Stress)
   {{APIPrefix|Call}} ADS.AddFailure(140, 1, Stress)
   
   
  {{APIComment|'Fit the data to a model, using all default analysis settings.}}
  {{APIComment|'Analyze the data set, using all default analysis settings.}}
   {{APIPrefix|Call}} ADS.Calculate()
   {{APIPrefix|Call}} ADS.Calculate()
 
   
  {{APIComment|'Retrieve the fitted model.}}
  {{APIComment|'Calculate the reliability at 100 hrs and display the result.}}
  {{APIPrefix|Dim}} model {{APIPrefix|As}} cModel
  {{APIPrefix|Set}} model = ADS.FittedModel
{{APIComment|'Using the model, calculate the reliability at 100 hrs and display the result.}}
   {{APIPrefix|Dim}} r {{APIPrefix|As}} Double
   {{APIPrefix|Dim}} r {{APIPrefix|As}} Double
   r = model.reliability(100)
   r = ADS.FittedModel.Reliability(100)
   MsgBox({{APIString|"Reliability at 100 hrs: "}} & r)
   MsgBox({{APIString|"Reliability at 100 hrs: "}} & r)


Line 46: Line 41:
   {{APIPrefix|Dim}} ADS {{APIPrefix|As New}} ALTADataSet
   {{APIPrefix|Dim}} ADS {{APIPrefix|As New}} ALTADataSet
    
    
  {{APIComment|'Define a stress type with use stress level &#61; 25.}}
  {{APIComment|'Define a stress type with use stress level &#61; 300.}}
   ADS.AddStressDefinition({{APIString|"Stress1"}},,300)
   ADS.AddStressDefinition({{APIString|"Stress1"}},,300)
   
   
  {{APIComment|'Add failure times for Stress1 &#61; 190.}}
  {{APIComment|'Add failure times for Stress1 &#61; 190 and 235.}}
   ADS.AddFailure(100, 1, 190)
   ADS.AddFailure(100, 1, 190)
   ADS.AddFailure(120, 1, 190)
   ADS.AddFailure(120, 1, 190)
Line 55: Line 50:
   ADS.AddFailure(140, 1, 235)
   ADS.AddFailure(140, 1, 235)
   
   
  {{APIComment|'Fit the data to a model, using all default analysis settings.}}
  {{APIComment|'Analyze the data set, using all default analysis settings.}}
   ADS.Calculate()
   ADS.Calculate()
 
 
  {{APIComment|'Retrieve the fitted model.}}
  {{APIComment|'Calculate the reliability at 100 hrs and display the result.}}
  {{APIPrefix|Dim}} model {{APIPrefix|As}} cModel
  model = ADS.FittedModel
{{APIComment|'Using the model, calculate the reliability at 100 hrs and display the result.}}
   {{APIPrefix|Dim}} r {{APIPrefix|As}} Double
   {{APIPrefix|Dim}} r {{APIPrefix|As}} Double
   r = model.reliability(100)
   r = ADS.FittedModel.Reliability(100)
   MsgBox({{APIString|"Reliability at 100 hrs: "}} & r)
   MsgBox({{APIString|"Reliability at 100 hrs: "}} & r)

Latest revision as of 22:24, 4 May 2017

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 ALTADataSet 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)