alpaqa cmake-targets
Nonconvex constrained optimization
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | Private Types | Private Attributes | List of all members
PANOCOCPSolver< Conf > Class Template Reference

#include <alpaqa/inner/panoc-ocp.hpp>

Detailed Description

template<Config Conf>
class alpaqa::PANOCOCPSolver< Conf >
Examples
C++/CustomControlCppProblem/main.cpp.

Definition at line 148 of file panoc-ocp.hpp.

+ Collaboration diagram for PANOCOCPSolver< Conf >:

Public Types

using Problem = alpaqa::TypeErasedControlProblem< config_t >
 
using Params = PANOCOCPParams< config_t >
 
using Stats = PANOCOCPStats< config_t >
 
using ProgressInfo = PANOCOCPProgressInfo< config_t >
 
using SolveOptions = InnerSolveOptions< config_t >
 

Public Member Functions

 PANOCOCPSolver (const Params &params)
 
Stats operator() (const Problem &problem, const SolveOptions &opts, rvec u, rvec y, crvec μ, rvec err_z)
 
template<class P >
Stats operator() (const P &problem, const SolveOptions &opts, rvec u, rvec y, crvec μ, rvec e)
 
template<class P >
Stats operator() (const P &problem, const SolveOptions &opts, rvec u)
 
PANOCOCPSolverset_progress_callback (std::function< void(const ProgressInfo &)> cb)
 Specify a callable that is invoked with some intermediate results on each iteration of the algorithm.
 
std::string get_name () const
 
void stop ()
 
const Paramsget_params () const
 

Public Attributes

std::ostream * os = &std::cout
 

Private Types

using Helpers = detail::PANOCHelpers< config_t >
 

Private Attributes

Params params
 
AtomicStopSignal stop_signal
 
std::function< void(const ProgressInfo &)> progress_cb
 

Member Typedef Documentation

◆ Problem

template<Config Conf>
using Problem = alpaqa::TypeErasedControlProblem<config_t>

Definition at line 152 of file panoc-ocp.hpp.

◆ Params

template<Config Conf>
using Params = PANOCOCPParams<config_t>

Definition at line 153 of file panoc-ocp.hpp.

◆ Stats

template<Config Conf>
using Stats = PANOCOCPStats<config_t>

Definition at line 154 of file panoc-ocp.hpp.

◆ ProgressInfo

template<Config Conf>
using ProgressInfo = PANOCOCPProgressInfo<config_t>

Definition at line 155 of file panoc-ocp.hpp.

◆ SolveOptions

template<Config Conf>
using SolveOptions = InnerSolveOptions<config_t>

Definition at line 156 of file panoc-ocp.hpp.

◆ Helpers

template<Config Conf>
using Helpers = detail::PANOCHelpers<config_t>
private

Definition at line 200 of file panoc-ocp.hpp.

Constructor & Destructor Documentation

◆ PANOCOCPSolver()

template<Config Conf>
PANOCOCPSolver ( const Params params)
inline

Definition at line 158 of file panoc-ocp.hpp.

Member Function Documentation

◆ operator()() [1/3]

template<Config Conf>
auto operator() ( const Problem problem,
const SolveOptions opts,
rvec  u,
rvec  y,
crvec  μ,
rvec  err_z 
)

[in] Time elapsed since the start of the algorithm

[in] The current iteration number

[in] Tolerance of the current iterate

[in] The number of successive iterations no progress was made

Iterate, updates xu, ψ, grad_ψ, have_jacobians, L

[in] Finite difference step size relative to x

[in] Minimum absolute finite difference step size

[in] Minimum allowed Lipschitz estimate.

[in] Maximum allowed Lipschitz estimate.

Workspace with the same dimensions as xu, with x_init

Workspace with the same dimensions as grad_ψ

Parameters
[in]problemProblem description
[in]optsSolve options
[in,out]uDecision variable \( u \)
[in,out]yLagrange multipliers \( y \)
[in]μPenalty factors \( \mu \)
[out]err_zSlack variable error \( c(x) - \Pi_D(c(x) + \mu^{-1} y) \)

Definition at line 46 of file panoc-ocp.tpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator()() [2/3]

template<Config Conf>
template<class P >
Stats operator() ( const P &  problem,
const SolveOptions opts,
rvec  u,
rvec  y,
crvec  μ,
rvec  e 
)
inline

Definition at line 168 of file panoc-ocp.hpp.

+ Here is the call graph for this function:

◆ operator()() [3/3]

template<Config Conf>
template<class P >
Stats operator() ( const P &  problem,
const SolveOptions opts,
rvec  u 
)
inline

Definition at line 174 of file panoc-ocp.hpp.

+ Here is the call graph for this function:

◆ set_progress_callback()

template<Config Conf>
PANOCOCPSolver & set_progress_callback ( std::function< void(const ProgressInfo &)>  cb)
inline

Specify a callable that is invoked with some intermediate results on each iteration of the algorithm.

See also
ProgressInfo

Definition at line 185 of file panoc-ocp.hpp.

◆ get_name()

template<Config Conf>
std::string get_name ( ) const

Definition at line 41 of file panoc-ocp.tpp.

◆ stop()

template<Config Conf>
void stop ( )
inline

Definition at line 192 of file panoc-ocp.hpp.

+ Here is the call graph for this function:

◆ get_params()

template<Config Conf>
const Params & get_params ( ) const
inline

Definition at line 194 of file panoc-ocp.hpp.

Member Data Documentation

◆ params

template<Config Conf>
Params params
private

Definition at line 197 of file panoc-ocp.hpp.

◆ stop_signal

template<Config Conf>
AtomicStopSignal stop_signal
private

Definition at line 198 of file panoc-ocp.hpp.

◆ progress_cb

template<Config Conf>
std::function<void(const ProgressInfo &)> progress_cb
private

Definition at line 199 of file panoc-ocp.hpp.

◆ os

template<Config Conf>
std::ostream* os = &std::cout

Definition at line 203 of file panoc-ocp.hpp.


The documentation for this class was generated from the following files: