CModel Constructors: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 9: Line 9:
===Parameters===
===Parameters===
''ModelType''
''ModelType''
: The type of model (e.g., 2-parameter Weibull). Can be any [[ModelTypeEnum Enumeration|ModelTypeEnum]] constant. (Required)
:Required. The type of model (e.g., 2-parameter Weibull). Can be any [[ModelTypeEnum Enumeration|ModelTypeEnum]] constant.
''ModelCategory''
''ModelCategory''
: The model category (e.g., reliability model). Can be any [[ModelCategoryEnum Enumeration|ModelCategoryEnum]] constant. (Required)
:Required. The model category (e.g., reliability model). Can be any [[ModelCategoryEnum Enumeration|ModelCategoryEnum]] constant.
''ModelName''
''ModelName''
: String. The model name. (Required)
:Required. String. The model name.
''ModelParams()''
''ModelParams()''
: Double. An array of the model's parameters. (Optional)<!--Need to create/link page explaining how the values should be ordered, depending on distribution.-->
:Required. Double. An array of the model's parameters.<!--Need to create/link page explaining how the values should be ordered, depending on distribution.-->





Revision as of 16:52, 25 August 2015

APIWiki.png


Member of: SynthesisAPI9.cModel


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

Syntax

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

Parameters

ModelType

Required. The type of model (e.g., 2-parameter Weibull). Can be any ModelTypeEnum constant.

ModelCategory

Required. The model category (e.g., reliability model). Can be any ModelCategoryEnum constant.

ModelName

Required. String. The model name.

ModelParams()

Required. Double. An array of the model's parameters.


Example

VB.NET

 'The following code creates a 2-parameter Weibull reliability model, 
 'with beta 1 and eta 100. The model name is "MyNewModel." 
 Dim ModelParams(1) As Double
 ModelParams(0) = 1
 ModelParams(1) = 100
 Dim newModel As New cModel(ModelTypeEnum.Weibull2,ModelCategoryEnum.Reliability, "MyNewModel", ModelParams)

 'Alternatively, you can create a new model using an in-line parameter list. 
 Dim newModel As New cModel(ModelTypeEnum.Weibull2, ModelCategoryEnum.Reliability, "MyNewModel", 1, 100)