Skip to main content

getTrackingOptimizationValueStruct.m


% This function is part of the NMSM Pipeline, see file for full license.
%
% This function parses and scales the design variables specific to
% Tracking Optimization. If the model is synergy driven, synergy weights
% are properly calculated if they are fixed or being optimized.
%
% (struct, struct) -> (struct)
% Design variables specific to Tracking Optimization are parsed and scaled


function values = getTrackingOptimizationValueStruct(inputs, params)
values = getTreatmentOptimizationValueStruct(inputs, params);
if strcmp(params.controllerType, 'synergy_driven')
if params.optimizeSynergyVectors
synergyWeights = scaleToOriginal(inputs.parameter(1,:), ...
params.maxParameter, params.minParameter);
values.synergyWeights = getSynergyWeightsFromGroups(...
synergyWeights, params);
else
values.synergyWeights = getSynergyWeightsFromGroups(...
params.synergyWeightsGuess, params);
end
end
end