ALTADataSet.AddSuspension: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
{{Template:APIClass|ALTADataSet Class|ALTADataSet}}
{{Template:API}}{{Template:APIBreadcrumb|.[[ALTADataSet_Class|ALTADataSet]]}}
Adds suspensions to the data set, using the time at which the units were suspended, the number of suspensions at that time and the associated stress level.


== Syntax ==
<ul>
<li>
AddSuspension(
{{APIName|Value}}
{{APIPrefix|As Double}}
{{APIName|,}}
{{APIName|NumberInGroup}}
{{APIPrefix|As Integer}}
{{APIName|,}}
{{APIName|Stress()}}
{{APIPrefix|As Object}}
{{APIName|)}}
{{APIComment|{{Template:ALTADataSet.AddSuspension1.Cmt}}}}
</li>
<li>
AddSuspension(
{{APIName|Value}}
{{APIPrefix|As Double}}
{{APIName|,}}
{{APIName|NumberInGroup}}
{{APIPrefix|As Integer}}
{{APIName|,}}
{{APIName|Stress1}}
{{APIPrefix|As Object}}
{{APIName|)}}
{{APIComment|{{Template:ALTADataSet.AddSuspension2.Cmt}}}}
</li>
<li>
AddSuspension(
{{APIName|Value}}
{{APIPrefix|As Double}}
{{APIName|,}}
{{APIName|NumberInGroup}}
{{APIPrefix|As Integer}}
{{APIName|,}}
{{APIName|Stress1}}
{{APIPrefix|As Object}}
{{APIName|,}}
{{APIName|Stress2}}
{{APIPrefix|As Object}}
{{APIName|)}}{{APIComment|{{Template:ALTADataSet.AddSuspension3.Cmt}}}}
</li>
</ul>


Parameters
<onlyinclude>Adds suspensions to the data set.</onlyinclude>
:''Value'': The suspension time.


:''NumberInGroup'': The number of units that were suspended at the ''Value'' time.
==Syntax==
'''.AddSuspension'''(''Value'', ''NumberinGroup'', {{APIPrefix|ByRef}} ''Stress()'')
'''.AddSuspension'''(''Value'', ''NumberinGroup'', ''Stress1'')
'''.AddSuspension'''(''Value'', ''NumberinGroup'', ''Stress1'', ''Stress2'')
 
===Parameters===
''Value''
:Required. Double. The suspension time.  


{{Template:ALTADataSet.StressParameters.Cmt}}
''NumberinGroup''
:Required. Integer. The number of suspended units at the time of suspension.  


