CModel Class: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
Line 27: Line 27:
*'''[[CModel.MeanTime|MeanTime]]''' {{APIComment|Calculates the mean time value for a given Reliability.}}
*'''[[CModel.MeanTime|MeanTime]]''' {{APIComment|Calculates the mean time value for a given Reliability.}}
*'''[[CModel.Pdf|Pdf]]''' {{APIComment|Calculates the PDF.}}
*'''[[CModel.Pdf|Pdf]]''' {{APIComment|Calculates the PDF.}}
*'''[[CModel.FailureRate|FailureRate]]''' {{APIComment|Returns failure rate given time.}}
*'''[[CModel.FailureRate|FailureRate]]''' {{APIComment|Returns failure rate given time.}}
*{{APIName|[[CModel.FailureRate|FailureRate]]}}{{APIName|(}}{{APIName|Time}}{{APIPrefix|As Double}}{{APIName|,}}{{APIPrefix|Optional}}{{APIName|CurrentAge}}{{APIPrefix|As Double}}{{APIName|)}}{{APIName|0,}}{{APIPrefix|Optional}}{{APIName|DutyCycle}}{{APIPrefix|As Double}}{{APIName|1)}}{{APIPrefix|As Double}}
:{{APIComment|Returns failure rate given time.}}
*'''[[CModel.Parameters|Parameters]]''' {{APIComment|Returns an array containing model parameters and their values.}}
*'''[[CModel.Parameters|Parameters]]''' {{APIComment|Returns an array containing model parameters and their values.}}
*'''[[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 17:13, 17 February 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

Properties

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

Methods

  • SetModel Sets a new model.
  • SetUseStress Sets use stress value for a particular stress. This value is used in subsequent calculations.
  • Reliability Calculates the Reliability for a given time.
  • Unreliability Calculates the Unreliability for a given time.
  • Time Calculates the time value for a given Reliability.
  • MeanTime Calculates the mean time value for a given Reliability.
  • Pdf Calculates the PDF.


  • FailureRate ( Time As Double , Optional CurrentAge As Double ) 0, Optional DutyCycle As Double 1) As Double
Returns failure rate given time.

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