Skip to main content

computeTrackingOptimizationContinuousFunction.m


% This function is part of the NMSM Pipeline, see file for full license.
%
% This function computes the dynamic constraints, path constraints (if any)
% and cost function terms (if any) for tracking optimization.
%
% (struct) -> (struct)
%


function modeledValues = computeTrackingOptimizationContinuousFunction(inputs)
values = getTrackingOptimizationValueStruct(inputs.phase, inputs.auxdata);
modeledValues = calcTorqueBasedModeledValues(values, inputs.auxdata);
modeledValues = calcSynergyBasedModeledValues(values, inputs.auxdata, modeledValues);
modeledValues.dynamics = calcTrackingOptimizationDynamicsConstraint(values, inputs.auxdata);
path = calcTrackingOptimizationPathConstraint(values, modeledValues, inputs.auxdata);
if ~isempty(path)
modeledValues.path = path;
end
modeledValues.integrand = calcTrackingOptimizationIntegrand(values, modeledValues, inputs.auxdata);
end