CModel Class: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
Line 50: Line 50:
== Usage Example ==
== Usage Example ==


{{APIComment|Declare the WeibullDataSet. See [[WeibullDataSet Constructors]] for additional details.}}
{{APIComment|'Declare the WeibullDataSet. See [[WeibullDataSet Constructors]].}}
        Dim WDS as New WeibullDataSet
  Dim WDS as New WeibullDataSet
 
 
{{APIComment|Add values to the raw data. See [[WeibullDataSet.AddFailure]] for additional details.}}
{{APIComment|'Add values to the raw data. See [[WeibullDataSet.AddFailure]].}}
        WDS.AddFailure(1, 1)
  WDS.AddFailure(1, 1)
        WDS.AddFailure(2, 1)
  WDS.AddFailure(2, 1)
        WDS.AddFailure(3, 1)
  WDS.AddFailure(3, 1)
 
 
{{APIComment|Calculate the Fitted Model using the raw data.See [[WeibullDataSet.CalculateBestFit]] for additional details.}}  
{{APIComment|'Calculate the Fitted Model using the raw data.See [[WeibullDataSet.CalculateBestFit]].}}  
        WDS.CalculateBestFit
  WDS.CalculateBestFit
 
 
{{APIComment|Use the Fitted Model using the raw data. See [[WeibullDataSet.FittedModel]] for additional details.}}
{{APIComment|'Use the Fitted Model using the raw data. See [[WeibullDataSet.FittedModel]].}}
        Dim WDSFittedModel as cModel
  Dim WDSFittedModel as cModel
        WDSFittedModel = WDS.FittedModel
  WDSFittedModel = WDS.FittedModel

Revision as of 19:58, 26 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) Gets or sets the name of the model.
  • ID (as string) Gets the numerical ID of the model.
  • ProjectID (as integer) Gets the numerical ID of the project the model belongs to.
  • Type (as ModelTypeEnum) Gets the model type (e.g., 2-parameter Weibull).
  • Category (as ModelCategoryEnum) Gets the model category (e.g., reliability).
  • Designation (as string) Gets a string representing the model type (for example "2P-Weibull").
  • ErrorHappened (as boolean) Whether or not the last calculation produced an error.
  • ConfLevel (as double) Gets the confidence level that is currently used for calculations.
  • NumStresses (as integer) Gets the number of stresses in the model.

Usage Example

 'Declare the WeibullDataSet. See WeibullDataSet Constructors. 
 Dim WDS as New WeibullDataSet
 
 'Add values to the raw data. See WeibullDataSet.AddFailure. 
 WDS.AddFailure(1, 1)
 WDS.AddFailure(2, 1)
 WDS.AddFailure(3, 1)
 
 'Calculate the Fitted Model using the raw data.See WeibullDataSet.CalculateBestFit.  
 WDS.CalculateBestFit
 
 'Use the Fitted Model using the raw data. See WeibullDataSet.FittedModel. 
 Dim WDSFittedModel as cModel
 WDSFittedModel = WDS.FittedModel