CModel Class: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
{{DISPLAYTITLE:cModel Class}}
{{DISPLAYTITLE:cModel Class}} {{Template:APIClass|Resource Classes|Resource Classes}}  
{{Template:APIClass|Resource Classes|Resource Classes}}  


{{Template:CModel_Class.Cmt}}
{{Template:CModel_Class.Cmt}}  


{{Template:ResourceLinkToRepositoryClass.Cmt}}
{{Template:ResourceLinkToRepositoryClass.Cmt}}  


== Constructors ==
== Constructors ==


*[[cModel_Constructors|cModel]] {{APIComment|Creates an empty model. SetModel method must be called to set the model name, type, category and parameters.}}
*[[CModel Constructors|cModel]] {{APIComment|Creates an empty model. SetModel method must be called to set the model name, type, category and parameters.}}  
*[[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 ==


'''Set/Return Model Properties'''
'''Set/Return Model Properties'''  
*[[cModel.SetModel|SetModel( ModelTypeEnum, ModelCategoryEnum, Double() )]] {{APIComment|{{Template:CModel.SetModel.Cmt}}}}
*[[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.}}


'''Set/Return Item Properties'''
*[[CModel.SetModel|SetModel( ModelTypeEnum, ModelCategoryEnum, Double() )]] {{APIComment|{{Template:CModel.SetModel.Cmt}}}}  
*[[cModel.ItemCategoryID|ItemCategoryID(Integer)]] {{APIComment|{{Template:ItemCategoryID.Cmt}}}} [[#Notes|*]]
*[[CModel.Parameters|Parameters]] {{APIComment|{{Template:CModel.Parameters.Cmt}}}}  
*[[cModel.ItemPartNumber|ItemPartNumber(String)]] {{APIComment|{{Template:ItemPartNumber.Cmt}}}}
*[[CModel.ScaleParameter A|ScaleParameter_A]] {{APIComment|Returns the scale parameter for ALTA models. Returns 0 if the model is not an ALTA model.}}
*[[cModel.ItemVersion|ItemVersion(String)]] {{APIComment|{{Template:ItemVersion.Cmt}}}}
*[[cModel.ItemSupplier|ItemSupplier(String)]] {{APIComment|{{Template:ItemSupplier.Cmt}}}}
*[[cModel.ItemApplication|ItemApplication(String)]] {{APIComment|{{Template:ItemApplication.Cmt}}}}
*[[cModel.ItemDescription|ItemDescription(String)]] {{APIComment|{{Template:ItemDescription.Cmt}}}}
*[[cModel.ItemComments|ItemComments(String)]] {{APIComment|{{Template:ItemComments.Cmt}}}}
*[[cModel.ItemKeywords|ItemKeywords(String)]] {{APIComment|{{Template:ItemKeywords.Cmt}}}}


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


'''Standard Calculations'''
*[[CModel.ItemCategoryID|ItemCategoryID(Integer)]] {{APIComment|{{Template:ItemCategoryID.Cmt}}}} [[#Notes|*]]
*[[CModel.Reliability|Reliability( Double, [Double], [Double] )]] {{APIComment|{{Template:CModel.Reliability.Cmt}}}}
*[[CModel.ItemPartNumber|ItemPartNumber(String)]] {{APIComment|{{Template:ItemPartNumber.Cmt}}}}
*[[CModel.Unreliability|Unreliability( Double, [Double], [Double] )]] {{APIComment|{{Template:CModel.Unreliability.Cmt}}}}
*[[CModel.ItemVersion|ItemVersion(String)]] {{APIComment|{{Template:ItemVersion.Cmt}}}}
*[[CModel.Time|Time( Double [Double], [Double] )]] {{APIComment|{{Template:CModel.Time.Cmt}}}}
*[[CModel.ItemSupplier|ItemSupplier(String)]] {{APIComment|{{Template:ItemSupplier.Cmt}}}}
*[[CModel.MeanTime|MeanTime( [Double], [Double] )]] {{APIComment|{{Template:CModel.MeanTime.Cmt}}}}
*[[CModel.ItemApplication|ItemApplication(String)]] {{APIComment|{{Template:ItemApplication.Cmt}}}}
*[[CModel.Pdf|Pdf( Double [Double], [Double] )]]   {{APIComment|{{Template:CModel.Pdf.Cmt}}}}
*[[CModel.ItemDescription|ItemDescription(String)]] {{APIComment|{{Template:ItemDescription.Cmt}}}}
*[[CModel.ItemComments|ItemComments(String)]] {{APIComment|{{Template:ItemComments.Cmt}}}}
*[[CModel.ItemKeywords|ItemKeywords(String)]] {{APIComment|{{Template:ItemKeywords.Cmt}}}}
 
'''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'''  
 
*[[CModel.Reliability|Reliability( Double, [Double], [Double] )]] {{APIComment|{{Template:CModel.Reliability.Cmt}}}}  
*[[CModel.Unreliability|Unreliability( Double, [Double], [Double] )]] {{APIComment|{{Template:CModel.Unreliability.Cmt}}}}  
*[[CModel.Time|Time( Double [Double], [Double] )]] {{APIComment|{{Template:CModel.Time.Cmt}}}}  
*[[CModel.MeanTime|MeanTime( [Double], [Double] )]] {{APIComment|{{Template:CModel.MeanTime.Cmt}}}}  
*[[CModel.Pdf|Pdf( Double [Double], [Double] )]] {{APIComment|{{Template:CModel.Pdf.Cmt}}}}  
*[[CModel.FailureRate|FailureRate( Double [Double], [Double] )]] {{APIComment|{{Template:CModel.FailureRate.Cmt}}}}
*[[CModel.FailureRate|FailureRate( Double [Double], [Double] )]] {{APIComment|{{Template:CModel.FailureRate.Cmt}}}}


'''Confidence Bound Calculations'''
'''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.SetConfidenceLevel|SetConfidenceLevel( Double, ConfBoundsSides, Boolean, String )]] {{APIComment|{{CModel.SetConfidenceLevel.Cmt}}}}  
*[[CModel.Bounds_Unreliability|Bounds_Unreliability( Double, [Double], [Double] )]] {{APIComment|{{Template:CModel.Bounds Unreliability.Cmt}}}}
*[[CModel.Bounds Reliability|Bounds_Reliability( Double, [Double], [Double] )]] {{APIComment|{{CModel.Bounds Reliability.Cmt}}}}  
*[[CModel.Bounds Time|Bounds_Time( Double, [Double], [Double] )]]         {{APIComment|{{Template:CModel.Bounds Time.Cmt}}}}
*[[CModel.Bounds Unreliability|Bounds_Unreliability( Double, [Double], [Double] )]] {{APIComment|{{Template:CModel.Bounds Unreliability.Cmt}}}}  
*[[CModel.Bounds MeanTime|Bounds_MeanTime( [Double], [Double] )]] {{APIComment|{{Template:CModel.Bounds MeanTime.Cmt}}}}
*[[CModel.Bounds Time|Bounds_Time( Double, [Double], [Double] )]] {{APIComment|{{Template:CModel.Bounds Time.Cmt}}}}  
*[[CModel.Bounds FailureRate|Bounds_FailureRate( Double, [Double], [Double] )]] {{APIComment|{{Template:CModel.Bounds FailureRate.Cmt}} }}
*[[CModel.Bounds MeanTime|Bounds_MeanTime( [Double], [Double] )]] {{APIComment|{{Template:CModel.Bounds MeanTime.Cmt}}}}  
*[[CModel.Bounds_Parameters|Bounds_Parameters]]   {{APIComment|{{Template:CModel.Bounds Parameters.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  ==
== Properties  ==
*Name (as ''string'') {{APIComment|Gets or sets the name of the model.}}
 
*ID (as ''string''){{APIComment|Gets the numerical ID of the model.}}
*Name (as ''string'') {{APIComment|Gets or sets the name of the model.}}  
*ProjectID (as ''integer'') {{APIComment|Gets the numerical ID of the project the model belongs to.}}
*ID (as ''string''){{APIComment|Gets the numerical ID of the model.}}  
*Type (as ''[[ModelTypeEnum Enumeration|ModelTypeEnum]]'') {{APIComment|Gets the model type (e.g., 2-parameter Weibull).}}
*ProjectID (as ''integer'') {{APIComment|Gets the numerical ID of the project the model belongs to.}}  
*Category (as ''[[ModelCategoryEnum Enumeration|ModelCategoryEnum]]'') {{APIComment|Gets the model category (e.g., reliability).}}
*Type (as ''[[ModelTypeEnum Enumeration|ModelTypeEnum]]'') {{APIComment|Gets the model type (e.g., 2-parameter Weibull).}}  
*Designation (as ''string'') {{APIComment|Gets a string representing the model type (for example "2P-Weibull").}}
*Category (as ''[[ModelCategoryEnum Enumeration|ModelCategoryEnum]]'') {{APIComment|Gets the model category (e.g., reliability).}}  
*ErrorHappened (as ''boolean'') {{APIComment|Whether or not the last calculation produced an error.}}
*Designation (as ''string'') {{APIComment|Gets a string representing the model type (for example "2P-Weibull").}}  
*ConfLevel (as ''double'') {{APIComment|Gets the confidence level that is currently used for calculations.}}
*ErrorHappened (as ''boolean'') {{APIComment|Whether or not the last calculation produced an error.}}  
*NumStresses (as ''integer'') {{APIComment|Gets the number of stresses in the model.}}
*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.}}  
*UnitID (as ''integer'') {{APIComment|Version 10 Only- Sets or returns the unit ID.}}
*UnitID (as ''integer'') {{APIComment|Version 10 Only- Sets or returns the unit ID.}}


== Usage Example ==
== Usage Example ==


  {{APIComment|'Declare a new WeibullDataSet object. See [[WeibullDataSet Class|WeibullDataSet]].}}
  {{APIComment|'Declare a new WeibullDataSet object. See [[WeibullDataSet Class|WeibullDataSet]].}}
  Dim WDS as New WeibullDataSet
Dim WDS as New WeibullDataSet
 
  {{APIComment|'Add failure times to the data set. See [[WeibullDataSet.AddFailure|AddFailure]].}}
  {{APIComment|'Add failure times to the data set. See [[WeibullDataSet.AddFailure|AddFailure]].}}
  WDS.AddFailure(10, 1)
WDS.AddFailure(10, 1)
  WDS.AddFailure(20, 1)
WDS.AddFailure(20, 1)
  WDS.AddFailure(30, 1)
WDS.AddFailure(30, 1)
 
  {{APIComment|'Calculate the fitted model using default settings. See [[WeibullDataSet.Calculate|Calculate]].}}  
  {{APIComment|'Calculate the fitted model using default settings. See [[WeibullDataSet.Calculate|Calculate]].}}  
  WDS.Calculate()
WDS.Calculate()
 
  {{APIComment|'Assign the fitted model to a variable.}}
  {{APIComment|'Assign the fitted model to a variable.}}
  Dim WDSFittedModel as cModel
Dim WDSFittedModel as cModel
  WDSFittedModel = WDS.FittedModel
WDSFittedModel = WDS.FittedModel
 
  {{APIComment|'Calculate the reliability at time = 50 and save the result. See [[cModel.Reliability|Reliability]].}}
  {{APIComment|'Calculate the reliability at time = 50 and save the result. See [[cModel.Reliability|Reliability]].}}
  Dim Rel as Double
Dim Rel as Double
  Rel = WDSFittedModel.Reliability(50)
Rel = WDSFittedModel.Reliability(50)
 
<a name="" id="v10orgreater"></a>


<p><a name="" id="v10orgreater"></a></p>
<span>* Requires Synthesis API Version 10 or greater.</span>  
<span>* Requires Synthesis API Version 10 or greater.</span>


== Notes ==  
== Notes{{v10orgreater}} ==
<span>* Requires Synthesis API Version 10 or greater.</span>

Revision as of 18:56, 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

Set/Return Model Properties

Set/Return Item Properties

Set the Use Stress for ALTA Calculations

Standard Calculations

Confidence Bound Calculations

Properties

  • Name (as string) Gets or sets the name of the model.
  • ID (as string) Gets the numerical ID of the model.
  • ProjectID (as integer) Gets the numerical ID of the project the model belongs to.
  • 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) Version 10 Only- Sets or returns 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)

<a name="" id="v10orgreater"></a>

* Requires Synthesis API Version 10 or greater.

Notes