ALTADataSet.ClearDataSet: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
Line 7: Line 7:
== Usage Example ==
== Usage Example ==


{{APIComment|Declare the ALTADataSet. See [[New ALTADataSet]] for additional details.}}
{{APIComment|'Declare a new ALTADataSet object. See [[ALTADataSet Class|ALTADataSet]].}}
        Dim ALTADS as New ALTADataSet
  Dim ADS As New ALTADataSet("AddFailure_Example")
 
{{APIComment|'Define a new stress. See [[ALTADataSet.AddStressDefinition|AddStressDefinition]].}}
  ADS.AddStressDefinition("Stress1")
{{APIComment|'Add 2 interval censored failures at stress = 100 to the data set.}}
{{APIComment|'The failures occurred between time = 10 and time = 20.}}
  ADS.AddSuspensions(10, 20, 2, 100)


{{APIComment|Declare an [[ALTAStressProfile Class|ALTAStressProfile]]. See [[ALTAStressProfile Class|ALTAStressProfile]] for additional details.}}
{{APIComment|'Add failure times to the data set.}}
        Dim sp = New ALTAStressProfile("Profile1")
  ADS.AddFailure(100, 1, 190)
        sp.RepeatCycle = True
  ADS.AddFailure(120, 1, 190)
        sp.AddSegment(1, 250)
  ADS.AddFailure(130, 1, 190)
        sp.AddSegment(2, 300)
  ADS.AddFailure(140, 1, 190)
        sp.AddSegment(3, 400)
  ADS.AddFailure(130, 1, 274)
 
  ADS.AddFailure(150, 1, 274)
{{APIComment|Add the stress profile. See [[ALTADataSet.AddStressProfile]] for additional details}}
  ADS.AddFailure(70, 1, 438)
        ALTADS.AddStressProfile(sp)
  ADS.AddFailure(80, 1, 438)
 
  ADS.AddFailure(85, 1, 438)
{{APIComment|Use ClearDataSet to clear data and fitted model.}}
  ADS.AddFailure(90, 1, 438)
        '''ALTADS.ClearDataSet'''
 
 
{{APIComment|'Clear the defined stress and failure times from the data set.}}
{{APIComment|Get the number of failures. In this example, NumberOfFailures will be 0.}}
  ADS.ClearDataSet
        Dim NumberOfFailures as Integer
        NumberOfFailures = ALTADS.FailureCount

Revision as of 21:09, 5 May 2014


Clears all data and stresses in the data set, and removes the fitted model, if any.

Syntax

  • ClearDataSet()

Usage Example

 'Declare a new ALTADataSet object. See ALTADataSet. 
 Dim ADS As New ALTADataSet("AddFailure_Example")
 
 'Define a new stress. See AddStressDefinition. 
 ADS.AddStressDefinition("Stress1")

 'Add 2 interval censored failures at stress = 100 to the data set. 
 'The failures occurred between time = 10 and time = 20. 
 ADS.AddSuspensions(10, 20, 2, 100)
 'Add failure times to the data set. 
 ADS.AddFailure(100, 1, 190)
 ADS.AddFailure(120, 1, 190)
 ADS.AddFailure(130, 1, 190)
 ADS.AddFailure(140, 1, 190)
 ADS.AddFailure(130, 1, 274)
 ADS.AddFailure(150, 1, 274)
 ADS.AddFailure(70, 1, 438)
 ADS.AddFailure(80, 1, 438)
 ADS.AddFailure(85, 1, 438)
 ADS.AddFailure(90, 1, 438)
 
 'Clear the defined stress and failure times from the data set. 
 ADS.ClearDataSet