CModel Class: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
Line 10: Line 10:


== Methods ==
== Methods ==
*[[cModel.SetModel|SetModel]] {{APIComment|Sets a new model.}}
*[[cModel.SetModel|SetModel( ModelTypeEnum,ModelCategoryEnum,Double() ) ]] {{APIComment|Sets a new model.}}
*[[cModel.SetUseStress|SetUseStress]] {{APIComment|Sets use stress value for a particular stress. This value is used in subsequent calculations.}}
 
*[[CModel.Reliability|Reliability]] {{APIComment|Calculates the Reliability for a given time.}}
*[[cModel.SetUseStress|SetUseStress( Integer, Double )]] {{APIComment|Sets the use stress value for the stress with the specified index.}}
*[[CModel.Unreliability|Unreliability]] {{APIComment|Calculates the Unreliability for a given time.}}
 
*[[CModel.Time|Time]] {{APIComment|Calculates the time value for a given Reliability.}}
*[[cModel.SetUseStress|SetUseStress( Double() )]] {{APIComment|Sets the use stress values for all stresses.}}
*[[CModel.MeanTime|MeanTime]] {{APIComment|Calculates the mean time value for a given Reliability.}}
*[[CModel.Pdf|Pdf]] {{APIComment|Calculates the PDF.}}
*[[CModel.Reliability|Reliability( Double, [Double,] [Double] )]] {{APIComment|Returns the reliability at the specified time.}}
*[[CModel.FailureRate|FailureRate]] {{APIComment|Returns failure rate given time.}}
 
*[[CModel.Parameters|Parameters]] {{APIComment|Returns an array containing model parameters and their values.}}
*[[CModel.Unreliability|Unreliability( Double, [Double,] [Double] )]] {{APIComment|Returns the probability of failure at the specified time.}}
 
*[[CModel.Time|Time( Double )]] {{APIComment|Returns the time at which the specified reliability will be achieved.}}
 
*[[CModel.MeanTime|MeanTime]] {{APIComment|Returns the mean time to failure.}}
 
*[[CModel.Pdf|Pdf( Double )]] {{APIComment|Returns the y-value from the ''pdf'' given the specified x-value.}}
 
*[[CModel.FailureRate|FailureRate( Double )]] {{APIComment|Returns failure rate given the specified time.}}
 
*[[CModel.Parameters|Parameters]] {{APIComment|Returns an array of [[ParamValue_Class|ParamValue]] 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.}}
*[[CModel.Bounds Reliability|Bounds_Reliability]] {{APIComment|Returns the bounds on the reliability given time.}}
*[[CModel.Bounds Reliability|Bounds_Reliability]] {{APIComment|Returns the bounds on the reliability given time.}}

Revision as of 23:12, 20 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

Methods

  • Time( Double ) Returns the time at which the specified reliability will be achieved.
  • MeanTime Returns the mean time to failure.
  • Pdf( Double ) Returns the y-value from the pdf given the specified x-value.
  • Parameters Returns an array of ParamValue objects containing the names and values of the model's parameters.

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.

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