The ScalarValuedFunctionModifications are what we use to build things like the the merit function or the gradient of the Lagrangian. At the moment, they sit inside the function bundle and they are initialized when we call getMin. In any case, these functions are freely accessible in C++, but not in MATLAB and Python. This makes calculating things like the gradient of the Lagrangian difficult for things like user-defined stopping conditions. Certainly, we could just add items like grad_stop to the optimization state, but we're probably better off just giving access to the raw modifications in case we need a different one.
The
ScalarValuedFunctionModifications
are what we use to build things like the the merit function or the gradient of the Lagrangian. At the moment, they sit inside the function bundle and they are initialized when we call getMin. In any case, these functions are freely accessible in C++, but not in MATLAB and Python. This makes calculating things like the gradient of the Lagrangian difficult for things like user-defined stopping conditions. Certainly, we could just add items likegrad_stop
to the optimization state, but we're probably better off just giving access to the raw modifications in case we need a different one.