CModel Class: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
Line 11: Line 11:
== Methods ==
== Methods ==
'''Set/Return Model Properties'''
'''Set/Return Model Properties'''
*[[cModel.SetModel|SetModel( ModelTypeEnum, ModelCategoryEnum, Double() )]] {{APIComment|Sets a new model.}}
*[[cModel.SetModel|SetModel( ModelTypeEnum, ModelCategoryEnum, Double() )]] {{APIComment|{{Template:CModel.SetModel.Cmt}}}}
*[[CModel.Parameters|Parameters]] {{APIComment|Returns an array of [[ParamValues_Class|ParamValues]] objects containing the names and values of the model's parameters.}}
*[[CModel.Parameters|Parameters]] {{APIComment|Returns an array of [[ParamValues_Class|ParamValues]] objects containing the names and values of the model's parameters.}}
*[[CModel.ScaleParameter_A|ScaleParameter_A]] {{APIComment|Returns the scale parameter for ALTA models. Returns 0 if the model is not an ALTA model.}}
*[[CModel.ScaleParameter_A|ScaleParameter_A]] {{APIComment|Returns the scale parameter for ALTA models. Returns 0 if the model is not an ALTA model.}}

Revision as of 00:00, 6 March 2014



The model class allows you to represent probabilities, durations or costs, either fixed or time-dependent. It also contains methods for accessing the calculations performed with the Quick Calculation Pad (QCP).

Constructors

Methods

Set/Return Model Properties

Set the Use Stress for ALTA Calculations

Standard Calculations

Confidence Bound Calculations

Properties

  • Name (as string) Sets or returns the name of the model (the one used in the repository)
  • ID (as string) Returns the ID of the model (the one used in the repository).
  • ProjectID (as integer) Returns the ID of the project the resource belongs to.
  • Type (as ModelTypeEnum) Returns the type of the model.
  • Category (as ModelCategoryEnum) Returns the category of the model.
  • Designation (as string) Returns the designation of the model (for example Weibull-2).
  • ErrorHappened (as boolean) Whether or not the last calculation produced an error.
  • ConfLevel (as double) Returns the confidence level that is currently used for calculations.
  • NumStresses (as integer) Returns the number of stresses in the model.

Formatted Usage Example

Declare the WeibullDataSet. See New WeibullDataSet for additional details.

       Dim WDS as New WeibullDataSet

Add values to the raw data. See WeibullDataSet.AddFailure for additional details.

       WDS.AddFailure(1, 1)
       WDS.AddFailure(2, 1)
       WDS.AddFailure(3, 1)

Calculate the Fitted Model using the raw data.See WeibullDataSet.CalculateBestFit for additional details.

       WDS.CalculateBestFit

Use the Fitted Model using the raw data. See WeibullDataSet.FittedModel for additional details.

       Dim WDSFittedModel as cModel
       WDSFittedModel = WDS.FittedModel