- Main Page
- Namespaces
- Classes
- Files

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Ipopt::IpoptApplication Class Reference

This is the main application class for making calls to Ipopt. More...

`#include <IpIpoptApplication.hpp>`

Inheritance diagram for Ipopt::IpoptApplication:

[legend]
Collaboration diagram for Ipopt::IpoptApplication:

[legend]
List of all members.

## Public Member Functions
| IpoptApplication (bool create_console_out=true, bool create_empty=false)
| 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.
virtual | ~IpoptApplication ()
SmartPtr< IpoptApplication > | clone ()
| Method for creating a new IpoptApplication that uses the same journalist and registered options, and a copy of the options list.
ApplicationReturnStatus | Initialize (std::string params_file="ipopt.opt")
| Initialize method.
ApplicationReturnStatus | 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)
| Solve a problem that inherits from NLP.
ApplicationReturnStatus | OptimizeNLP (const SmartPtr< NLP > &nlp, SmartPtr< AlgorithmBuilder > &alg_builder)
| 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
static void | RegisterAllIpoptOptions (const SmartPtr< RegisteredOptions > &roptions)
| Method to registering all Ipopt options.
Methods for IpoptTypeInfo
static void | RegisterOptions (SmartPtr< RegisteredOptions > roptions)
## Private Member Functions
ApplicationReturnStatus | call_optimize ()
| Method for the actual optimize call of the Ipopt algorithm.
Default Compiler Generated Methods
(Hidden to avoid implicit creation/calling). These methods are not implemented and we do not want the compiler to implement them for us, so we declare them private and do not define them. This ensures that they will not be implicitly created/called.
| IpoptApplication (const IpoptApplication &)
| Copy Constructor.
void | operator= (const IpoptApplication &)
| Overloaded Equals Operator.
## Private Attributes
SmartPtr< Journalist > | jnlst_
| Journalist for reporting output.
SmartPtr< RegisteredOptions > | reg_options_
| RegisteredOptions.
SmartPtr< OptionsList > | options_
| OptionsList used for the application.
SmartPtr< SolveStatistics > | statistics_
| Object for storing statistics about the most recent optimization run.
SmartPtr< IpoptAlgorithm > | alg_
| Object with the algorithm sceleton.
SmartPtr< IpoptNLP > | ip_nlp_
| IpoptNLP Object for the NLP.
SmartPtr< IpoptData > | ip_data_
| IpoptData Object for the NLP.
SmartPtr< IpoptCalculatedQuantities > | ip_cq_
| IpoptCalculatedQuantities Object for the NLP.
SmartPtr< NLP > | nlp_adapter_
| Pointer to the TNLPAdapter used to convert the TNLP to an NLP.
Variables that customize the application behavior
bool | read_params_dat_
| Decide whether or not the ipopt.opt file should be read.

## Detailed Description

This is the main application class for making calls to Ipopt.

Definition at line 35 of file IpIpoptApplication.hpp.

## Constructor & Destructor Documentation

Ipopt::IpoptApplication::IpoptApplication | ( | bool | create_console_out = `true`,
|  | bool | create_empty = `false` |
| ) |  |  |

Ipopt::IpoptApplication::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.

virtual Ipopt::IpoptApplication::~IpoptApplication | ( |  | ) | `[virtual]`

Ipopt::IpoptApplication::IpoptApplication | ( | const IpoptApplication & |  | ) | `[private]`

Copy Constructor.

## Member Function Documentation

SmartPtr<IpoptApplication> Ipopt::IpoptApplication::clone | ( |  | ) |

Method for creating a new IpoptApplication that uses the same journalist and registered options, and a copy of the options list.

ApplicationReturnStatus Ipopt::IpoptApplication::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 "". It returns something other than Solve_Succeeded if there was a problem in the initialization (such as an invalid option).

ApplicationReturnStatus Ipopt::IpoptApplication::Initialize | ( | std::istream & | is | ) |

ApplicationReturnStatus Ipopt::IpoptApplication::OptimizeTNLP | ( | const SmartPtr< TNLP > & | tnlp | ) |

Solve a problem that inherits from TNLP.

ApplicationReturnStatus Ipopt::IpoptApplication::OptimizeNLP | ( | const SmartPtr< NLP > & | nlp | ) |

Solve a problem that inherits from NLP.

ApplicationReturnStatus Ipopt::IpoptApplication::OptimizeNLP | ( | const SmartPtr< NLP > & | nlp,
|  | SmartPtr< AlgorithmBuilder > & | alg_builder |
| ) |  |  |

