15template <Config Conf = DefaultConfig>
24 std::chrono::nanoseconds
max_time = std::chrono::minutes(5);
58 real_t(1
e2) * std::numeric_limits<real_t>::epsilon();
60 real_t(1
e2) * std::numeric_limits<real_t>::epsilon();
65template <Config Conf = DefaultConfig>
97template <Config Conf = DefaultConfig>
131template <Config Conf>
159 if (problem.get_m() != 0)
160 throw std::invalid_argument(
"Missing arguments y, Σ, e");
161 mvec y{
nullptr, 0}, Σ{
nullptr, 0}, e{
nullptr, 0};
187 std::ostream *
os = &std::cout;
190template <Config Conf>
195 std::chrono::nanoseconds elapsed_time{};
197 std::chrono::nanoseconds time_prox{};
199 std::chrono::nanoseconds time_forward{};
201 std::chrono::nanoseconds time_backward{};
203 std::chrono::nanoseconds time_jacobians{};
205 std::chrono::nanoseconds time_hessians{};
207 std::chrono::nanoseconds time_indices{};
209 std::chrono::nanoseconds time_lqr_factor{};
211 std::chrono::nanoseconds time_lqr_solve{};
213 std::chrono::nanoseconds time_lbfgs_indices{};
215 std::chrono::nanoseconds time_lbfgs_apply{};
217 std::chrono::nanoseconds time_lbfgs_update{};
219 std::chrono::nanoseconds time_progress_callback{};
221 unsigned iterations = 0;
223 unsigned linesearch_failures = 0;
225 unsigned linesearch_backtracks = 0;
227 unsigned stepsize_backtracks = 0;
229 unsigned lbfgs_failures = 0;
232 unsigned lbfgs_rejected = 0;
235 unsigned τ_1_accepted = 0;
238 unsigned count_τ = 0;
253template <Config Conf>
std::string get_name() const
std::function< void(const ProgressInfo &)> progress_cb
InnerSolveOptions< config_t > SolveOptions
Stats operator()(const P &problem, const SolveOptions &opts, rvec u, rvec y, crvec μ, rvec e)
AtomicStopSignal stop_signal
PANOCOCPSolver(const Params ¶ms)
alpaqa::TypeErasedControlProblem< config_t > Problem
const Params & get_params() const
Stats operator()(const Problem &problem, const SolveOptions &opts, rvec u, rvec y, crvec μ, rvec err_z)
Stats operator()(const P &problem, const SolveOptions &opts, rvec u)
PANOCOCPStats< config_t > Stats
PANOCOCPSolver & set_progress_callback(std::function< void(const ProgressInfo &)> cb)
Specify a callable that is invoked with some intermediate results on each iteration of the algorithm.
Nonlinear optimal control problem with finite horizon .
#define USING_ALPAQA_CONFIG(Conf)
#define ALPAQA_IF_QUADF(...)
#define ALPAQA_IF_LONGD(...)
#define ALPAQA_IF_FLOAT(...)
#define ALPAQA_EXPORT_EXTERN_TEMPLATE(...)
unsigned stepsize_backtracks
std::chrono::nanoseconds time_jacobians
@ ApproxKKT
Find an ε-approximate KKT point in the ∞-norm:
real_t linesearch_tolerance_factor
LipschitzEstimateParams< config_t > Lipschitz
Parameters related to the Lipschitz constant estimate and step size.
std::chrono::nanoseconds time_hessians
std::chrono::nanoseconds time_lbfgs_apply
bool disable_acceleration
InnerStatsAccumulator< PANOCOCPStats< Conf > > & operator+=(InnerStatsAccumulator< PANOCOCPStats< Conf > > &acc, const PANOCOCPStats< Conf > &s)
unsigned max_no_progress
Maximum number of iterations without any progress before giving up.
bool reset_lbfgs_on_gn_step
real_t L_max
Maximum Lipschitz constant estimate.
std::chrono::nanoseconds time_lbfgs_indices
SolverStatus
Exit status of a numerical solver such as ALM or PANOC.
std::chrono::nanoseconds time_progress_callback
std::chrono::nanoseconds time_indices
std::chrono::nanoseconds elapsed_time
std::chrono::nanoseconds time_backward
typename Conf::real_t real_t
std::chrono::nanoseconds time_lqr_factor
unsigned linesearch_backtracks
real_t min_linesearch_coefficient
Minimum weight factor between Newton step and projected gradient step, line search parameter.
std::chrono::nanoseconds max_time
Maximum duration.
typename Conf::length_t length_t
real_t quadratic_upperbound_tolerance_factor
real_t linesearch_strictness_factor
Parameter β used in the line search (see Algorithm 2 in ).
typename Conf::crvec crvec
std::chrono::nanoseconds time_prox
std::chrono::nanoseconds time_forward
unsigned linesearch_failures
unsigned print_interval
When to print progress.
unsigned L_max_inc
Maximum number of times to double the Lipschitz constant estimate per iteration.
LBFGSParams< config_t > lbfgs_params
L-BFGS parameters (e.g. memory).
int print_precision
The precision of the floating point values printed by the solver.
real_t L_min
Minimum Lipschitz constant estimate.
std::chrono::nanoseconds time_lbfgs_update
unsigned gn_interval
How often to use a Gauss-Newton step. Zero to disable GN entirely.
unsigned max_iter
Maximum number of inner PANOC iterations.
PANOCStopCrit stop_crit
What stopping criterion to use.
std::chrono::nanoseconds time_lqr_solve
Parameters for the LBFGS class.
Tuning parameters for the PANOC algorithm.
const TypeErasedControlProblem< config_t > * problem
const PANOCOCPParams< config_t > * params