% This function is part of the NMSM Pipeline, see file for full license.
%
% This function takes a properly formatted XML file and runs the
% TrackingOptimization module and saves the results correctly for
% use in the OpenSim GUI.
%
% (string) -> (None)
% Run TrackingOptimization from settings file
function TrackingOptimizationTool(settingsFileName)
settingsTree = xml2struct(settingsFileName);
verifyVersion(settingsTree, "TrackingOptimizationTool");
[inputs, params] = parseTrackingOptimizationSettingsTree(settingsTree);
[outputs, inputs] = TrackingOptimization(inputs, params);
reportTreatmentOptimizationResults(outputs, inputs);
saveTrackingOptimizationResults(outputs, inputs);
end