CModel Constructors: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 11: Line 11:
:''ModelName'': The model name.
:''ModelName'': The model name.
:''ModelParams()'': An array of parameter values. <!--Need to create/link page explaining how the values should be ordered, depending on distribution.-->
:''ModelParams()'': An array of parameter values. <!--Need to create/link page explaining how the values should be ordered, depending on distribution.-->
== Usage Example ==
{{APIComment|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)
{{APIComment|Alternatively, declare the cModel class using an in-line parameter list.}}
        Dim newModel As New cModel(ModelTypeEnum.Weibull2, ModelCategoryEnum.Reliability, "NewModel1", 1, 100)

Revision as of 16:30, 12 March 2014


Constructors for the cModel class.

Syntax

  • cModel() Creates an empty model (use SetModel method to set the model name, type, category and parameters).
  • cModel( ModelTypeAs ModelTypeEnum, ModelCategory As ModelCategoryEnum, ModelName As String,ParamArray ModelParams()As Double) Creates a new model using the provided model type, category, name and parameters.

Parameters

ModelType: The type of model (e.g., 2-parameter Weibull), specified with a ModelTypeEnum value.
ModelCategory: The model category (e.g., reliability model), specified with a ModelCategoryEnum value.
ModelName: The model name.
ModelParams(): An array of parameter values.

Usage Example

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)