CModel Class: Difference between revisions

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


== Methods ==
== Methods ==
'''Set/Return Model Properties'''
*[[cModel.SetModel|SetModel( ModelTypeEnum,ModelCategoryEnum,Double() ) ]] {{APIComment|Sets a new model.}}
*[[cModel.SetModel|SetModel( ModelTypeEnum,ModelCategoryEnum,Double() ) ]] {{APIComment|Sets a new model.}}
*[[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.}}


'''Set the Use Stress for ALTA Calculations'''
*[[cModel.SetUseStress|SetUseStress( Integer, Double )]] {{APIComment|Sets the use stress value for the stress with the specified index.}}
*[[cModel.SetUseStress|SetUseStress( Integer, Double )]] {{APIComment|Sets the use stress value for the stress with the specified index.}}
*[[cModel.SetUseStress|SetUseStress( Double() )]] {{APIComment|Sets the use stress values for all stresses.}}
*[[cModel.SetUseStress|SetUseStress( Double() )]] {{APIComment|Sets the use stress values for all stresses.}}
   
   
'''Standard Calculations'''
*[[CModel.Reliability|Reliability( Double, [Double,] [Double] )]] {{APIComment|Returns the reliability at the specified time.}}
*[[CModel.Reliability|Reliability( Double, [Double,] [Double] )]] {{APIComment|Returns the reliability at the specified time.}}
*[[CModel.Unreliability|Unreliability( Double, [Double,] [Double] )]] {{APIComment|Returns the probability of failure at the specified time.}}
*[[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.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.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.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.FailureRate|FailureRate( Double )]] {{APIComment|Returns failure rate given the specified time.}}


*[[CModel.Parameters|Parameters]] {{APIComment|Returns an array of [[ParamValues_Class|ParamValues]] objects containing the names and values of the model's parameters.}}
'''Confidence Bound Calculations'''
 
*[[CModel.SetConfindenceLevel|SetConfidenceLevel]] {{APIComment|Sets the confidence level for all subsequent confidence bounds calculations.}}
*[[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.}}
*[[CModel.Bounds_Unreliability|Bounds_Unreliability]] {{APIComment|Returns the bounds on the unreliability given time}}
*[[CModel.Bounds_Unreliability|Bounds_Unreliability]] {{APIComment|Returns the bounds on the unreliability given time}}
Line 37: Line 35:
*[[CModel.Bounds FailureRate|Bounds_FailureRate]] {{APIComment|Returns bounds on failure rate given time.}}
*[[CModel.Bounds FailureRate|Bounds_FailureRate]] {{APIComment|Returns bounds on failure rate given time.}}
*[[CModel.Bounds_Parameters|Bounds_Parameters]] {{APIComment|Returns an array containing bounds on all model parameters.}}
*[[CModel.Bounds_Parameters|Bounds_Parameters]] {{APIComment|Returns an array containing bounds on all model parameters.}}
*[[CModel.SetConfindenceLevel|SetConfindenceLevel]] {{APIComment|Sets the confidence level for all subsequent confidence bounds calculations.}}


== Properties  ==
== Properties  ==

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

Set/Return Model Properties

Set the Use Stress for ALTA Calculations

Standard Calculations

Confidence Bound Calculations

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