CModel Class: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
 
(53 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:cModel Class}}
{{DISPLAYTITLE:cModel Class}}{{Template:API}}{{Template:APIBreadcrumb}}
{{Template:APIClass|Resource Classes|Resource Classes}}  


{{Template:CModel_Class.Cmt}}


== Constructors ==
Represents a model resource.


*[[cModel_Constructors|cModel]] {{APIComment|Creates an empty model. SetModel method must be called to set the model name, type, category and parameters.}}
==Constructors==
*[[cModel_Constructors|cModel( ModelTypeEnum, ModelCategoryEnum, String, Double() )]] {{APIComment|Creates a new model using the provided model type, category, name and parameters.}}
{| {{APITable}}
|-
| style="width: 200px;"|cModel||Creates an instance of the cModel class.
|-
|[[CModel Constructors|cModel()]]||{{:CModel Constructors}}
|}


== Methods ==


'''Set/Return Model Properties'''
== Methods==
*[[cModel.SetModel|SetModel( ModelTypeEnum, ModelCategoryEnum, Double() )]] {{APIComment|{{Template:CModel.SetModel.Cmt}}}}
{| {{APITable}}
*[[CModel.Parameters|Parameters]] {{APIComment|{{Template:CModel.Parameters.Cmt}}}}
|-
*[[CModel.ScaleParameter_A|ScaleParameter_A]] {{APIComment|Returns the scale parameter for ALTA models. Returns 0 if the model is not an ALTA model.}}
| style="width: 200px;"|[[CModel.Bounds FailureRate|Bounds_FailureRate]]||{{:CModel.Bounds FailureRate}}
|-
|[[CModel.Bounds MeanTime|Bounds_MeanTime]]||{{:CModel.Bounds MeanTime}}
|-
|[[CModel.Bounds Parameters|Bounds_Parameters]]||{{:CModel.Bounds Parameters}}
|-
|[[CModel.Bounds Reliability|Bounds_Reliability]]||{{:CModel.Bounds Reliability}}
|-
|[[CModel.Bounds Time|Bounds_Time]]||{{:CModel.Bounds Time}}
|-
|[[CModel.Bounds Unreliability|Bounds_Unreliability]]||{{:CModel.Bounds Unreliability}}  
|-
|[[CModel.FailureRate|FailureRate]]||{{:CModel.FailureRate}}
|-
|[[CModel.MeanTime|MeanTime]]||{{:CModel.MeanTime}}
|-
|[[CModel.Parameters|Parameters]]||{{:CModel.Parameters}}
|-
|[[CModel.Pdf|Pdf]]||{{:CModel.Pdf}}
|-
||[[CModel.Reliability|Reliability]]||{{:CModel.Reliability}}  
|-
|[[CModel.SetConfidenceLevel|SetConfidenceLevel]]||{{:CModel.SetConfidenceLevel}}  
|-
|[[CModel.ScaleParameter A|ScaleParameter_A]]||{{:CModel.ScaleParameter_A}}
|-
|[[CModel.SetModel|SetModel]]||{{:CModel.SetModel}}
|-
|[[CModel.SetUseStress|SetUseStress]]||{{:CModel.SetUseStress}}
|-
|[[CModel.Time|Time]]||{{:CModel.Time}}
|-
|[[CModel.Unreliability|Unreliability]]||{{:CModel.Unreliability}}  
|}


'''Set the Use Stress for ALTA Calculations'''
*[[cModel.SetUseStress|SetUseStress( Integer, Double )]] {{APIComment|{{Template:CModel.SetUseStress1}}}}
*[[cModel.SetUseStress|SetUseStress( Double() )]]        {{APIComment|{{Template:CModel.SetUseStress2}}}}


