CModel Class: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 10: Line 10:
*[[CModel Constructors|cModel( ModelTypeEnum, ModelCategoryEnum, String, Double() )]] {{APIComment|Creates a new model using the provided model type, category, name and parameters.}}
*[[CModel Constructors|cModel( ModelTypeEnum, ModelCategoryEnum, String, Double() )]] {{APIComment|Creates a new model using the provided model type, category, name and parameters.}}


== Methods  ==
== Methods and Properties ==


'''Set/Return Model Properties'''  
'''Model'''  


*[[CModel.SetModel|SetModel( ModelTypeEnum, ModelCategoryEnum, Double() )]] {{APIComment|{{Template:CModel.SetModel.Cmt}}}}  
*[[CModel.SetModel|SetModel( ModelTypeEnum, ModelCategoryEnum, Double() )]] {{APIComment|{{Template:CModel.SetModel.Cmt}}}}  
Line 18: Line 18:
*[[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.}}


'''Set/Return Item Properties'''  
'''Item'''  


*Name (as ''string'') {{APIComment|Gets or sets the name of the model.}}
*ID (as ''string''){{APIComment|Gets the numerical ID of the model.}}
*ProjectID (as ''integer'') {{APIComment|Gets the numerical ID of the project the model belongs to.}}
*[[CModel.ItemCategoryID|ItemCategoryID(Integer)]] {{APIComment|{{Template:ItemCategoryID.Cmt}}}}  
*[[CModel.ItemCategoryID|ItemCategoryID(Integer)]] {{APIComment|{{Template:ItemCategoryID.Cmt}}}}  
*[[CModel.ItemPartNumber|ItemPartNumber(String)]] {{APIComment|{{Template:ItemPartNumber.Cmt}}}}  
*[[CModel.ItemPartNumber|ItemPartNumber(String)]] {{APIComment|{{Template:ItemPartNumber.Cmt}}}}  
Line 29: Line 32:
*[[CModel.ItemKeywords|ItemKeywords(String)]] {{APIComment|{{Template:ItemKeywords.Cmt}}}}
*[[CModel.ItemKeywords|ItemKeywords(String)]] {{APIComment|{{Template:ItemKeywords.Cmt}}}}


'''Set the Use Stress for ALTA Calculations'''  
'''Use Stress for ALTA Calculations'''  


*[[CModel.SetUseStress|SetUseStress( Integer, Double )]] {{APIComment|{{Template:CModel.SetUseStress1}}}}  
*[[CModel.SetUseStress|SetUseStress( Integer, Double )]] {{APIComment|{{Template:CModel.SetUseStress1}}}}  
Line 55: Line 58:
== Properties  ==
== Properties  ==


*Name (as ''string'') {{APIComment|Gets or sets the name of the model.}}
*ID (as ''string''){{APIComment|Gets the numerical ID of the model.}}
*ProjectID (as ''integer'') {{APIComment|Gets the numerical ID of the project the model belongs to.}}
*Type (as ''[[ModelTypeEnum Enumeration|ModelTypeEnum]]'') {{APIComment|Gets the model type (e.g., 2-parameter Weibull).}}  
*Type (as ''[[ModelTypeEnum Enumeration|ModelTypeEnum]]'') {{APIComment|Gets the model type (e.g., 2-parameter Weibull).}}  
*Category (as ''[[ModelCategoryEnum Enumeration|ModelCategoryEnum]]'') {{APIComment|Gets the model category (e.g., reliability).}}  
*Category (as ''[[ModelCategoryEnum Enumeration|ModelCategoryEnum]]'') {{APIComment|Gets the model category (e.g., reliability).}}  

Revision as of 19:32, 28 April 2015



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).

To access/edit repository level information, including accessing/adding resources, please see Repository Class.

Constructors

Methods and Properties

Model

Item

Use Stress for ALTA Calculations

Standard Calculations

Confidence Bound Calculations

Properties

  • Type (as ModelTypeEnum) Gets the model type (e.g., 2-parameter Weibull).
  • Category (as ModelCategoryEnum) Gets the model category (e.g., reliability).
  • Designation (as string) Gets a string representing the model type (for example "2P-Weibull").
  • ErrorHappened (as boolean) Whether or not the last calculation produced an error.
  • ConfLevel (as double) Gets the confidence level that is currently used for calculations.
  • NumStresses (as integer) Gets the number of stresses in the model.
  • UnitID (as integer) Gets or sets the unit ID. *

Usage Example

 'Declare a new WeibullDataSet object. See WeibullDataSet. 
Dim WDS as New WeibullDataSet

 'Add failure times to the data set. See AddFailure. 
WDS.AddFailure(10, 1)
WDS.AddFailure(20, 1)
WDS.AddFailure(30, 1)

 'Calculate the fitted model using default settings. See Calculate.  
WDS.Calculate()

 'Assign the fitted model to a variable. 
Dim WDSFittedModel as cModel
WDSFittedModel = WDS.FittedModel

 'Calculate the reliability at time = 50 and save the result. See Reliability. 
Dim Rel as Double
Rel = WDSFittedModel.Reliability(50)

Notes