ParamBoundsValues Class: Difference between revisions

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


== Usage Example ==
== Usage Example ==
In this usage example, the API is used to connect to a repository, retrieve one of the models in it and then get the lower bound on a parameter in that model (i.e., the lowest value that the model will accept).
  {{APIComment|'Declare a new repository connection class.}}
  {{APIComment|'Declare a new repository connection class.}}
   Dim MyRepository As New Repository
   Dim MyRepository As New Repository
Line 33: Line 34:
   Dim SuccessSetConfLevel As Boolean
   Dim SuccessSetConfLevel As Boolean
   Dim SetsError As String
   Dim SetsError As String
   SuccessSetConfLevel = newModel.SetCofindenceLevel(.9, ConfBoundsSides.TwoSidedBoth, False, SetsError)
   SuccessSetConfLevel = newModel.SetCofidenceLevel(.9, ConfBoundsSides.TwoSidedBoth, False, SetsError)
    
    
  {{APIComment|'Get the list of bounds on the model's parameters.}}
  {{APIComment|'Get the list of bounds on the model's parameters.}}

Revision as of 23:04, 2 May 2014


Stores the confidence bounds on the model parameters. Use the SetConfidenceLevel method to specify the confidence bound settings.

Properties

  • Upper (as double) Gets the upper bound.
  • Lower (as double) Gets the lower bound.
  • ParamName (as string) Gets the parameter name.

Usage Example

In this usage example, the API is used to connect to a repository, retrieve one of the models in it and then get the lower bound on a parameter in that model (i.e., the lowest value that the model will accept).

 'Declare a new repository connection class. 
 Dim MyRepository As New Repository
 
 'Connect to a Synthesis repository. 
 Dim Success As Boolean = False
 Success = MyRepository.ConnectToRepository("C:\Users\Name\Documents\ReliaSoft\Files\repository.rsr9")
 
 'Get a list of the names/IDs of projects in the connected repository. 
 Dim ListOfProjects() As NameIdPair
 ListOfProjects = MyRepository.GetAllProjects 
 
 'Open the first project in the list. 
 MyRepository.SetCurrentProject(ListOfProjects(0).ID)
 
 'Get a list of the names/IDs of models in the current project. 
 Dim ListOfModels() As NameIdPair
 ListOfModels = MyRepository.GetAllModelsInfo()
 
 'Retrieve the first model in the list. 
 Dim AModel as cModel
 AModel = MyRepository.GetModel(ListOfModels(0).ID)
 
 'Set the confidence level settings. See SetConfidenceLevel. 
 Dim SuccessSetConfLevel As Boolean
 Dim SetsError As String
 SuccessSetConfLevel = newModel.SetCofidenceLevel(.9, ConfBoundsSides.TwoSidedBoth, False, SetsError)
  
 'Get the list of bounds on the model's parameters. 
 Dim ListOfBounds as List(Of ParamBoundsValues)
 ListOfBounds = AModel.Bounds_Parameters()
 
 'Get the lower bound on the first parameter. 
 Dim LowerBoundValue as Double
 LowerBoundValue = ListOfBounds(0).Lower