CModel.Time: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
m (Protected "CModel.Time" ([edit=sysop] (indefinite) [move=sysop] (indefinite)) [cascading])
mNo edit summary
 
(14 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Template:APIClass|CModel Class|CModel}}  
{{DISPLAYTITLE:cModel.Time}}{{Template:API}}{{Template:APIBreadcrumb|.[[CModel Class|cModel]]}}


Calculates time value.
== Method Syntax==
{{APIName|Time}}
{{APIName|(}}
{{APIPrefix|ByVal}}
{{APIName|Rel}}
{{APIPrefix|As Double}}
{{APIName|,}}
{{APIPrefix|Optional ByVal}}
{{APIName|CurrentAge}}
{{APIPrefix|As Double}}
=
{{APIName|0,}}
{{APIPrefix|Optional ByVal}}
{{APIName|DutyCycle}}
{{APIPrefix|As Double}}
=
{{APIName|1,}}
{{APIPrefix|Optional ByRef}}
{{APIName|AdjustedRel}}
{{APIPrefix|As Double}}
=
{{APIName|0)}}
{{APIPrefix|As Double}}


{{APIComment|Returns the time given reliability}}
<onlyinclude>Returns the time at which a specified reliability will be achieved. '''Double'''</onlyinclude>


== Parameters ==
== Syntax ==
'''Rel'''
{{APIComment|The reliability to calculate the time.}}


'''CurrentAge'''
'''.Time'''( ''Rel'', ''CurrentAge'', ''DutyCycle'', {{APIPrefix|ByRef}} ''AdjustedRel'')
{{APIComment|The current age.}}


'''DutyCycle'''
===Parameters===
{{APIComment|The duty cycle.}}


'''AdjustedRel'''
''Rel''
{{APIComment|If CurrentAge is greater than 0, the adjusted reliability is updated.}}
:Required. Double. The reliability goal.
 
''CurrentAge''
:Optional. Double. The current age. Default value = 0.
 
''DutyCycle''
:Optional. Double. The duty cycle. Default value = 1.
 
''AdjustedRel''
:Optional. Double. Passes the adjusted reliability value if the CurrentAge is greater than 0. Default value = 0.
 
 
== Example ==
'''VBA|VB.NET'''
{{APIComment|...}}
{{APIComment|'Add code to get an existing model or create a new one.}}
  {{APIPrefix|Dim}} AModel {{APIPrefix|As New}} cModel
{{APIComment|...}}
   
   
== Usage Example ==
{{APIComment|Calculate the time when the model's reliability will be 95%.}}
{{APIComment|Declare the cModel class using an in-line parameter list.}}
  {{APIPrefix|Dim}} ResultValue {{APIPrefix|As Double}}
        Dim newModel As New cModel(ModelTypeEnum.Weibull2, ModelCategoryEnum.Reliability, "NewModel1", 1, 100)
  ResultValue = AModel.Time(0.95)
 
{{APIComment|Calculate the Time when the reliability is at 95%, for the model described in newModel.}}
        Dim ResultValue as Double
        ResultValue = newModel.Time(.95)

Latest revision as of 21:17, 13 November 2015

APIWiki.png


Member of: SynthesisAPI.cModel


Returns the time at which a specified reliability will be achieved. Double

Syntax

.Time( Rel, CurrentAge, DutyCycle, ByRef AdjustedRel)

Parameters

Rel

Required. Double. The reliability goal.

CurrentAge

Optional. Double. The current age. Default value = 0.

DutyCycle

Optional. Double. The duty cycle. Default value = 1.

AdjustedRel

Optional. Double. Passes the adjusted reliability value if the CurrentAge is greater than 0. Default value = 0.


Example

VBA|VB.NET

 ... 

 'Add code to get an existing model or create a new one. 
 Dim AModel As New cModel
 ... 

 Calculate the time when the model's reliability will be 95%. 
 Dim ResultValue As Double
 ResultValue = AModel.Time(0.95)