CModel Class: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
Line 38: Line 38:


== Properties  ==
== Properties  ==
*Name (as ''string'') {{APIComment|Sets or returns the name of the model (the one used in the repository)}}
*Name (as ''string'') {{APIComment|Gets or sets the name of the model (the one used in the repository).}}
*ID (as ''string''){{APIComment|Returns the ID of the model (the one used in the repository).}}
*ID (as ''string''){{APIComment|Gets the numerical ID of the model (the one used in the repository).}}
*ProjectID (as ''integer'') {{APIComment|Returns the ID of the project the resource belongs to.}}
*ProjectID (as ''integer'') {{APIComment|Gets the numerical ID of the project the model belongs to.}}
*Type (as ''[[ModelTypeEnum]]'') {{APIComment|Returns the type of the model.}}
*Type (as ''[[ModelTypeEnum]]'') {{APIComment|Gets the model type (e.g., 2-parameter Weibull).}}
*Category (as ''[[ModelCategoryEnum]]'') {{APIComment|Returns the category of the model.}}
*Category (as ''[[ModelCategoryEnum]]'') {{APIComment|Returns the model category (e.g., reliability).}}
*Designation (as ''string'') {{APIComment|Returns the designation of the model (for example Weibull-2).}}
*Designation (as ''string'') {{APIComment|Returns the designation of the model (for example "Weibull-2".}}
*ErrorHappened (as ''boolean'') {{APIComment|Whether or not the last calculation produced an error.}}
*ErrorHappened (as ''boolean'') {{APIComment|Whether or not the last calculation produced an error.}}
*ConfLevel (as ''double'') {{APIComment|Returns the confidence level that is currently used for calculations.}}
*ConfLevel (as ''double'') {{APIComment|Gets the confidence level that is currently used for calculations.}}
*NumStresses (as ''integer'') {{APIComment|Returns the number of stresses in the model.}}
*NumStresses (as ''integer'') {{APIComment|Gets the number of stresses in the model.}}


== Formatted Usage Example ==
== Formatted Usage Example ==

Revision as of 17:59, 7 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 (the one used in the repository).
  • ID (as string) Gets the numerical ID of the model (the one used in the repository).
  • 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) Returns the model category (e.g., reliability).
  • 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) Gets the confidence level that is currently used for calculations.
  • NumStresses (as integer) Gets 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