Ipopt
3.11.4
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
src
Interfaces
IpIpoptApplication.hpp
Go to the documentation of this file.
1
// Copyright (C) 2004, 2010 International Business Machines and others.
2
// All Rights Reserved.
3
// This code is published under the Eclipse Public License.
4
//
5
// $Id: IpIpoptApplication.hpp 2346 2013-07-01 13:03:35Z stefan $
6
//
7
// Authors: Carl Laird, Andreas Waechter IBM 2004-08-13
8
9
#ifndef __IPIPOPTAPPLICATION_HPP__
10
#define __IPIPOPTAPPLICATION_HPP__
11
12
#ifndef IPOPT_EXPORT
13
#ifdef _MSC_VER
14
#ifdef IPOPT_DLL
15
#define IPOPT_EXPORT(type) __declspec(dllexport) type __cdecl
16
#else
17
#define IPOPT_EXPORT(type) type __cdecl
18
#endif
19
#else
20
#define IPOPT_EXPORT(type) type
21
#endif
22
#endif
23
24
#include <iostream>
25
26
#include "
IpJournalist.hpp
"
27
#include "
IpTNLP.hpp
"
28
#include "
IpNLP.hpp
"
29
/* Return codes for the Optimize call for an application */
30
#include "
IpReturnCodes.hpp
"
31
32
namespace
Ipopt
33
{
34
DECLARE_STD_EXCEPTION
(IPOPT_APPLICATION_ERROR);
35
36
/* forward declarations */
37
class
IpoptAlgorithm;
38
class
IpoptNLP;
39
class
IpoptData;
40
class
IpoptCalculatedQuantities;
41
class
AlgorithmBuilder;
42
class
RegisteredOptions;
43
class
OptionsList;
44
class
SolveStatistics;
45
47
class
IpoptApplication
:
public
ReferencedObject
48
{
49
public
:
50
IpoptApplication
(
bool
create_console_out =
true
,
51
bool
create_empty =
false
);
52
55
IpoptApplication
(
SmartPtr<RegisteredOptions>
reg_options,
56
SmartPtr<OptionsList>
options,
57
SmartPtr<Journalist>
jnlst);
58
59
virtual
~IpoptApplication
();
60
64
virtual
SmartPtr<IpoptApplication>
clone
();
65
73
virtual
ApplicationReturnStatus
Initialize
(std::istream& is);
83
virtual
ApplicationReturnStatus
Initialize
(std::string params_file);
91
virtual
ApplicationReturnStatus
Initialize
();
92
96
virtual
ApplicationReturnStatus
OptimizeTNLP
(
const
SmartPtr<TNLP>
& tnlp);
97
99
virtual
ApplicationReturnStatus
OptimizeNLP
(
const
SmartPtr<NLP>
& nlp);
100
102
virtual
ApplicationReturnStatus
OptimizeNLP
(
const
SmartPtr<NLP>
& nlp,
SmartPtr<AlgorithmBuilder>
& alg_builder);
103
109
virtual
ApplicationReturnStatus
ReOptimizeTNLP
(
const
SmartPtr<TNLP>
& tnlp);
110
116
virtual
ApplicationReturnStatus
ReOptimizeNLP
(
const
SmartPtr<NLP>
& nlp);
118
121
virtual
bool
OpenOutputFile
(std::string
file_name
,
EJournalLevel
print_level
);
122
126
virtual
SmartPtr<Journalist>
Jnlst
()
127
{
128
return
jnlst_
;
129
}
130
133
virtual
SmartPtr<RegisteredOptions>
RegOptions
()
134
{
135
return
reg_options_
;
136
}
137
139
virtual
SmartPtr<OptionsList>
Options
()
140
{
141
return
options_
;
142
}
143
145
virtual
SmartPtr<const OptionsList>
Options
()
const
146
{
147
return
ConstPtr
(
options_
);
148
}
149
152
virtual
SmartPtr<SolveStatistics>
Statistics
();
153
155
virtual
SmartPtr<IpoptNLP>
IpoptNLPObject
();
156
158
SmartPtr<IpoptData>
IpoptDataObject
();
159
161
virtual
SmartPtr<IpoptCalculatedQuantities>
IpoptCQObject
();
162
164
SmartPtr<IpoptAlgorithm>
AlgorithmObject
();
166
171
void
PrintCopyrightMessage
();
172
175
static
void
RegisterOptions
(
SmartPtr<RegisteredOptions>
roptions);
177
179
static
void
180
RegisterAllIpoptOptions
(
const
SmartPtr<RegisteredOptions>
& roptions);
181
182
private
:
192
// IpoptApplication();
193
195
IpoptApplication
(
const
IpoptApplication
&);
196
198
void
operator=
(
const
IpoptApplication
&);
200
203
ApplicationReturnStatus
call_optimize
();
204
208
bool
read_params_dat_
;
210
212
SmartPtr<Journalist>
jnlst_
;
213
215
SmartPtr<RegisteredOptions>
reg_options_
;
216
218
SmartPtr<OptionsList>
options_
;
219
222
SmartPtr<SolveStatistics>
statistics_
;
223
226
SmartPtr<IpoptAlgorithm>
alg_
;
227
230
SmartPtr<IpoptNLP>
ip_nlp_
;
231
235
SmartPtr<IpoptData>
ip_data_
;
236
240
SmartPtr<IpoptCalculatedQuantities>
ip_cq_
;
241
244
SmartPtr<NLP>
nlp_adapter_
;
245
249
bool
inexact_algorithm_
;
252
bool
replace_bounds_
;
254
};
255
256
}
// namespace Ipopt
257
258
extern
"C"
IPOPT_EXPORT
(
class
Ipopt::IpoptApplication
*) IpoptApplicationFactory();
259
260
#endif
Generated on Mon Oct 21 2013 19:08:15 for Ipopt by
1.8.4