Apollo  6.0
Open source self driving car software
Public Member Functions | List of all members
apollo::planning::FemPosDeviationIpoptInterface Class Reference

#include <fem_pos_deviation_ipopt_interface.h>

Inheritance diagram for apollo::planning::FemPosDeviationIpoptInterface:
Inheritance graph
Collaboration diagram for apollo::planning::FemPosDeviationIpoptInterface:
Collaboration graph

Public Member Functions

 FemPosDeviationIpoptInterface (std::vector< std::pair< double, double >> points, std::vector< double > bounds)
 
virtual ~FemPosDeviationIpoptInterface ()=default
 
void set_weight_fem_pos_deviation (const double weight_fem_pos_deviation)
 
void set_weight_path_length (const double weight_path_length)
 
void set_weight_ref_deviation (const double weight_ref_deviation)
 
void set_weight_curvature_constraint_slack_var (const double weight_curvature_constraint_slack_var)
 
void set_curvature_constraint (const double curvature_constraint)
 
void get_optimization_results (std::vector< double > *ptr_x, std::vector< double > *ptr_y) const
 
bool get_nlp_info (int &n, int &m, int &nnz_jac_g, int &nnz_h_lag, IndexStyleEnum &index_style) override
 
bool get_bounds_info (int n, double *x_l, double *x_u, int m, double *g_l, double *g_u) override
 
bool get_starting_point (int n, bool init_x, double *x, bool init_z, double *z_L, double *z_U, int m, bool init_lambda, double *lambda) override
 
bool eval_f (int n, const double *x, bool new_x, double &obj_value) override
 
bool eval_grad_f (int n, const double *x, bool new_x, double *grad_f) override
 
bool eval_g (int n, const double *x, bool new_x, int m, double *g) override
 
bool eval_jac_g (int n, const double *x, bool new_x, int m, int nele_jac, int *iRow, int *jCol, double *values) override
 
bool eval_h (int n, const double *x, bool new_x, double obj_factor, int m, const double *lambda, bool new_lambda, int nele_hess, int *iRow, int *jCol, double *values) override
 

Solution Methods

void finalize_solution (Ipopt::SolverReturn status, int n, const double *x, const double *z_L, const double *z_U, int m, const double *g, const double *lambda, double obj_value, const Ipopt::IpoptData *ip_data, Ipopt::IpoptCalculatedQuantities *ip_cq) override
 
template<class T >
bool eval_obj (int n, const T *x, T *obj_value)
 
template<class T >
bool eval_constraints (int n, const T *x, int m, T *g)
 
virtual void generate_tapes (int n, int m, int *nnz_jac_g, int *nnz_h_lag)
 

Constructor & Destructor Documentation

◆ FemPosDeviationIpoptInterface()

apollo::planning::FemPosDeviationIpoptInterface::FemPosDeviationIpoptInterface ( std::vector< std::pair< double, double >>  points,
std::vector< double >  bounds 
)

◆ ~FemPosDeviationIpoptInterface()

virtual apollo::planning::FemPosDeviationIpoptInterface::~FemPosDeviationIpoptInterface ( )
virtualdefault

Member Function Documentation

◆ eval_constraints()

template<class T >
bool apollo::planning::FemPosDeviationIpoptInterface::eval_constraints ( int  n,
const T *  x,
int  m,
T *  g 
)

Template to compute contraints

◆ eval_f()

bool apollo::planning::FemPosDeviationIpoptInterface::eval_f ( int  n,
const double *  x,
bool  new_x,
double &  obj_value 
)
override

Method to return the objective value

◆ eval_g()

bool apollo::planning::FemPosDeviationIpoptInterface::eval_g ( int  n,
const double *  x,
bool  new_x,
int  m,
double *  g 
)
override

Method to return the constraint residuals

◆ eval_grad_f()

bool apollo::planning::FemPosDeviationIpoptInterface::eval_grad_f ( int  n,
const double *  x,
bool  new_x,
double *  grad_f 
)
override

