#include <IpIpoptApplication.hpp>
Public Member Functions | |
IpoptApplication (bool create_console_out=true) | |
virtual | ~IpoptApplication () |
void | Initialize (std::string params_file="ipopt.opt") |
Initialize method. | |
void | Initialize (std::istream &is) |
bool | OpenOutputFile (std::string file_name, EJournalLevel print_level) |
Method for opening an output file with given print_level. | |
Solve methods | |
ApplicationReturnStatus | OptimizeTNLP (const SmartPtr< TNLP > &tnlp) |
Solve a problem that inherits from TNLP. | |
ApplicationReturnStatus | OptimizeNLP (const SmartPtr< NLP > &nlp, SmartPtr< AlgorithmBuilder > alg_builder=NULL) |
Solve a problem that inherits from NLP. | |
ApplicationReturnStatus | ReOptimizeTNLP (const SmartPtr< TNLP > &tnlp) |
Solve a problem (that inherits from TNLP) for a repeated time. | |
ApplicationReturnStatus | ReOptimizeNLP (const SmartPtr< NLP > &nlp) |
Solve a problem (that inherits from NLP) for a repeated time. | |
Accessor methods | |
SmartPtr< Journalist > | Jnlst () |
Get the Journalist for printing output. | |
SmartPtr< RegisteredOptions > | RegOptions () |
Get a pointer to RegisteredOptions object to add new options. | |
SmartPtr< OptionsList > | Options () |
Get the options list for setting options. | |
SmartPtr< const OptionsList > | Options () const |
Get the options list for setting options (const version). | |
SmartPtr< SolveStatistics > | Statistics () |
Get the object with the statistics about the most recent optimization run. | |
Static Public Member Functions | |
Methods for IpoptTypeInfo | |
static void | RegisterOptions (SmartPtr< RegisteredOptions > roptions) |
IpoptApplication | ( | bool | create_console_out = true |
) |
~IpoptApplication | ( | ) | [virtual] |
References DBG_START_METH.
void Initialize | ( | std::string | params_file = "ipopt.opt" |
) |
Initialize method.
This method reads the params file and initializes the journalists. You should call this method at some point before the first optimize call. Note: you can skip the processing of a params file by setting params_file to ""
References Ipopt::J_MAIN, Ipopt::J_SUMMARY, and IpoptException::ReportException().
void Initialize | ( | std::istream & | is | ) |
ApplicationReturnStatus OptimizeTNLP | ( | const SmartPtr< TNLP > & | tnlp | ) |
Solve a problem that inherits from TNLP.
References Ipopt::ConstPtr(), Ipopt::GetRawPtr(), and IpoptApplication::OptimizeNLP().
ApplicationReturnStatus OptimizeNLP | ( | const SmartPtr< NLP > & | nlp, | |
SmartPtr< AlgorithmBuilder > | alg_builder = NULL | |||
) |
Solve a problem that inherits from NLP.
References Ipopt::GetRawPtr(), Ipopt::Insufficient_Memory, Ipopt::Internal_Error, Ipopt::Invalid_Option, Ipopt::IsNull(), Ipopt::J_ERROR, Ipopt::J_MAIN, Ipopt::J_SUMMARY, IpoptException::ReportException(), and Ipopt::Unrecoverable_Exception.
Referenced by IpoptApplication::OptimizeTNLP().
ApplicationReturnStatus ReOptimizeTNLP | ( | const SmartPtr< TNLP > & | tnlp | ) |
Solve a problem (that inherits from TNLP) for a repeated time.
The OptimizeTNLP method must have been called before. The TNLP must be the same object, and the structure (number of variables and constraints and position of nonzeros in Jacobian and Hessian must be the same).
References ASSERT_EXCEPTION, DBG_ASSERT, Ipopt::GetRawPtr(), Ipopt::IsValid(), IpoptApplication::ReOptimizeNLP(), and TNLPAdapter::tnlp().
ApplicationReturnStatus ReOptimizeNLP | ( | const SmartPtr< NLP > & | nlp | ) |
Solve a problem (that inherits from NLP) for a repeated time.
The OptimizeNLP method must have been called before. The NLP must be the same object, and the structure (number of variables and constraints and position of nonzeros in Jacobian and Hessian must be the same).
References ASSERT_EXCEPTION, DBG_ASSERT, Ipopt::GetRawPtr(), Ipopt::IsValid(), and OrigIpoptNLP::nlp().
Referenced by IpoptApplication::ReOptimizeTNLP().
bool OpenOutputFile | ( | std::string | file_name, | |
EJournalLevel | print_level | |||
) |
Method for opening an output file with given print_level.
Returns false if there was a problem.
References Ipopt::IsNull(), Ipopt::J_DBG, and Ipopt::J_NONE.
Referenced by IpoptApplication::Initialize().
SmartPtr<Journalist> Jnlst | ( | ) | [inline] |
Get the Journalist for printing output.
SmartPtr<RegisteredOptions> RegOptions | ( | ) | [inline] |
Get a pointer to RegisteredOptions object to add new options.
SmartPtr<OptionsList> Options | ( | ) | [inline] |
Get the options list for setting options.
SmartPtr<const OptionsList> Options | ( | ) | const [inline] |
SmartPtr< SolveStatistics > Statistics | ( | ) |
Get the object with the statistics about the most recent optimization run.
void RegisterOptions | ( | SmartPtr< RegisteredOptions > | roptions | ) | [static] |
References Ipopt::J_ITERSUMMARY, and Ipopt::J_LAST_LEVEL.
Referenced by Ipopt::RegisterOptions_Interfaces().