BoundsValues Class: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 7: Line 7:


== Usage Example ==
== Usage Example ==
{{APIComment|Declare a new repository connection class.}}
{{APIComment|'Initialize a new cModel object (life distribution with specified parameters). See [[cModel Class]].}}
        Private WithEvents MyRepository As New Repository
  Dim newModel As New cModel(ModelTypeEnum.Weibull2, ModelCategoryEnum.Reliability, "NewModel1", 1, 100)
 
 
{{APIComment|Connect to the Synthesis repository.}}
{{APIComment|'Specify that the 90% two-sided confidence bounds will be calculated. See [[cModel.SetConfidenceLevel]].}}
        Dim Success As Boolean = False
  Dim SuccessSetConfLevel As Boolean
        Success = MyRepository.ConnectToRepository("RepositoryFileNamePath")
  Dim SetsError As String
 
  SuccessSetConfLevel = newModel.SetConfindenceLevel(.9, [[ConfBoundsSides]].TwoSidedBoth, False, SetsError)
{{APIComment|Get the list of Projects in the connected repository.}}
 
        Dim ListOfModels() As [[NameIdPair Class|NameIdPair]]
{{APIComment|Get an object containing the bounds on reliability at time = 100.}}
        ListOfModels = MyRepository.GetAllModelsInfo()
  Dim ModelBoundsValue as BoundsValues
 
  ModelBoundsValue = AModel.Bounds_Reliability(100)
{{APIComment|Select the ID of the model and retrieve it.}}
 
        Dim AModel as cModel
{{APIComment|'Save the upper and lower bounds.}}
        AModel = MyRepository.GetModel(ListOfModels(0).ID)
  Dim UpperBoundValue as Double
 
  Dim LowerBoundValue as Double
{{APIComment|Get the Bounds on reliability.}}
  UpperBoundValue = ModelBoundsValue.Upper
        Dim ModelBoundsValue as BoundsValues
  LowerBoundValue = ModelBoundsValue.Lower
        ModelBoundsValue = AModel.Bounds_Reliability(100)
 
{{APIComment|Get the Upper Bound result.}}
        Dim UpperBoundValue as Double
        UpperBoundValue = ModelBoundsValue.Upper

Revision as of 23:21, 11 April 2014


Stores the upper and lower confidence bounds estimated from a cModel object.

Properties

  • Upper (as double) Gets the upper value.
  • Lower (as double) Gets the lower value.

Usage Example

 'Initialize a new cModel object (life distribution with specified parameters). See cModel Class. 
 Dim newModel As New cModel(ModelTypeEnum.Weibull2, ModelCategoryEnum.Reliability, "NewModel1", 1, 100)
 
 'Specify that the 90% two-sided confidence bounds will be calculated. See cModel.SetConfidenceLevel. 
 Dim SuccessSetConfLevel As Boolean
 Dim SetsError As String
 SuccessSetConfLevel = newModel.SetConfindenceLevel(.9, ConfBoundsSides.TwoSidedBoth, False, SetsError)
 
 Get an object containing the bounds on reliability at time = 100. 
 Dim ModelBoundsValue as BoundsValues
 ModelBoundsValue = AModel.Bounds_Reliability(100)
 
 'Save the upper and lower bounds. 
 Dim UpperBoundValue as Double
 Dim LowerBoundValue as Double
 UpperBoundValue = ModelBoundsValue.Upper
 LowerBoundValue = ModelBoundsValue.Lower