Quintiq file version 2.0 
 | 
#parent: #root 
 | 
StaticMethod GetRunControllerDataset () const as stream[LibOpt_OptimizerRunController] 
 | 
{ 
 | 
  Description: 
 | 
  [* 
 | 
    This static method returns the `LibOpt_OptimizerRunController` object. 
 | 
    If the number of loaded `LibOpt_OptimizerRunController` datasets is not exactly 1, then an error is thrown. This error is handled by `LibOpt_OptimizerRunController::HandleExceptionRunController`. 
 | 
  *] 
 | 
  TextBody: 
 | 
  [* 
 | 
    // evr3 Apr-29-2022 (created) 
 | 
     
 | 
    // DatasetController::FindUnique throws and error if there is more than 1 loaded `LibOpt_OptimizerRunController`.  
 | 
    // We use this reactive code block to ensure that the error can be handled by HandleExceptionRunController.  
 | 
    key := void->() 
 | 
    { 
 | 
      options := DatasetFindOptions::Construct().Kind( typeof( LibOpt_OptimizerRunController ).Name() ); 
 | 
      key := DatasetController::FindUnique( options ); 
 | 
      return key; 
 | 
    } 
 | 
     
 | 
    // If no LibOpt_OptimizerRunController dataset is loaded, then 'key' is equal to [0.0.0]. 
 | 
    // This results in an error when calling MDSLibOpt_OptimizerRunController::Root(). This error is also handled by HandleExceptionRunController. 
 | 
    datasetstream := key -> MDSLibOpt_OptimizerRunController::Root(); 
 | 
     
 | 
    return datasetstream; 
 | 
  *] 
 | 
  InterfaceProperties { Accessibility: 'Module' } 
 | 
} 
 |