|
PANOC-ALM
quadratic-penalty
Nonconvex constrained optimization
|
Go to the documentation of this file. 1 #include <casadi/core/external.hpp>
7 std::function<pa::Problem::f_sig>
11 std::function<pa::Problem::grad_f_sig>
13 const std::string &fun_name) {
16 std::function<pa::Problem::g_sig>
18 const std::string &fun_name) {
21 std::function<pa::Problem::grad_g_prod_sig>
23 const std::string &fun_name) {
32 std::function<pa::Problem::hess_L_sig>
34 const std::string &fun_name) {
38 if (
x.rows() !=
H.rows()) {
39 for (
auto c =
x.rows();
c-- > 1;)
40 for (
auto r =
x.rows(); r-- > 0;)
41 std::swap(
H(r,
c),
H.data()[r +
x.rows() *
c]);
45 if (
x.rows() !=
H.rows()) {
46 for (
auto c =
x.rows();
c-- > 1;)
47 for (
auto r =
x.rows(); r-- > 0;)
48 std::swap(
H(r,
c),
H.data()[r +
x.rows() *
c]);
52 std::function<pa::Problem::hess_L_prod_sig>
54 const std::string &fun_name) {
59 unsigned m,
bool second_order) {
62 auto load = [&](
const std::string &
name) {
63 return casadi::external(
name, so_name);
108 unsigned n,
unsigned m,
113 auto load = [&](
const std::string &
name) {
114 return casadi::external(
name, so_name);
160 unsigned m2,
bool second_order) {
163 auto load = [&](
const char *
name) {
164 return casadi::external(
name, so_name);
221 unsigned m1,
unsigned m2,
bool second_order) {
225 auto load = [&](
const char *
name) {
226 return casadi::external(
name, so_name);
std::function< pa::Problem::f_sig > load_CasADi_objective(const std::string &so_name, const std::string &fun_name="f")
Load an objective function generated by CasADi.
Eigen::Ref< vec > rvec
Default type for mutable references to vectors.
std::function< pa::Problem::g_sig > load_CasADi_constraints(const std::string &so_name, const std::string &fun_name="g")
Load a constraint function generated by CasADi.
Wrapper for CasADiFunctionEvaluator with 3 vector inputs, 1 vector output.
realvec vec
Default type for vectors.
Eigen::Ref< mat > rmat
Default type for mutable references to matrices.
Wrapper for CasADiFunctionEvaluator with 1 vector input, scalar output.
pa::ProblemWithParam load_CasADi_problem_with_param(const std::string &filename, unsigned n, unsigned m, bool second_order=false)
Load a problem generated by CasADi (with parameters).
Wrapper for CasADiFunctionEvaluator with 2 vector inputs, 1 vector output.
std::function< pa::Problem::hess_L_prod_sig > load_CasADi_hessian_lagrangian_prod(const std::string &so_name, const std::string &fun_name="hess_L_prod")
Load the Hessian-vector product of a Lagrangian function generated by CasADi.
std::function< pa::Problem::hess_L_sig > load_CasADi_hessian_lagrangian(const std::string &so_name, const std::string &fun_name="hess_L")
Load the Hessian of a Lagrangian function generated by CasADi.
Eigen::Ref< const vec > crvec
Default type for immutable references to vectors.
std::function< pa::Problem::grad_g_prod_sig > load_CasADi_gradient_constraints_prod(const std::string &so_name, const std::string &fun_name="grad_g")
Load the gradient-vector product of a constraint function generated by CasADi.
Wrapper for CasADiFunctionEvaluator with 4 vector inputs, 1 vector output.
pa::ProblemFullWithParam load_CasADi_problem_full_with_param(const char *filename, unsigned n, unsigned m1, unsigned m2, bool second_order=false)
Load a problem generated by CasADi (with parameters).
Wrapper for CasADiFunctionEvaluator with 2 vector inputs, scalar output.
pa::ProblemFull load_CasADi_problem_full(const char *filename, unsigned n, unsigned m1, unsigned m2, bool second_order=false)
Load a problem generated by CasADi (without parameters).
Problem description for minimization problems.
Wrapper for CasADiFunctionEvaluator with 3 vector inputs, 1 matrix output.
std::function< pa::Problem::grad_f_sig > load_CasADi_gradient_objective(const std::string &so_name, const std::string &fun_name="grad_f")
Load the gradient of an objective function generated by CasADi.
Wrapper for CasADiFunctionEvaluator with 1 vector input, 1 vector output.
Problem description for minimization problems.
pa::Problem load_CasADi_problem(const std::string &filename, unsigned n, unsigned m, bool second_order=false)
Load a problem generated by CasADi (without parameters).
Wrapper for CasADiFunctionEvaluator with 2 vector inputs, 1 matrix output.