CModel.SetModel: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 3: Line 3:
Creates a new model.
Creates a new model.
== Method Syntax ==
== Method Syntax ==
{{APIName|SetModel}}
*SetModel( ModelType {{APIPrefix|As}} [[ModelTypeEnum]], ModelCategory {{APIPrefix|As}} [[ModelCategoryEnum]], ModelParams(){{APIPrefix|As Double}} )
{{APIPrefix|( ByVal}}
{{APIName|ModelType}}
{{APIPrefix|As}}
{{APIName|[[ModelTypeEnum]],}}
{{APIPrefix|ByVal}}
{{APIName|ModelCategory}}
{{APIPrefix|As}}
{{APIName|[[ModelCategoryEnum]],}}
{{APIPrefix|ByVal}}
{{APIName|ModelParams()}}
{{APIPrefix|As Double}}
{{APIName|)}}<br>
{{APIComment|Sets a new model.}}


== Parameters ==
Parameters
'''ModelType'''
:''ModelType'': The [[ModelTypeEnum]] describing this model.
{{APIComment|The [[ModelTypeEnum]] describing this model.}}


'''ModelCategory'''
:''ModelCategory'': The [[ModelCategoryEnum]] describing this model.
{{APIComment|The [[ModelCategoryEnum]] describing this model.}}


'''ModelParams'''
:''ModelParams'': The array of the model's parameters.
{{APIComment|The array of the models' parameters.}}


== Usage Example ==
== Usage Example ==

Revision as of 23:40, 5 March 2014


Creates a new model.

Method Syntax

Parameters

ModelType: The ModelTypeEnum describing this model.
ModelCategory: The ModelCategoryEnum describing this model.
ModelParams: The array of the model's parameters.

Usage Example

Declare the cModel class using an in-line parameter list.

       Dim newModel As New cModel(ModelTypeEnum.Weibull2, ModelCategoryEnum.Reliability, "NewModel1", 1, 100)

Change the model type and parameters.

       newModel.SetModel(ModelTypeEnum.Lognormal, ModelCategoryEnum.Reliability, 200)