CModel Class: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 60: Line 60:
*NumStresses (as ''integer'') {{APIComment|Gets the number of stresses in the model.}}
*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.}}
==  ==
'*' Requires Synthesis API Version 10 or greater.


== Usage Example ==
== Usage Example ==
Line 84: Line 81:
   Dim Rel as Double
   Dim Rel as Double
   Rel = WDSFittedModel.Reliability(50)
   Rel = WDSFittedModel.Reliability(50)
==  ==
** Requires Synthesis API Version 10 or greater.

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

    • Requires Synthesis API Version 10 or greater.