CModel Class: Difference between revisions
Jump to navigation
Jump to search
Chris Kahn (talk | contribs) No edit summary |
Chris Kahn (talk | contribs) No edit summary |
||
Line 23: | Line 23: | ||
*[[CModel.Reliability|Reliability( Double, [Double], [Double] )]] {{APIComment|{{Template:CModel.Reliability.Cmt}}}} | *[[CModel.Reliability|Reliability( Double, [Double], [Double] )]] {{APIComment|{{Template:CModel.Reliability.Cmt}}}} | ||
*[[CModel.Unreliability|Unreliability( Double, [Double], [Double] )]] {{APIComment|{{Template:CModel.Unreliability.Cmt}}}} | *[[CModel.Unreliability|Unreliability( Double, [Double], [Double] )]] {{APIComment|{{Template:CModel.Unreliability.Cmt}}}} | ||
*[[CModel.Time|Time( Double [Double], [Double] )]] {{APIComment|{{Template:CModel.Time.Cmt}}}} | *[[CModel.Time|Time( Double [Double], [Double] )]] {{APIComment|{{Template:CModel.Time.Cmt}}}} | ||
*[[CModel.MeanTime|MeanTime( [Double], [Double] )]] {{APIComment|{{Template:CModel.MeanTime.Cmt}}}} | *[[CModel.MeanTime|MeanTime( [Double], [Double] )]] {{APIComment|{{Template:CModel.MeanTime.Cmt}}}} | ||
*[[CModel.Pdf|Pdf( Double [Double], [Double] )]] {{APIComment|{{Template:CModel.Pdf.Cmt}}}} | *[[CModel.Pdf|Pdf( Double [Double], [Double] )]] {{APIComment|{{Template:CModel.Pdf.Cmt}}}} | ||
*[[CModel.FailureRate|FailureRate( Double [Double], [Double] )]] {{APIComment| | *[[CModel.FailureRate|FailureRate( Double [Double], [Double] )]] {{APIComment|{{Template:CModel.FailureRate.Cmt}}}} | ||
'''Confidence Bound Calculations''' | '''Confidence Bound Calculations''' | ||
*[[CModel.SetConfindenceLevel| | *[[CModel.SetConfindenceLevel|SetConfindenceLevel]] {{APIComment|{{CModel.SetConfindenceLevel.Cmt}}}} | ||
*[[CModel.Bounds Reliability|Bounds_Reliability]] {{APIComment| | *[[CModel.Bounds Reliability|Bounds_Reliability]] {{APIComment|{{CModel.Bounds Reliability.Cmt}}}} | ||
*[[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}} | ||
*[[CModel.Bounds Time|Bounds_Time]] {{APIComment|Returns the bounds on time given reliability}} | *[[CModel.Bounds Time|Bounds_Time]] {{APIComment|Returns the bounds on time given reliability}} | ||
*[[CModel.Bounds MeanTime|Bounds_MeanTime]] {{APIComment|Returns the bounds on mean time}} | *[[CModel.Bounds MeanTime|Bounds_MeanTime]] {{APIComment|Returns the bounds on mean time}} | ||
*[[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.}} | ||
== Properties == | == Properties == |
Revision as of 16:41, 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
- 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
Set/Return Model Properties
- SetModel( ModelTypeEnum, ModelCategoryEnum, Double() ) Defines an existing cModel object.
- Parameters
- ScaleParameter_A Returns the scale parameter for ALTA models. Returns 0 if the model is not an ALTA model.
Set the Use Stress for ALTA Calculations
- SetUseStress( Integer, Double ) Updates the use stress value for the stress with the specified index.
- SetUseStress( Double() ) Updates the use stress values for all stresses.
Standard Calculations
- 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 [Double], [Double] ) Returns the time at which the specified reliability will be achieved.
- MeanTime( [Double], [Double] ) Returns the mean time to failure.
- Pdf( Double [Double], [Double] ) Returns the y-value from the pdf at the specified x-value (time).
- FailureRate( Double [Double], [Double] ) Returns the failure rate at the specified time.
Confidence Bound Calculations
- SetConfindenceLevel Sets the confidence level for all subsequent confidence bounds calculations. Returns True if successful, otherwise returns False.
- 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.
Properties
- Name (as string) Sets or returns the name of the model (the one used in the repository)
- ID (as string) Returns the ID of the model (the one used in the repository).
- ProjectID (as integer) Returns the ID of the project the resource belongs to.
- Type (as ModelTypeEnum) Returns the type of the model.
- Category (as ModelCategoryEnum) Returns the category of the model.
- 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) Returns the confidence level that is currently used for calculations.
- NumStresses (as integer) 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