I want to define an OptimizationProblem
using Optimization.jl and FiniteDiff:
optf = OptimizationFunction(f_zero, AutoFiniteDiff())
prob = OptimizationProblem(optf, [stretched_tether_length - 0.05, 0.0, 0.0, 0.0];
lb = [stretched_tether_length - 0.1, -1.0, -1.0, -0.3],
ub = [stretched_tether_length, 1.0, 1.0, 0.3]
)
But I suspect that the stepsize of AutoFiniteDiff
is too small to give reliable gradients, because f_zero
is noisy. How can I change the stepsize of FiniteDiff
through this interface? I know that FiniteDiff.jl has a relstep
and absstep
parameter in their API, but how can I access this?
https://docs.sciml.ai/FiniteDiff/stable/api/