'''Standard Calculations'''
==Properties==
*[[CModel.Reliability|Reliability( Double, [Double], [Double] )]] {{APIComment|{{Template:CModel.Reliability.Cmt}}}}
{| {{APITable}}
*[[CModel.Unreliability|Unreliability( Double, [Double], [Double] )]] {{APIComment|{{Template:CModel.Unreliability.Cmt}}}}
|-
*[[CModel.Time|Time( Double [Double], [Double] )]]  {{APIComment|{{Template:CModel.Time.Cmt}}}}
| style="width: 200px;"|Category||Gets a value from the '''[[ModelCategoryEnum Enumeration|ModelCategoryEnum]]''' enumeration, which specifies the model's category. Default value = 1 (reliability model).
*[[CModel.MeanTime|MeanTime( [Double], [Double] )]] {{APIComment|{{Template:CModel.MeanTime.Cmt}}}}
|-
*[[CModel.Pdf|Pdf( Double [Double], [Double] )]]    {{APIComment|{{Template:CModel.Pdf.Cmt}}}}
|ConfBoundsMethod||Gets a value from the '''[[ConfBoundsMethods Enumeration|ConfBoundsMethods]]''' enumeration, which specifies the method (e.g., Fisher Matrix, likelihood ratio. etc.) used for estimating the confidence bounds. Default value = 10 (no bounds).
*[[CModel.FailureRate|FailureRate( Double [Double], [Double] )]] {{APIComment|{{Template:CModel.FailureRate.Cmt}}}}
|-
|ConfLevel||Gets the confidence level that is currently used for calculations. '''Double'''
|-
|Designation||Gets a string representing the model type (e.g., distribution, constant or dynamic). '''String'''
|-
|ErrorHappened||Indicates whether the last calculation produced an error. (Read-only) '''Boolean'''
|-
|ID||Gets the numeric ID of the model. '''Long'''
|-
|{{Template:API_TxtIdentifiers}}
|-
|Name||Gets or sets the name of the model. '''String'''
|-
|NumStresses||Applies to ALTA models only. Gets the number of stresses in the model. '''Integer'''
|-
|ProjectID||Gets the numeric ID of the project the model belongs to. '''Integer'''
|-
|Type||Gets a value from the '''[[ModelTypeEnum Enumeration|ModelTypeEnum]]''' enumeration, which specifies the model type (e.g., distribution, constant or dynamic). Default value = 101 (2-parameter Weibull).
|-
|UnitID||Gets or sets the numeric ID of the model's unit of measurement. '''Integer'''
|}


'''Confidence Bound Calculations'''
*[[CModel.SetConfidenceLevel|SetConfidenceLevel( Double, ConfBoundsSides, Boolean, String )]]  {{APIComment|{{CModel.SetConfidenceLevel.Cmt}}}}
*[[CModel.Bounds Reliability|Bounds_Reliability( Double, [Double], [Double] )]]    {{APIComment|{{CModel.Bounds Reliability.Cmt}}}}
*[[CModel.Bounds_Unreliability|Bounds_Unreliability( Double, [Double], [Double] )]] {{APIComment|{{Template:CModel.Bounds Unreliability.Cmt}}}}
*[[CModel.Bounds Time|Bounds_Time( Double, [Double], [Double] )]]        {{APIComment|{{Template:CModel.Bounds Time.Cmt}}}}
*[[CModel.Bounds MeanTime|Bounds_MeanTime( [Double], [Double] )]] {{APIComment|{{Template:CModel.Bounds MeanTime.Cmt}}}}
*[[CModel.Bounds FailureRate|Bounds_FailureRate( Double, [Double], [Double] )]] {{APIComment|{{Template:CModel.Bounds FailureRate.Cmt}} }}
*[[CModel.Bounds_Parameters|Bounds_Parameters]]  {{APIComment|{{Template:CModel.Bounds Parameters.Cmt}}}}


== 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).}}
*Category (as ''[[ModelCategoryEnum Enumeration|ModelCategoryEnum]]'') {{APIComment|Gets the model category (e.g., reliability).}}
*Designation (as ''string'') {{APIComment|Gets a string representing the model type (for example "2P-Weibull").}}
*ErrorHappened (as ''boolean'') {{APIComment|Whether or not the last calculation produced an error.}}
*ConfLevel (as ''double'') {{APIComment|Gets the confidence level that is currently used for calculations.}}
*NumStresses (as ''integer'') {{APIComment|Gets the number of stresses in the model.}}


== Usage Example ==


{{APIComment|'Declare the WeibullDataSet. See [[WeibullDataSet Constructors]].}}
  Dim WDS as New WeibullDataSet
 
{{APIComment|'Add values to the raw data. See [[WeibullDataSet.AddFailure]].}}
  WDS.AddFailure(10, 1)
  WDS.AddFailure(20, 1)
  WDS.AddFailure(30, 1)
 
{{APIComment|'Calculate the fitted model using default settings. See [[WeibullDataSet.Calculate]].}}
  WDS.Calculate
 
{{APIComment|'Assign the fitted model to a variable. See [[WeibullDataSet.FittedModel]].}}
  Dim WDSFittedModel as cModel
  WDSFittedModel = WDS.FittedModel


{{APIComment|'Calculate the reliability at time = 50 and save result. See [[WCModel.Reliability]].}}
==See Also==
  Dim Rel as Double
*[[Repository.Model.AddModel|Repository.Model.AddModel Method]]
  Rel = WDSFittedModel.Reliability(50)
*[[Repository.Model.DeleteModel|Repository.Model.DeleteModel Method]]
*[[Repository.Model.GetAllModels|Repository.Model.GetAllModels Method]]
*[[Repository.Model.GetModel|Repository.Model.GetModel Method]]
*[[Repository.Model.IsModelUsed|Repository.Model.IsModelUsed Method]]
*[[Repository.Model.UpdateModel|Repository.Model.UpdateModel Method]]
*[[WAPlots.AddModel]]

Latest revision as of 14:52, 24 June 2016

APIWiki.png


Member of: SynthesisAPI


Represents a model resource.

Constructors

Name Description
cModel Creates an instance of the cModel class.
cModel() A parameterized constructor for the cModel class. (.NET only)


Methods

Name Description
Bounds_FailureRate Calculates the bounds on the failure rate at a specified time for an associated cModel object. Returns a BoundsValues object that represents the confidence bounds.
Bounds_MeanTime Calculates the bounds on the mean time to failure for an associated cModel object. Returns a BoundsValues object that represents the confidence bounds.
Bounds_Parameters Calculates the confidence bounds on the parameter estimates of an associated cModel object. Returns a ParamBoundsValues object that represents the confidence bounds on the parameter estimates.
Bounds_Reliability Calculates the bounds on the reliability at the specified time for an associated cModel object. Returns a BoundsValues object that represents the confidence bounds.
Bounds_Time Calculates the bounds on the time at which a specified reliability will be achieved for an associated cModel object. Returns a BoundsValues object that represents the confidence bounds.
Bounds_Unreliability Calculates the bounds on the probability of failure at a specified time for an associated cModel object. Returns a BoundsValues object that represents the confidence bounds.
FailureRate Returns the failure rate at the specified time. Double
MeanTime Returns the mean time to failure. Double
Parameters Returns an array of ParamValues objects that represent the parameter name and value pairs of an associated cModel object.
Pdf Returns the y-value of the pdf at the specified x-value (time). Double
Reliability Returns the reliability at the specified time. Double
SetConfidenceLevel Sets the confidence level to use in confidence bounds calculations for published models. Returns a Boolean value; when true, indicates that a confidence level has been set.
ScaleParameter_A For ALTA models, returns the scale parameter at the use stress level. Double. Returns 0 if the model is not an ALTA model.
SetModel Sets the model type, category, name and parameters of an associated cModel object.
SetUseStress For ALTA models only. Specifies the use stress level(s) to use for calculations.
Time Returns the time at which a specified reliability will be achieved. Double
Unreliability Returns the probability of failure at the specified time. Double


Properties

Name Description
Category Gets a value from the ModelCategoryEnum enumeration, which specifies the model's category. Default value = 1 (reliability model).
ConfBoundsMethod Gets a value from the ConfBoundsMethods enumeration, which specifies the method (e.g., Fisher Matrix, likelihood ratio. etc.) used for estimating the confidence bounds. Default value = 10 (no bounds).
ConfLevel Gets the confidence level that is currently used for calculations. Double
Designation Gets a string representing the model type (e.g., distribution, constant or dynamic). String
ErrorHappened Indicates whether the last calculation produced an error. (Read-only) Boolean
ID Gets the numeric ID of the model. Long
ItemApplication Gets or sets the item's application. (Synthesis identifier) String
ItemCategoryID Gets or sets the category ID. (Synthesis identifier) Integer
ItemComments Gets or sets the comments. (Synthesis identifier) String
ItemDescription Gets or sets the description. (Synthesis identifier) String
ItemKeywords Gets or sets the keywords. (Synthesis identifier) String
ItemPartNumber Gets or sets the part number. (Synthesis identifier) String
ItemSupplier Gets or sets the supplier name. (Synthesis identifier) String
ItemVersion Gets or sets the version number. (Synthesis identifier) String
Name Gets or sets the name of the model. String
NumStresses Applies to ALTA models only. Gets the number of stresses in the model. Integer
ProjectID Gets the numeric ID of the project the model belongs to. Integer
Type Gets a value from the ModelTypeEnum enumeration, which specifies the model type (e.g., distribution, constant or dynamic). Default value = 101 (2-parameter Weibull).
UnitID Gets or sets the numeric ID of the model's unit of measurement. Integer



See Also