ParamBoundsValues Class: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
Line 11: Line 11:
   Dim MyRepository As New Repository
   Dim MyRepository As New Repository
    
    
  {{APIComment|'Connect to the Synthesis repository.}}
  {{APIComment|'Connect to a Synthesis repository.}}
   Dim Success As Boolean = False
   Dim Success As Boolean = False
   Success = MyRepository.ConnectToRepository("C:\Users\Name\Documents\ReliaSoft\Files\repository.rsr9")
   Success = MyRepository.ConnectToRepository("C:\Users\Name\Documents\ReliaSoft\Files\repository.rsr9")
    
    
  {{APIComment|'Get a list of the names/IDs of projects in the connected repository.}}
  {{APIComment|'Get a list of the names/IDs of projects in the connected repository.}}
  Dim ListOfProjects() As NameIdPair
  ListOfProjects = MyRepository.GetAllProjects
 
{{APIComment|'Open the first project in the list.}}
  MyRepository.SetCurrentProject(ListOfProjects(0).ID)
 
{{APIComment|'Get a list of the names/IDs of models in the current project.}}
   Dim ListOfModels() As NameIdPair
   Dim ListOfModels() As NameIdPair
   ListOfModels = MyRepository.GetAllModelsInfo()
   ListOfModels = MyRepository.GetAllModelsInfo()
 
 
  {{APIComment|'Use the ID of the first model in the list to retrieve it.}}
  {{APIComment|'Use the ID of the first model in the list to retrieve it.}}
   Dim AModel as cModel
   Dim AModel as cModel
   AModel = MyRepository.GetModel(ListOfModels(0).ID)
   AModel = MyRepository.GetModel(ListOfModels(0).ID)
    
    
  {{APIComment|'Get the list of parameter bounds.}}
{{APIComment|'Set the confidence level settings. See [[cModel.SetConfidenceLevel|SetConfidenceLevel]].}}
  Dim SuccessSetConfLevel As Boolean
  Dim SetsError As String
  SuccessSetConfLevel = newModel.SetCofindenceLevel(.9, [[ConfBoundsSides]].TwoSidedBoth, False, SetsError)
 
  {{APIComment|'Get the list of bounds on the model's parameters.}}
   Dim ListOfBounds as List(Of ParamBoundsValues)
   Dim ListOfBounds as List(Of ParamBoundsValues)
   ListOfBounds = AModel.Bounds_Parameters()
   ListOfBounds = AModel.Bounds_Parameters()

Revision as of 00:04, 18 April 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

 '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()
 'Use the ID of the first model in the list to retrieve it. 
 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.SetCofindenceLevel(.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