My Project
IpoptProblem Class Reference

#include <OSIpoptSolver.h>

Inheritance diagram for IpoptProblem:

Public Member Functions

 IpoptProblem (OSInstance *osinstance_, OSOption *osoption_, OSResult *osresult_, std::string *ipoptErrorMsg_)
 the IpoptProblemclass constructor
 
virtual ~IpoptProblem ()
 the IpoptProblem class destructor
 
virtual bool get_nlp_info (Ipopt::Index &n, Ipopt::Index &m, Ipopt::Index &nnz_jac_g, Ipopt::Index &nnz_h_lag, IndexStyleEnum &index_style)
 IPOpt specific methods for defining the nlp problem.
 
virtual bool get_bounds_info (Ipopt::Index n, Ipopt::Number *x_l, Ipopt::Number *x_u, Ipopt::Index m, Ipopt::Number *g_l, Ipopt::Number *g_u)
 Method to return the bounds for my problem.
 
virtual bool get_starting_point (Ipopt::Index n, bool init_x, Ipopt::Number *x, bool init_z, Ipopt::Number *z_L, Ipopt::Number *z_U, Ipopt::Index m, bool init_lambda, Ipopt::Number *lambda)
 Method to return the starting point for the algorithm.
 
virtual bool eval_f (Ipopt::Index n, const Ipopt::Number *x, bool new_x, Ipopt::Number &obj_value)
 Method to return the objective value.
 
virtual bool eval_grad_f (Ipopt::Index n, const Ipopt::Number *x, bool new_x, Ipopt::Number *grad_f)
 Method to return the gradient of the objective.
 
virtual bool eval_g (Ipopt::Index n, const Ipopt::Number *x, bool new_x, Ipopt::Index m, Ipopt::Number *g)
 Method to return the constraint residuals.
 
virtual bool eval_jac_g (Ipopt::Index n, const Ipopt::Number *x, bool new_x, Ipopt::Index m, Ipopt::Index nele_jac, Ipopt::Index *iRow, Ipopt::Index *jCol, Ipopt::Number *values)
 Method to return: 1) The structure of the jacobian (if "values" is NULL) 2) The values of the jacobian (if "values" is not NULL)
 
virtual bool eval_h (Ipopt::Index n, const Ipopt::Number *x, bool new_x, Ipopt::Number obj_factor, Ipopt::Index m, const Ipopt::Number *lambda, bool new_lambda, Ipopt::Index nele_hess, Ipopt::Index *iRow, Ipopt::Index *jCol, Ipopt::Number *values)
 Method to return: 1) The structure of the hessian of the lagrangian (if "values" is NULL) 2) The values of the hessian of the lagrangian (if "values" is not NULL)
 
virtual bool get_scaling_parameters (Ipopt::Number &obj_scaling, bool &use_x_scaling, Ipopt::Index n, Ipopt::Number *x_scaling, bool &use_g_scaling, Ipopt::Index m, Ipopt::Number *g_scaling)
 
Solution Methods
virtual void finalize_solution (Ipopt::SolverReturn status, Ipopt::Index n, const Ipopt::Number *x, const Ipopt::Number *z_L, const Ipopt::Number *z_U, Ipopt::Index m, const Ipopt::Number *g, const Ipopt::Number *lambda, Ipopt::Number obj_value, const Ipopt::IpoptData *ip_data, Ipopt::IpoptCalculatedQuantities *ip_cq)
 This method is called when the algorithm is complete so the TNLP can store/write the solution.
 

Public Attributes

OSInstanceosinstance
 
OSOptionosoption
 
OSResultosresult
 
std::string * ipoptErrorMsg
 

Private Member Functions

Methods to block default compiler methods.

The compiler automatically generates the following three methods.

Since the default compiler implementation is generally not what you want (for all but the most simple classes), we usually put the declarations of these methods in the private section and never implement them. This prevents the compiler from implementing an incorrect "default" behavior without us knowing. (See Scott Meyers book, "Effective C++")

 IpoptProblem (const IpoptProblem &)
 
IpoptProblemoperator= (const IpoptProblem &)
 

Detailed Description

Definition at line 52 of file OSIpoptSolver.h.

Constructor & Destructor Documentation

◆ IpoptProblem() [1/2]

