Simulation
BlockOpt.Simulation — TypeSimulation
A simulation composes the observed trace and the backend solve of Algorithm 7.1. A simulation instance is returned from an optimize call.
Subroutines of optimize!
When calling optimize(model, driver) the fallback is optimize!(s) where simulation s is internally constructed. The responsibility of s is to orchestrate the iteration defined in its backend and make observations to generate the trace.
The backend defines subroutines for s's memory manipulations for each step in its iteration. Since then backend delegates its behavior to s, we dispatch the backends' subroutines to s while adding additional execution steps to generate the simulations trace.
BlockOpt.initialize — Methodinitialize(s::Simulation)Performs each step up to the preliminary update to obtain $H₀$. Lines 1-6 of Algorithm 7.1.
BlockOpt.terminal — Methodterminal(s::Simulation)True if the state of s is terminal.
BlockOpt.build_trs — Methodbuild_trs(s::Simulation)Build arguments for the trs_small call to TRS.jl.
BlockOpt.solve_trs — Methodsolve_trs(s::Simulation)Solve $aₖ$ in Equation (5.5).
BlockOpt.build_trial — Methodbuild_trial(s::Simulation)Build trial iterate, evaluate the objective at the trial location, and compute $ρ$.
BlockOpt.accept_trial — Methodaccept_trial(s::Simulation)Observe the value of $ρ$, accept positive values, and then update $xₖ, fₖ$.
BlockOpt.secantQN — MethodsecantQN(s::Simulation)Performs the standard secant update for s's inverse Hessian approximation $Hₖ$.
The QN formula used is given by the Driver of s.
BlockOpt.update_Sₖ — Methodupdate_Sₖ(s::Simulation)Updates the $2w-1$ sample directions of simulation s.
See: S_update_a, S_update_b, S_update_c, S_update_d, S_update_e, S_update_f.
BlockOpt.gHS — MethodgHS(s::Simulation)See Algorithm $3.1$
BlockOpt.blockQN — MethodblockQN(s::Simulation)Performs a block update for s's inverse Hessian approximation $Hₖ$.
The QN formula used is given by the Driver of s.
Interface
Methods dispatch on a terminal simulation returned from an optimize call.
BlockOpt.trs_timer — Methodtrs_timer(s::Simulation)The elapsed time simulation s has been in trs_solve(s).
BlockOpt.trs_counter — Methodtrs_counter(s::Simulation)The count of trust-region subproblem solves for simulation s.
BlockOpt.ghs_timer — Methodghs_timer(s::Simulation)The elapsed time simulation s has been in gHS(s).
BlockOpt.ghs_counter — Methodghs_counter(s::Simulation)The count of gHS evaluations for simulation s.
BlockOpt.f_vals — Methodf_vals(s::Simulation)A vector holding objective values $f(xₖ)$ for each successful iterate $xₖ$ of simulation s.
BlockOpt.∇f_norms — Method∇f_norms(s::Simulation)A vector holding normed gradient values $||∇f(xₖ)||₂$ for each successful iterate $xₖ$ of simulation s.
BlockOpt.p_norms — Methodp_norms(s::Simulation)A vector holding distance $||pₖ||₂` of each successful step$pₖ`of simulations`.
BlockOpt.Δ_vals — MethodΔ_vals(s::Simulation)A vector holding the trust-region radius passed to trs_small in TRS.jl during each successful step of simulation s.
BlockOpt.ρ_vals — Methodρ_vals(s::Simulation)A vector storing the ratio of actual reduction to model reduction of each successful step of simulation s.
Recipes
To use the listed recipes you must have (Plots.jl)[http://docs.juliaplots.org/latest/] in your current namespace, i.e. loaded from calling using Plots. This assumes the Plots package has already been installed through Pkg.jl.
BlockOpt.objtrace — FunctionobjtraceProvide any number of terminal simulations as arguments and objtrace displays a plot of each arguments' objective function values at each succussful iterate.
To add a simulation to the current objtrace plot use objtrace!.
BlockOpt.gradtrace — FunctiongradtraceProvide any number of terminal simulations as arguments and gradtrace displays a plot of each arguments' normed gradient values at each succussful iterate.
To add a simulation to the current gradtrace plot use gradtrace!.
BlockOpt.radiustrace — FunctionradiustraceProvide any number of terminal simulations as arguments and radiustrace displays a plot of each arguments' trust region subproblem radius values at each succussful iteration.
To add a simulation to the current radiustrace plot use radiustrace!.
BlockOpt.steptrace — FunctionsteptraceProvide any number of terminal simulations as arguments and steptrace displays a plot of each arguments' step measure at each succussful iteration.
To add a simulation to the current steptrace plot use steptrace!.
BlockOpt.rhotrace — FunctionrhotraceProvide any number of terminal simulations as arguments and rhotrace displays a plot of each arguments' ρ ratio at each successful iteration.
To add a simulation to the current rhotrace plot use rhotrace!.