Solve a problem that inherits from NLP.

ApplicationReturnStatus Ipopt::IpoptApplication::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).

ApplicationReturnStatus Ipopt::IpoptApplication::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).

bool Ipopt::IpoptApplication::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.

SmartPtr<Journalist> Ipopt::IpoptApplication::Jnlst | ( |  | ) | `[inline]`

Get the Journalist for printing output.

Definition at line 97 of file IpIpoptApplication.hpp.

References jnlst_.

SmartPtr<RegisteredOptions> Ipopt::IpoptApplication::RegOptions | ( |  | ) | `[inline]`

Get a pointer to RegisteredOptions object to add new options.

Definition at line 104 of file IpIpoptApplication.hpp.

References reg_options_.

SmartPtr<OptionsList> Ipopt::IpoptApplication::Options | ( |  | ) | `[inline]`

Get the options list for setting options.

Definition at line 110 of file IpIpoptApplication.hpp.

References options_.

SmartPtr<const OptionsList> Ipopt::IpoptApplication::Options | ( |  | ) | const`[inline]`

Get the options list for setting options (const version).

Definition at line 116 of file IpIpoptApplication.hpp.

References Ipopt::ConstPtr(), and options_.

SmartPtr<SolveStatistics> Ipopt::IpoptApplication::Statistics | ( |  | ) |

Get the object with the statistics about the most recent optimization run.

static void Ipopt::IpoptApplication::RegisterOptions | ( | SmartPtr< RegisteredOptions > | roptions | ) | `[static]`

static void Ipopt::IpoptApplication::RegisterAllIpoptOptions | ( | const SmartPtr< RegisteredOptions > & | roptions | ) | `[static]`

Method to registering all Ipopt options.

void Ipopt::IpoptApplication::operator= | ( | const IpoptApplication & |  | ) | `[private]`

Overloaded Equals Operator.

ApplicationReturnStatus Ipopt::IpoptApplication::call_optimize | ( |  | ) | `[private]`

Method for the actual optimize call of the Ipopt algorithm.

This is used both for Optimize and ReOptimize

## Member Data Documentation

bool Ipopt::IpoptApplication::read_params_dat_`[private]`

Decide whether or not the ipopt.opt file should be read.

Definition at line 161 of file IpIpoptApplication.hpp.

SmartPtr<Journalist> Ipopt::IpoptApplication::jnlst_`[private]`

Journalist for reporting output.

Definition at line 165 of file IpIpoptApplication.hpp.

Referenced by Jnlst().

SmartPtr<RegisteredOptions> Ipopt::IpoptApplication::reg_options_`[private]`

RegisteredOptions.

Definition at line 168 of file IpIpoptApplication.hpp.

Referenced by RegOptions().

SmartPtr<OptionsList> Ipopt::IpoptApplication::options_`[private]`

OptionsList used for the application.

Definition at line 171 of file IpIpoptApplication.hpp.

Referenced by Options().

SmartPtr<SolveStatistics> Ipopt::IpoptApplication::statistics_`[private]`

Object for storing statistics about the most recent optimization run.

Definition at line 175 of file IpIpoptApplication.hpp.

SmartPtr<IpoptAlgorithm> Ipopt::IpoptApplication::alg_`[private]`

Object with the algorithm sceleton.

Definition at line 179 of file IpIpoptApplication.hpp.

SmartPtr<IpoptNLP> Ipopt::IpoptApplication::ip_nlp_`[private]`

IpoptNLP Object for the NLP.

We keep this around for a ReOptimize warm start.

Definition at line 183 of file IpIpoptApplication.hpp.

SmartPtr<IpoptData> Ipopt::IpoptApplication::ip_data_`[private]`

IpoptData Object for the NLP.

We keep this around for a ReOptimize warm start.

Definition at line 188 of file IpIpoptApplication.hpp.

SmartPtr<IpoptCalculatedQuantities> Ipopt::IpoptApplication::ip_cq_`[private]`

IpoptCalculatedQuantities Object for the NLP.

We keep this around for a ReOptimize warm start.

Definition at line 193 of file IpIpoptApplication.hpp.

SmartPtr<NLP> Ipopt::IpoptApplication::nlp_adapter_`[private]`

Pointer to the TNLPAdapter used to convert the TNLP to an NLP.

We keep this around for the ReOptimizerTNLP call.

Definition at line 197 of file IpIpoptApplication.hpp.

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

- /home/coin/SVN-release/Ipopt-3.5.1/Ipopt/src/Interfaces/IpIpoptApplication.hpp