cModel Constructors

From ReliaWiki
Revision as of 21:46, 27 July 2015 by Kate Racaza (talk | contribs)
Jump to navigation Jump to search
APIWiki.png


Member of: SynthesisAPI9.cModel


A parameterized constructor for the cModel class. (VisualBasic.NET only)

Syntax

cModel(ModelType, ModelCategory, ModelName, ModelParams())

Parameters

ModelType

The type of model (e.g., 2-parameter Weibull), specified with a ModelTypeEnum enumeration value. (Note that some models cannot be created through the API.)

ModelCategory

The model category (e.g., reliability model), specified with a ModelCategoryEnum enumeration value.

ModelName

String. The model name.

ModelParams()

Double. An array of parameter values.

Example

VB.NET

 'Declare the cModel class using a pre-defined parameter list. 
 Dim newParams(1) As Double
 newParams(0) = 1
 newParams(1) = 100
 Dim newModel As New cModel(ModelTypeEnum.Weibull2,ModelCategoryEnum.Reliability, "NewModel1", newParams)
 
 'Alternatively, declare the cModel class using an in-line parameter list. 
 Dim newModel As New cModel(ModelTypeEnum.Weibull2, ModelCategoryEnum.Reliability, "NewModel1", 1, 100)