== Usage Example ==
''Stress()''
:Required. Object. Can be an array of numeric stress values or [[ALTAStressProfile_Class|ALTAStressProfile]] objects (stress profiles apply to the cumulative damage (CD) model only).


  {{APIComment|'Declare a new ALTADataSet object. See [[ALTADataSet Class|ALTADataSet]].}}
''Stress1''
  Dim ADS As New ALTADataSet("AddFailure_Example")
:Required. Object. Can be a numeric stress value or an [[ALTAStressProfile_Class|ALTAStressProfile]] object (stress profiles apply to the cumulative damage (CD) model only).
 
''Stress2''
:Required. Object. Can be a numeric stress value or an [[ALTAStressProfile_Class|ALTAStressProfile]] object (stress profiles apply to the cumulative damage (CD) model only).
 
 
== Example ==
The following example demonstrates how to add suspensions to an ALTADataSet object.
 
'''VBA'''
  {{APIComment|'Declare a new ALTADataSet object.}}
  {{APIPrefix|Dim}} ADS {{APIPrefix|As New}} ALTADataSet
 
{{APIComment|'Define 2 stress types with use stress levels &#61; 10 and 25.}}
  {{APIPrefix|Call}} ADS.AddStressDefinition({{APIString|"Stress1"}},,10)
  {{APIPrefix|Call}} ADS.AddStressDefinition({{APIString|"Stress2"}},,25)
 
{{APIComment|'Add suspensions for Stress1 &#61; 190 and Stress2 &#61; 235.}}
  {{APIPrefix|Dim}} Stress(1) {{APIPrefix|As}} Variant
  Stress(0) = 190
  Stress(1) = 235
  {{APIPrefix|Call}} ADS.AddSuspension(100, 1, Stress)
  {{APIPrefix|Call}} ADS.AddSuspension(120, 1, Stress)
  {{APIPrefix|Call}} ADS.AddSuspension(130, 1, Stress)
  {{APIPrefix|Call}} ADS.AddSuspension(140, 1, Stress)
 
'''VB.NET'''
 
{{APIComment|'Declare a new ALTADataSet object.}}  
  {{APIPrefix|Dim}} ADS {{APIPrefix|As New}} ALTADataSet
    
    
  {{APIComment|'Define a new stress. See [[ALTADataSet.AddStressDefinition|AddStressDefinition]].}}
  {{APIComment|'Define 2 stress types with use stress levels &#61; 10 and 25.}}
  ADS.AddStressDefinition("Stress1")
  ADS.AddStressDefinition({{APIString|"Stress1"}},,10)
  ADS.AddStressDefinition({{APIString|"Stress2"}},,25)
   
   
  {{APIComment|'Add 5 suspensions at time &#61; 500 and stress &#61; 100 to the data set.}}
  {{APIComment|'Add suspensions for Stress1 &#61; 190 and Stress2 &#61; 235.}}
  ADS.AddSuspensions(500, 5, 100)
  ADS.AddSuspension(100, 1, 190, 235)
  ADS.AddSuspension(120, 1, 190, 235)
  ADS.AddSuspension(130, 1, 190, 235)

Revision as of 16:42, 19 April 2016

APIWiki.png


Member of: SynthesisAPI.ALTADataSet


Adds suspensions to the data set.

Syntax

.AddSuspension(Value, NumberinGroup, ByRef Stress())

.AddSuspension(Value, NumberinGroup, Stress1)

.AddSuspension(Value, NumberinGroup, Stress1, Stress2)

Parameters

Value

Required. Double. The suspension time.

NumberinGroup

Required. Integer. The number of suspended units at the time of suspension.

Stress()

Required. Object. Can be an array of numeric stress values or ALTAStressProfile objects (stress profiles apply to the cumulative damage (CD) model only).

Stress1

Required. Object. Can be a numeric stress value or an ALTAStressProfile object (stress profiles apply to the cumulative damage (CD) model only).

Stress2

Required. Object. Can be a numeric stress value or an ALTAStressProfile object (stress profiles apply to the cumulative damage (CD) model only).


Example

The following example demonstrates how to add suspensions to an ALTADataSet object.

VBA

 'Declare a new ALTADataSet object.  
  Dim ADS As New ALTADataSet
 
 'Define 2 stress types with use stress levels = 10 and 25. 
  Call ADS.AddStressDefinition("Stress1",,10)
  Call ADS.AddStressDefinition("Stress2",,25)
 
 'Add suspensions for Stress1 = 190 and Stress2 = 235. 
  Dim Stress(1) As Variant
  Stress(0) = 190
  Stress(1) = 235

  Call ADS.AddSuspension(100, 1, Stress)
  Call ADS.AddSuspension(120, 1, Stress)
  Call ADS.AddSuspension(130, 1, Stress)
  Call ADS.AddSuspension(140, 1, Stress)
VB.NET
 
 'Declare a new ALTADataSet object.  
  Dim ADS As New ALTADataSet
 
 'Define 2 stress types with use stress levels = 10 and 25. 
  ADS.AddStressDefinition("Stress1",,10)
  ADS.AddStressDefinition("Stress2",,25)

 'Add suspensions for Stress1 = 190 and Stress2 = 235. 
  ADS.AddSuspension(100, 1, 190, 235)
  ADS.AddSuspension(120, 1, 190, 235)
  ADS.AddSuspension(130, 1, 190, 235)