IpoptProblem::IpoptProblem ( OSInstance * osinstance_,
OSOption * osoption_,
OSResult * osresult_,
std::string * ipoptErrorMsg_ )

the IpoptProblemclass constructor

Definition at line 1128 of file OSIpoptSolver.cpp.

◆ ~IpoptProblem()

IpoptProblem::~IpoptProblem ( )
virtual

the IpoptProblem class destructor

Definition at line 1136 of file OSIpoptSolver.cpp.

◆ IpoptProblem() [2/2]

IpoptProblem::IpoptProblem ( const IpoptProblem & )
private

Member Function Documentation

◆ get_nlp_info()

bool IpoptProblem::get_nlp_info ( Ipopt::Index & n,
Ipopt::Index & m,
Ipopt::Index & nnz_jac_g,
Ipopt::Index & nnz_h_lag,
IndexStyleEnum & index_style )
virtual

IPOpt specific methods for defining the nlp problem.

Definition at line 69 of file OSIpoptSolver.cpp.

◆ get_bounds_info()

bool IpoptProblem::get_bounds_info ( Ipopt::Index n,
Ipopt::Number * x_l,
Ipopt::Number * x_u,
Ipopt::Index m,
Ipopt::Number * g_l,
Ipopt::Number * g_u )
virtual

Method to return the bounds for my problem.

Definition at line 185 of file OSIpoptSolver.cpp.

◆ get_starting_point()

bool IpoptProblem::get_starting_point ( Ipopt::Index n,
bool init_x,
Ipopt::Number * x,
bool init_z,
Ipopt::Number * z_L,
Ipopt::Number * z_U,
Ipopt::Index m,
bool init_lambda,
Ipopt::Number * lambda )
virtual

Method to return the starting point for the algorithm.

Definition at line 218 of file OSIpoptSolver.cpp.

◆ eval_f()

bool IpoptProblem::eval_f ( Ipopt::Index n,
const Ipopt::Number * x,
bool new_x,
Ipopt::Number & obj_value )
virtual

Method to return the objective value.

Definition at line 359 of file OSIpoptSolver.cpp.

◆ eval_grad_f()

bool IpoptProblem::eval_grad_f ( Ipopt::Index n,
const Ipopt::Number * x,
bool new_x,
Ipopt::Number * grad_f )
virtual

Method to return the gradient of the objective.

Definition at line 384 of file OSIpoptSolver.cpp.

◆ eval_g()

bool IpoptProblem::eval_g ( Ipopt::Index n,
const Ipopt::Number * x,
bool new_x,
Ipopt::Index m,
Ipopt::Number * g )
virtual

Method to return the constraint residuals.

Definition at line 416 of file OSIpoptSolver.cpp.

◆ eval_jac_g()

bool IpoptProblem::eval_jac_g ( Ipopt::Index n,
const Ipopt::Number * x,
bool new_x,
Ipopt::Index m,
Ipopt::Index nele_jac,
Ipopt::Index * iRow,
Ipopt::Index * jCol,
Ipopt::Number * values )
virtual

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

Definition at line 445 of file OSIpoptSolver.cpp.

◆ eval_h()

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

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

Definition at line 508 of file OSIpoptSolver.cpp.

◆ get_scaling_parameters()

bool IpoptProblem::get_scaling_parameters ( Ipopt::Number & obj_scaling,
bool & use_x_scaling,
Ipopt::Index n,
Ipopt::Number * x_scaling,
bool & use_g_scaling,
Ipopt::Index m,
Ipopt::Number * g_scaling )
virtual

Definition at line 569 of file OSIpoptSolver.cpp.

◆ finalize_solution()

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

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

Definition at line 585 of file OSIpoptSolver.cpp.

◆ operator=()

IpoptProblem & IpoptProblem::operator= ( const IpoptProblem & )
private

Member Data Documentation

◆ osinstance

OSInstance* IpoptProblem::osinstance

Definition at line 63 of file OSIpoptSolver.h.

◆ osoption

OSOption* IpoptProblem::osoption

Definition at line 65 of file OSIpoptSolver.h.

◆ osresult

OSResult* IpoptProblem::osresult

Definition at line 67 of file OSIpoptSolver.h.

◆ ipoptErrorMsg

std::string* IpoptProblem::ipoptErrorMsg

Definition at line 69 of file OSIpoptSolver.h.


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