function results = getAllResultsUsingModelSource(~, modelName)
%

%   Copyright 2017-2018 The MathWorks, Inc.

    results = [];
    allDatasets = fxptds.getAllDatasetsForModel(modelName);
    for cnt = 1 : numel(allDatasets)
      dataset = allDatasets{cnt}; 
      runNames = dataset.getAllRunNames;
      for idx = 1:numel(runNames)
          dsRun = dataset.getRun(runNames{idx});
          dsRun.deleteInvalidResults;
          % For each dataset, access run object and get results
          curResults = dsRun.getResults;
          results = [results curResults]; %#ok<*AGROW>
      end
    end
end
