CModel Constructors: Difference between revisions
Jump to navigation
Jump to search
Kate Racaza (talk | contribs) No edit summary |
Kate Racaza (talk | contribs) No edit summary |
||
Line 2: | Line 2: | ||
<onlyinclude>A parameterized constructor for the [[CModel Class|cModel]] class. | <onlyinclude>A parameterized constructor for the [[CModel Class|cModel]] class.</onlyinclude> | ||
== Syntax == | == Syntax == | ||
'''cModel'''(''ModelType'', ''ModelCategory'', ''ModelName'', ''ModelParams()'') | '''cModel'''(''ModelType'', ''ModelCategory'', ''ModelName'', {{APIPrefix|ParamArray}} ''ModelParams()'') | ||
===Parameters=== | ===Parameters=== | ||
Line 15: | Line 15: | ||
: String. The model name. (Required) | : String. The model name. (Required) | ||
''ModelParams()'' | ''ModelParams()'' | ||
: Double. An array of | : Double. An array of the model's parameters. (Optional)<!--Need to create/link page explaining how the values should be ordered, depending on distribution.--> | ||
{{APIPrefix|ParamArray}} | |||
== Example == | == Example == | ||
'''VB.NET''' | '''VB.NET''' | ||
{{APIComment|' | {{APIComment|'The following code creates a 2-parameter Weibull reliability model,}} | ||
{{APIPrefix|Dim}} | {{APIComment|'with beta 1 and eta 100. The model name is "MyNewModel."}} | ||
{{APIPrefix|Dim}} ModelParams(1) {{APIPrefix|As Double}} | |||
ModelParams(0) = 1 | |||
{{APIPrefix|Dim}} newModel {{APIPrefix|As New}} cModel(ModelTypeEnum.Weibull2,ModelCategoryEnum.Reliability, {{APIString|" | ModelParams(1) = 100 | ||
{{APIPrefix|Dim}} newModel {{APIPrefix|As New}} cModel(ModelTypeEnum.Weibull2,ModelCategoryEnum.Reliability, {{APIString|"MyNewModel"}}, ModelParams) | |||
{{APIComment|'Alternatively, you can create a new model using an in-line parameter list.}} | {{APIComment|'Alternatively, you can create a new model using an in-line parameter list.}} | ||
{{APIPrefix|Dim}} newModel {{APIPrefix|As New}} cModel(ModelTypeEnum.Weibull2, ModelCategoryEnum.Reliability, {{APIString|" | {{APIPrefix|Dim}} newModel {{APIPrefix|As New}} cModel(ModelTypeEnum.Weibull2, ModelCategoryEnum.Reliability, {{APIString|"MyNewModel"}}, 1, 100) |
Revision as of 22:04, 28 July 2015
Member of: SynthesisAPI9.cModel
A parameterized constructor for the cModel class.
Syntax
cModel(ModelType, ModelCategory, ModelName, ParamArray ModelParams())
Parameters
ModelType
- The type of model (e.g., 2-parameter Weibull). Can be any ModelTypeEnum constant. (Required)
ModelCategory
- The model category (e.g., reliability model). Can be any ModelCategoryEnum constant. (Required)
ModelName
- String. The model name. (Required)
ModelParams()
- Double. An array of the model's parameters. (Optional)
ParamArray
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)