function  convertSldvDataToTimeSeries(obj, simData)
%

%   Copyright 2011 The MathWorks, Inc.

    if nargin < 2
        simData = [];
    end
    
    if ~isempty(simData)
        % in incremental mode, we DO NOT retail the
        % testcases/counterexamples alreday present in obj.sldvData
        % thus, obj.TcIdx is 1, as there is only one testcase/example in
        % obj.sldvData
        obj.TcIdx = 1;
        if strcmp(obj.SldvData.AnalysisInformation.Options.Mode, 'TestGeneration')
            obj.SldvData.TestCases = simData;
        else
            obj.SldvData.CounterExamples = simData;
        end
    end
    
    % The last argument ensures that cached bus information is retained.  It will be cleared in resetSessionData() method 
    sldvDataSLDataSet = Sldv.DataUtils.convertTestCasesToSLDataSet(obj.SldvData, true, false, false);
    
    obj.SldvData = sldvDataSLDataSet;
    obj.SimDataTimeSeries = Sldv.DataUtils.getSimData(obj.SldvData);
        
end