CModel Constructors: Difference between revisions
Jump to navigation
Jump to search
Kate Racaza (talk | contribs) No edit summary |
Kate Racaza (talk | contribs) |
||
Line 23: | Line 23: | ||
!<span style="color:#585858;">Order of Parameters</span> | !<span style="color:#585858;">Order of Parameters</span> | ||
|- | |- | ||
|style="width: 130px;"|Weibull||style="width: 650px;"| | |style="width: 130px;"|Weibull||style="width: 650px;"|Beta, Eta, Gamma | ||
|- | |- | ||
|Normal|| | |Normal||Mean, Std | ||
|- | |- | ||
|Lognormal|| | |Lognormal||LogMean, LogStd | ||
|- | |- | ||
|Exponential|| | |Exponential||Lambda, Gamma | ||
|- | |- | ||
|G-Gamma|| | |G-Gamma||Mu, K | ||
|- | |- | ||
|Gamma|| | |Gamma||Mu, K | ||
|- | |- | ||
|Logistic|| | |Logistic||Mu, Sigma | ||
|- | |- | ||
|LogLogistic|| | |LogLogistic||Mu, Sigma | ||
|- | |- | ||
|Gumbel|| | |Gumbel||Mu, Sigma | ||
|- | |- | ||
|Mixed Weibull|| | |Mixed Weibull||Subpop1-Beta, Subpop1-Eta, Subpop1-Portion, Subpop2-Beta, Subpop2-Eta, Subpop2-Portion, Subpop3-Beta, Subpop3-Eta, Subpop3-Portion, Subpop4-Beta, Subpop4-Eta, Subpop4-Portion | ||
|- | |- | ||
|FixedUnreliability||rowspan="3"|If creating a constant model, enter a value for Parameter 1 and set Parameter 2 to zero (0) or nothing. <br>If creating a dynamic model, enter the numeric ID of the variable resource for Parameter 2 and set Parameter 1 to zero (0) or nothing. If the variable does not exist, it creates a dynamic model with no predefined variable. | |FixedUnreliability||rowspan="3"|If creating a constant model, enter a value for Parameter 1 and set Parameter 2 to zero (0) or nothing. <br>If creating a dynamic model, enter the numeric ID of the variable resource for Parameter 2 and set Parameter 1 to zero (0) or nothing. If the variable does not exist, it creates a dynamic model with no predefined variable. | ||
Line 49: | Line 49: | ||
|FixedCost | |FixedCost | ||
|} | |} | ||
== Example == | == Example == |
Revision as of 15:34, 2 October 2015
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 of the model types listed in the table below. These constants are obtained from the ModelTypeEnum.
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.
Model Type | Order of Parameters |
---|---|
Weibull | Beta, Eta, Gamma |
Normal | Mean, Std |
Lognormal | LogMean, LogStd |
Exponential | Lambda, Gamma |
G-Gamma | Mu, K |
Gamma | Mu, K |
Logistic | Mu, Sigma |
LogLogistic | Mu, Sigma |
Gumbel | Mu, Sigma |
Mixed Weibull | Subpop1-Beta, Subpop1-Eta, Subpop1-Portion, Subpop2-Beta, Subpop2-Eta, Subpop2-Portion, Subpop3-Beta, Subpop3-Eta, Subpop3-Portion, Subpop4-Beta, Subpop4-Eta, Subpop4-Portion |
FixedUnreliability | If creating a constant model, enter a value for Parameter 1 and set Parameter 2 to zero (0) or nothing. If creating a dynamic model, enter the numeric ID of the variable resource for Parameter 2 and set Parameter 1 to zero (0) or nothing. If the variable does not exist, it creates a dynamic model with no predefined variable. |
FixedDuration | |
FixedCost |
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)