Method to return the gradient of the objective

◆ eval_h()

bool apollo::planning::FemPosDeviationIpoptInterface::eval_h ( int  n,
const double *  x,
bool  new_x,
double  obj_factor,
int  m,
const double *  lambda,
bool  new_lambda,
int  nele_hess,
int *  iRow,
int *  jCol,
double *  values 
)
override

Method to return: 1) The structure of the hessian of the lagrangian (if "values" is nullptr) 2) The values of the hessian of the lagrangian (if "values" is not nullptr)

◆ eval_jac_g()

bool apollo::planning::FemPosDeviationIpoptInterface::eval_jac_g ( int  n,
const double *  x,
bool  new_x,
int  m,
int  nele_jac,
int *  iRow,
int *  jCol,
double *  values 
)
override

Method to return: 1) The structure of the jacobian (if "values" is nullptr) 2) The values of the jacobian (if "values" is not nullptr)

◆ eval_obj()

template<class T >
bool apollo::planning::FemPosDeviationIpoptInterface::eval_obj ( int  n,
const T *  x,
T *  obj_value 
)

Template to return the objective value

◆ finalize_solution()

void apollo::planning::FemPosDeviationIpoptInterface::finalize_solution ( Ipopt::SolverReturn  status,
int  n,
const double *  x,
const double *  z_L,
const double *  z_U,
int  m,
const double *  g,
const double *  lambda,
double  obj_value,
const Ipopt::IpoptData *  ip_data,
Ipopt::IpoptCalculatedQuantities *  ip_cq 
)
override

This method is called when the algorithm is complete so the TNLP can store/write the solution

◆ generate_tapes()

virtual void apollo::planning::FemPosDeviationIpoptInterface::generate_tapes ( int  n,
int  m,
int *  nnz_jac_g,
int *  nnz_h_lag 
)
virtual

Method to generate the required tapes

◆ get_bounds_info()

bool apollo::planning::FemPosDeviationIpoptInterface::get_bounds_info ( int  n,
double *  x_l,
double *  x_u,
int  m,
double *  g_l,
double *  g_u 
)
override

Method to return the bounds for my problem

◆ get_nlp_info()

bool apollo::planning::FemPosDeviationIpoptInterface::get_nlp_info ( int &  n,
int &  m,
int &  nnz_jac_g,
int &  nnz_h_lag,
IndexStyleEnum &  index_style 
)
override

Method to return some info about the nlp

◆ get_optimization_results()

void apollo::planning::FemPosDeviationIpoptInterface::get_optimization_results ( std::vector< double > *  ptr_x,
std::vector< double > *  ptr_y 
) const

◆ get_starting_point()

bool apollo::planning::FemPosDeviationIpoptInterface::get_starting_point ( int  n,
bool  init_x,
double *  x,
bool  init_z,
double *  z_L,
double *  z_U,
int  m,
bool  init_lambda,
double *  lambda 
)
override

Method to return the starting point for the algorithm

◆ set_curvature_constraint()

void apollo::planning::FemPosDeviationIpoptInterface::set_curvature_constraint ( const double  curvature_constraint)
inline

◆ set_weight_curvature_constraint_slack_var()

void apollo::planning::FemPosDeviationIpoptInterface::set_weight_curvature_constraint_slack_var ( const double  weight_curvature_constraint_slack_var)
inline

◆ set_weight_fem_pos_deviation()

void apollo::planning::FemPosDeviationIpoptInterface::set_weight_fem_pos_deviation ( const double  weight_fem_pos_deviation)
inline

◆ set_weight_path_length()

void apollo::planning::FemPosDeviationIpoptInterface::set_weight_path_length ( const double  weight_path_length)
inline

◆ set_weight_ref_deviation()

void apollo::planning::FemPosDeviationIpoptInterface::set_weight_ref_deviation ( const double  weight_ref_deviation)
inline

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