alpaqa dll
Nonconvex constrained optimization
Loading...
Searching...
No Matches
IpoptAdapter Class Reference

#include <alpaqa/ipopt/ipopt-adapter.hpp>

Detailed Description

Inheritance diagram for IpoptAdapter:
Collaboration diagram for IpoptAdapter:

Functions required by Ipopt

bool get_nlp_info (Index &n, Index &m, Index &nnz_jac_g, Index &nnz_h_lag, IndexStyleEnum &index_style) override
bool get_bounds_info (Index n, Number *x_l, Number *x_u, Index m, Number *g_l, Number *g_u) override
bool get_starting_point (Index n, bool init_x, Number *x, bool init_z, Number *z_L, Number *z_U, Index m, bool init_lambda, Number *lambda) override
bool eval_f (Index n, const Number *x, bool new_x, Number &obj_value) override
bool eval_grad_f (Index n, const Number *x, bool new_x, Number *grad_f) override
bool eval_g (Index n, const Number *x, bool new_x, Index m, Number *g) override
bool eval_jac_g (Index n, const Number *x, bool new_x, Index m, Index nele_jac, Index *iRow, Index *jCol, Number *values) override
bool eval_h (Index n, const Number *x, bool new_x, Number obj_factor, Index m, const Number *lambda, bool new_lambda, Index nele_hess, Index *iRow, Index *jCol, Number *values) override
void finalize_solution (Ipopt::SolverReturn status, Index n, const Number *x, const Number *z_L, const Number *z_U, Index m, const Number *g, const Number *lambda, Number obj_value, const Ipopt::IpoptData *ip_data, Ipopt::IpoptCalculatedQuantities *ip_cq) override

Classes

struct  Results

Public Types

using Problem = TypeErasedProblem<config_t>
using Index = Ipopt::Index
using Number = Ipopt::Number

Public Member Functions

 IpoptAdapter (const Problem &problem)
 IpoptAdapter (Problem &&)=delete

Public Attributes

vec initial_guess
vec initial_guess_bounds_multipliers
vec initial_guess_multipliers
struct alpaqa::IpoptAdapter::Results results

Private Types

using SparsityConv

Private Attributes

const Problemproblem
Sparsity orig_sparsity_jac_g = problem.get_constraints_jacobian_sparsity()
Sparsity orig_sparsity_hess_L = problem.get_lagrangian_hessian_sparsity()
SparsityConv cvt_sparsity_jac_g = orig_sparsity_jac_g
SparsityConv cvt_sparsity_hess_L = orig_sparsity_hess_L

Member Typedef Documentation

◆ Problem

using Problem = TypeErasedProblem<config_t>

Definition at line 16 of file ipopt-adapter.hpp.

◆ Index

using Index = Ipopt::Index

Definition at line 20 of file ipopt-adapter.hpp.

◆ Number

using Number = Ipopt::Number

Definition at line 21 of file ipopt-adapter.hpp.

◆ SparsityConv

using SparsityConv
private
Initial value:
sparsity::SparsityConverter<Sparsity, sparsity::SparseCOO<Index>>

Definition at line 80 of file ipopt-adapter.hpp.

Constructor & Destructor Documentation

◆ IpoptAdapter() [1/2]

IpoptAdapter ( const Problem & problem)

Definition at line 10 of file ipopt-adapter.cpp.

◆ IpoptAdapter() [2/2]

IpoptAdapter ( Problem && )
delete
Here is the call graph for this function:

Member Function Documentation

◆ get_nlp_info()

bool get_nlp_info ( Index & n,
Index & m,
Index & nnz_jac_g,
Index & nnz_h_lag,
IndexStyleEnum & index_style )
override

Definition at line 12 of file ipopt-adapter.cpp.

Here is the caller graph for this function:

◆ get_bounds_info()

bool get_bounds_info ( Index n,
Number * x_l,
Number * x_u,
Index m,
Number * g_l,
Number * g_u )
override

Definition at line 34 of file ipopt-adapter.cpp.

Here is the caller graph for this function:

◆ get_starting_point()

bool get_starting_point ( Index n,
bool init_x,
Number * x,
bool init_z,
Number * z_L,
Number * z_U,
Index m,
bool init_lambda,
Number * lambda )
override

Definition at line 45 of file ipopt-adapter.cpp.

Here is the caller graph for this function:

◆ eval_f()

bool eval_f ( Index n,
const Number * x,
bool new_x,
Number & obj_value )
override

Definition at line 76 of file ipopt-adapter.cpp.

Here is the caller graph for this function:

◆ eval_grad_f()

bool eval_grad_f ( Index n,
const Number * x,
bool new_x,
Number * grad_f )
override

Definition at line 82 of file ipopt-adapter.cpp.

Here is the caller graph for this function:

◆ eval_g()

bool eval_g ( Index n,
const Number * x,
bool new_x,
Index m,
Number * g )
override

Definition at line 88 of file ipopt-adapter.cpp.

Here is the caller graph for this function:

◆ eval_jac_g()

bool eval_jac_g ( Index n,
const Number * x,
bool new_x,
Index m,
Index nele_jac,
Index * iRow,
Index * jCol,
Number * values )
override

Definition at line 94 of file ipopt-adapter.cpp.

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

◆ eval_h()

bool eval_h ( Index n,
const Number * x,
bool new_x,
Number obj_factor,
Index m,
const Number * lambda,
bool new_lambda,
Index nele_hess,
Index * iRow,
Index * jCol,
Number * values )
override

Definition at line 115 of file ipopt-adapter.cpp.

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

◆ finalize_solution()

void finalize_solution ( Ipopt::SolverReturn status,
Index n,
const Number * x,
const Number * z_L,
const Number * z_U,
Index m,
const Number * g,
const Number * lambda,
Number obj_value,
const Ipopt::IpoptData * ip_data,
Ipopt::IpoptCalculatedQuantities * ip_cq )
override

Definition at line 136 of file ipopt-adapter.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ initial_guess

vec initial_guess

Definition at line 17 of file ipopt-adapter.hpp.

◆ initial_guess_bounds_multipliers

vec initial_guess_bounds_multipliers

Definition at line 18 of file ipopt-adapter.hpp.

◆ initial_guess_multipliers

vec initial_guess_multipliers

Definition at line 19 of file ipopt-adapter.hpp.

◆ results

◆ problem

const Problem& problem
private

Definition at line 78 of file ipopt-adapter.hpp.

◆ orig_sparsity_jac_g

Sparsity orig_sparsity_jac_g = problem.get_constraints_jacobian_sparsity()
private

Definition at line 82 of file ipopt-adapter.hpp.

◆ orig_sparsity_hess_L

Sparsity orig_sparsity_hess_L = problem.get_lagrangian_hessian_sparsity()
private

Definition at line 83 of file ipopt-adapter.hpp.

◆ cvt_sparsity_jac_g

SparsityConv cvt_sparsity_jac_g = orig_sparsity_jac_g
private

Definition at line 84 of file ipopt-adapter.hpp.

◆ cvt_sparsity_hess_L

SparsityConv cvt_sparsity_hess_L = orig_sparsity_hess_L
private

Definition at line 85 of file ipopt-adapter.hpp.


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