Skip to main content

computeTrackingOptimizationEndpointFunction.m


% This function is part of the NMSM Pipeline, see file for full license.
%
% This function computes the terminal constraint (if any) and total cost
% function objective for tracking optimization.
%
% (struct) -> (struct)


function output = computeTrackingOptimizationEndpointFunction(inputs)
if ~isempty(inputs.auxdata.terminal)
event = calcTrackingOptimizationTerminalConstraint( ...
inputs, inputs.auxdata);
if ~isempty(event)
output.eventgroup.event = event;
end
end
output.objective = calcTrackingOptimizationObjective(inputs.phase.integral);
end