Go to the documentation of this file.
7 #ifndef __IPIPOPTAPPLICATION_HPP__
8 #define __IPIPOPTAPPLICATION_HPP__
12 #define IPOPT_EXPORT(type) type __cdecl
14 #define IPOPT_EXPORT(type) type
45 bool create_console_out =
true,
46 bool create_empty =
false
80 bool allow_clobber =
false
101 std::string params_file,
102 bool allow_clobber =
false
123 const char* params_file,
124 bool allow_clobber =
false
127 return Initialize(std::string(params_file), allow_clobber);
145 bool allow_clobber =
false
194 std::string file_name,
264 bool oldval = rethrow_nonipoptexception_;
265 rethrow_nonipoptexception_ = dorethrow;
void operator=(const IpoptApplication &)
Default Assignment Operator.
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
SmartPtr< OptionsList > options_
OptionsList used for the application.
Class to organize all the data required by the algorithm.
virtual ApplicationReturnStatus OptimizeNLP(const SmartPtr< NLP > &nlp)
Solve a problem that inherits from NLP.
SmartPtr< IpoptAlgorithm > AlgorithmObject()
Get the Algorithm Object.
virtual SmartPtr< Journalist > Jnlst()
Get the Journalist for printing output.
SmartPtr< NLP > nlp_adapter_
Pointer to the TNLPAdapter used to convert the TNLP to an NLP.
Class for all IPOPT specific calculated quantities.
This file contains a base class for all exceptions and a set of macros to help with exceptions.
virtual ApplicationReturnStatus ReOptimizeTNLP(const SmartPtr< TNLP > &tnlp)
Solve a problem (that inherits from TNLP) for a repeated time.
SmartPtr< IpoptNLP > ip_nlp_
IpoptNLP Object for the NLP.
EJournalLevel
Print Level Enum.
virtual SmartPtr< OptionsList > Options()
Get the options list for setting options.
static void RegisterAllIpoptOptions(const SmartPtr< RegisteredOptions > &roptions)
Method to register all Ipopt options.
virtual ApplicationReturnStatus Initialize(std::string params_file, bool allow_clobber=false)
Initialization method.
IpoptApplication(const IpoptApplication &)
Copy Constructor.
ApplicationReturnStatus call_optimize()
Method for the actual optimize call of the Ipopt algorithm.
Class for storing registered options.
SmartPtr< RegisteredOptions > reg_options_
RegisteredOptions.
ApplicationReturnStatus
Return codes for the Optimize call for an application.
virtual bool OpenOutputFile(std::string file_name, EJournalLevel print_level)
Method for opening an output file with given print_level.
SmartPtr< Journalist > jnlst_
Journalist for reporting output.
virtual SmartPtr< SolveStatistics > Statistics()
Get the object with the statistics about the most recent optimization run.
bool rethrow_nonipoptexception_
Decide whether non-ipopt non-bad_alloc exceptions should be rethrown.
virtual SmartPtr< IpoptNLP > IpoptNLPObject()
Get the IpoptNLP Object.
SmartPtr< IpoptData > IpoptDataObject()
Get the IpoptData Object.
Template class for Smart Pointers.
virtual ApplicationReturnStatus Initialize(bool allow_clobber=false)
Initialize method.
virtual ApplicationReturnStatus ReOptimizeNLP(const SmartPtr< NLP > &nlp)
Solve a problem (that inherits from NLP) for a repeated time.
SmartPtr< IpoptData > ip_data_
IpoptData Object for the NLP.
This is the main application class for making calls to Ipopt.
virtual ~IpoptApplication()
SmartPtr< SolveStatistics > statistics_
Object for storing statistics about the most recent optimization run.
SmartPtr< IpoptCalculatedQuantities > ip_cq_
IpoptCalculatedQuantities Object for the NLP.
SmartPtr< IpoptAlgorithm > alg_
Object with the algorithm skeleton.
bool RethrowNonIpoptException(bool dorethrow)
Method to set whether non-ipopt non-bad_alloc exceptions are rethrown by Ipopt.
This class collects statistics about an optimization run, such as iteration count,...
SmartPtr< const U > ConstPtr(const SmartPtr< U > &smart_ptr)
virtual ApplicationReturnStatus Initialize(const char *params_file, bool allow_clobber=false)
Initialization method.
bool inexact_algorithm_
Flag indicating if we are to use the inexact linear solver option.
virtual SmartPtr< IpoptCalculatedQuantities > IpoptCQObject()
Get the IpoptCQ Object.
The main ipopt algorithm class.
virtual ApplicationReturnStatus OptimizeNLP(const SmartPtr< NLP > &nlp, SmartPtr< AlgorithmBuilder > &alg_builder)
Solve a problem that inherits from NLP.
IpoptApplication(bool create_console_out=true, bool create_empty=false)
virtual SmartPtr< RegisteredOptions > RegOptions()
Get a pointer to RegisteredOptions object to add new options.
virtual ApplicationReturnStatus Initialize(std::istream &is, bool allow_clobber=false)
Initialization method.
bool read_params_dat_
Decide whether or not the ipopt.opt file should be read.
bool replace_bounds_
Flag indicating if all bounds should be replaced by inequality constraints.
void PrintCopyrightMessage()
Method for printing Ipopt copyright message now instead of just before the optimization.
IPOPTLIB_EXPORT class Ipopt::IpoptApplication * IpoptApplicationFactory()
DECLARE_STD_EXCEPTION(FATAL_ERROR_IN_LINEAR_SOLVER)
Builder for creating a complete IpoptAlg object.
virtual SmartPtr< IpoptApplication > clone()
Method for creating a new IpoptApplication that uses the same journalist and registered options,...
virtual SmartPtr< const OptionsList > Options() const
Get the options list for setting options (const version)
virtual ApplicationReturnStatus OptimizeTNLP(const SmartPtr< TNLP > &tnlp)
Solve a problem that inherits from TNLP.
This class stores a list of user set options.
Storing the reference count of all the smart pointers that currently reference it.
IpoptApplication(SmartPtr< RegisteredOptions > reg_options, SmartPtr< OptionsList > options, SmartPtr< Journalist > jnlst)
Another constructor that assumes that the code in the (default) constructor has already been executed...
This is the abstract base class for classes that map the traditional NLP into something that is more ...