CModel Class: Difference between revisions
Jump to navigation
Jump to search
Chris Kahn (talk | contribs) |
Chris Kahn (talk | contribs) |
||
Line 28: | Line 28: | ||
*[[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 [[ | *[[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.}} | *[[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 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
- cModel() Creates an empty model. SetModel method must be called to set the model name, type, category and parameters.
- cModel(ModelTypeEnum, ModelCategoryEnum, String, Double()) Creates a new model using the provided model type, category, name and parameters.
Methods
- SetModel( ModelTypeEnum,ModelCategoryEnum,Double() ) Sets a new model.
- SetUseStress( Integer, Double ) Sets the use stress value for the stress with the specified index.
- SetUseStress( Double() ) Sets the use stress values for all stresses.
- Reliability( Double, [Double,] [Double] ) Returns the reliability at the specified time.
- Unreliability( Double, [Double,] [Double] ) Returns the probability of failure at the specified time.
- 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.
- FailureRate( Double ) Returns failure rate given the specified time.
- Parameters Returns an array of ParamValues objects containing the names and values of the model's parameters.
- ScaleParameter_A Returns the scale parameter for ALTA models. Returns 0 if the model is not an ALTA model.
- Bounds_Reliability Returns the bounds on the reliability given time.
- Bounds_Unreliability Returns the bounds on the unreliability given time
- Bounds_Time Returns the bounds on time given reliability
- Bounds_MeanTime Returns the bounds on mean time
- Bounds_FailureRate Returns bounds on failure rate given time.
- Bounds_Parameters Returns an array containing bounds on all model parameters.
- SetConfindenceLevel Sets the confidence level for all subsequent confidence bounds 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