Static Line Search

Static line search is the simplest form of line search in which the guess for $\alpha$ is always just a fixed value. In the following we demonstrate how to use this line search.

Example

We show how to use linesearches in SimpleSolvers to solve a simple toy problem:

x = [1., 0., 0.]
f = x -> sum(x .^ 3 / 6 + x .^ 2 / 2)
obj = MultivariateObjective(f, x)

α = .1
sl = Static(α)

SimpleSolvers contains a function SimpleSolvers.linesearch_objective that allocates a SimpleSolvers.TemporaryUnivariateObjective that only depends on $\alpha$:

cache = NewtonOptimizerCache(x)

update!(cache, x)
x₂ = [.9, 0., 0.]
update!(cache, x₂)
value!(obj, x₂)
gradient!(obj, x₂)
ls_obj = linesearch_objective(obj, cache)

We now use this to compute a static line search[1]:

ls = LinesearchState(sl)
ls(ls_obj, α)
0.1
Info

We note that for the static line search we always just return $\alpha$.