Ipopt 3.12.10

- Main Page
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
IpTNLPAdapter.hpp
Go to the documentation of this file.
1 // Copyright (C) 2004, 2008 International Business Machines and others.
2 // All Rights Reserved.
3 // This code is published under the Eclipse Public License.
4 //
5 // $Id: IpTNLPAdapter.hpp 2269 2013-05-05 11:32:40Z stefan $
6 //
7 // Authors: Carl Laird, Andreas Waechter IBM 2004-08-13
8
9 #ifndef __IPTNLPADAPTER_HPP__
10 #define __IPTNLPADAPTER_HPP__
11
12 #include "IpNLP.hpp"
13 #include "IpTNLP.hpp"
14 #include "IpOrigIpoptNLP.hpp"
15 #include <list>
16
17 namespace Ipopt
18 {
19
20 // forward declarations
21 class ExpansionMatrix;
22 class ExpansionMatrixSpace;
23 class IteratesVector;
24 class TDependencyDetector;
25
30 class TNLPAdapter : public NLP
31 {
32 public:
36 TNLPAdapter(const SmartPtr<TNLP> tnlp,
37 const SmartPtr<const Journalist> jnlst = NULL);
38
40 virtual ~TNLPAdapter();
42
45 DECLARE_STD_EXCEPTION(INVALID_TNLP);
46 DECLARE_STD_EXCEPTION(ERROR_IN_TNLP_DERIVATIVE_TEST);
48
51 virtual bool ProcessOptions(const OptionsList& options,
52 const std::string& prefix);
53
56 virtual bool GetSpaces(SmartPtr<const VectorSpace>& x_space,
57 SmartPtr<const VectorSpace>& c_space,
58 SmartPtr<const VectorSpace>& d_space,
59 SmartPtr<const VectorSpace>& x_l_space,
60 SmartPtr<const MatrixSpace>& px_l_space,
61 SmartPtr<const VectorSpace>& x_u_space,
62 SmartPtr<const MatrixSpace>& px_u_space,
63 SmartPtr<const VectorSpace>& d_l_space,
64 SmartPtr<const MatrixSpace>& pd_l_space,
65 SmartPtr<const VectorSpace>& d_u_space,
66 SmartPtr<const MatrixSpace>& pd_u_space,
67 SmartPtr<const MatrixSpace>& Jac_c_space,
68 SmartPtr<const MatrixSpace>& Jac_d_space,
69 SmartPtr<const SymMatrixSpace>& Hess_lagrangian_space);
70
72 virtual bool GetBoundsInformation(const Matrix& Px_L,
73 Vector& x_L,
74 const Matrix& Px_U,
75 Vector& x_U,
76 const Matrix& Pd_L,
77 Vector& d_L,
78 const Matrix& Pd_U,
79 Vector& d_U);
80
83 virtual bool GetStartingPoint(
84 SmartPtr<Vector> x,
85 bool need_x,
86 SmartPtr<Vector> y_c,
87 bool need_y_c,
88 SmartPtr<Vector> y_d,
89 bool need_y_d,
90 SmartPtr<Vector> z_L,
91 bool need_z_L,
92 SmartPtr<Vector> z_U,
93 bool need_z_U
94 );
95
98 virtual bool GetWarmStartIterate(IteratesVector& warm_start_iterate);
100
103 virtual bool Eval_f(const Vector& x, Number& f);
104
105 virtual bool Eval_grad_f(const Vector& x, Vector& g_f);
106
107 virtual bool Eval_c(const Vector& x, Vector& c);
108
109 virtual bool Eval_jac_c(const Vector& x, Matrix& jac_c);
110
111 virtual bool Eval_d(const Vector& x, Vector& d);
112
113 virtual bool Eval_jac_d(const Vector& x, Matrix& jac_d);
114
115 virtual bool Eval_h(const Vector& x,
116 Number obj_factor,
117 const Vector& yc,
118 const Vector& yd,
119 SymMatrix& h);
120
121 virtual void GetScalingParameters(
122 const SmartPtr<const VectorSpace> x_space,
123 const SmartPtr<const VectorSpace> c_space,
124 const SmartPtr<const VectorSpace> d_space,
125 Number& obj_scaling,
126 SmartPtr<Vector>& x_scaling,
127 SmartPtr<Vector>& c_scaling,
128 SmartPtr<Vector>& d_scaling) const;
130
133 virtual void FinalizeSolution(SolverReturn status,
134 const Vector& x,
135 const Vector& z_L, const Vector& z_U,
136 const Vector& c, const Vector& d,
137 const Vector& y_c, const Vector& y_d,
138 Number obj_value,
139 const IpoptData* ip_data,
140 IpoptCalculatedQuantities* ip_cq);
141
142 virtual bool IntermediateCallBack(AlgorithmMode mode,
143 Index iter, Number obj_value,
144 Number inf_pr, Number inf_du,
145 Number mu, Number d_norm,
146 Number regularization_size,
147 Number alpha_du, Number alpha_pr,
148 Index ls_trials,
149 const IpoptData* ip_data,
150 IpoptCalculatedQuantities* ip_cq);
152
154 virtual void
155 GetQuasiNewtonApproximationSpaces(SmartPtr<VectorSpace>& approx_space,
156 SmartPtr<Matrix>& P_approx);
157
159 enum FixedVariableTreatmentEnum
160 {
161 MAKE_PARAMETER=0,
162 MAKE_CONSTRAINT,
163 RELAX_BOUNDS
164 };
165
167 enum DerivativeTestEnum
168 {
169 NO_TEST=0,
170 FIRST_ORDER_TEST,
171 SECOND_ORDER_TEST,
172 ONLY_SECOND_ORDER_TEST
173 };
174
176 enum JacobianApproxEnum
177 {
178 JAC_EXACT=0,
179 JAC_FINDIFF_VALUES
180 };
181
183 bool CheckDerivatives(DerivativeTestEnum deriv_test,
184 Index deriv_test_start_index);
185
188 static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
190
192 SmartPtr<TNLP> tnlp() const
193 {
194 return tnlp_;
195 }
196
203 void ResortX(const Vector& x, Number* x_orig);
204 void ResortG(const Vector& c, const Vector& d, Number *g_orig);
205 void ResortBnds(const Vector& x_L, Number* x_L_orig,
206 const Vector& x_U, Number* x_U_orig);
208
209 private:
219 TNLPAdapter(const TNLPAdapter&);
220
222 void operator=(const TNLPAdapter&);
224
227 bool DetermineDependentConstraints(Index n_x_var,
228 const Index* x_not_fixed_map,
229 const Number* x_l, const Number* x_u,
230 const Number* g_l, const Number* g_u,
231 Index n_c, const Index* c_map,
232 std::list<Index>& c_deps);
233
236 SmartPtr<TNLP> tnlp_;
237
239 SmartPtr<const Journalist> jnlst_;
240
243 SmartPtr<TDependencyDetector> dependency_detector_;
244
248 Number nlp_lower_bound_inf_;
250 Number nlp_upper_bound_inf_;
252 FixedVariableTreatmentEnum fixed_variable_treatment_;
253 /* Determines relaxation of fixing bound for RELAX_BOUNDS. */
254 Number bound_relax_factor_;
255 /* Maximal slack for one-sidedly bounded variables. If a
256 * variable has only one bound, say a lower bound xL, then an
257 * upper bound xL + max_onesided_bound_slack_. If this value is
258 * zero, no upper bound is added. */
259 /* Took this out: Number max_onesided_bound_slack_; */
262 DerivativeTestEnum derivative_test_;
264 Number derivative_test_perturbation_;
267 Number derivative_test_tol_;
270 bool derivative_test_print_all_;
272 Index derivative_test_first_index_;
275 bool warm_start_same_structure_;
277 HessianApproximationType hessian_approximation_;
279 Index num_linear_variables_;
281 JacobianApproxEnum jacobian_approximation_;
283 Number findiff_perturbation_;
285 Number point_perturbation_radius_;
288 bool dependency_detection_with_rhs_;
289
291 Number tol_;
293
297 Index n_full_x_;
299 Index n_full_g_;
301 Index nz_jac_c_;
304 Index nz_jac_c_no_extra_;
306 Index nz_jac_d_;
308 Index nz_full_jac_g_;
310 Index nz_full_h_;
312 Index nz_h_;
314 Index n_x_fixed_;
316
318 TNLP::IndexStyleEnum index_style_;
319
322 SmartPtr<const VectorSpace> x_space_;
323 SmartPtr<const VectorSpace> c_space_;
324 SmartPtr<const VectorSpace> d_space_;
325 SmartPtr<const VectorSpace> x_l_space_;
326 SmartPtr<const MatrixSpace> px_l_space_;
327 SmartPtr<const VectorSpace> x_u_space_;
328 SmartPtr<const MatrixSpace> px_u_space_;
329 SmartPtr<const VectorSpace> d_l_space_;
330 SmartPtr<const MatrixSpace> pd_l_space_;
331 SmartPtr<const VectorSpace> d_u_space_;
332 SmartPtr<const MatrixSpace> pd_u_space_;
333 SmartPtr<const MatrixSpace> Jac_c_space_;
334 SmartPtr<const MatrixSpace> Jac_d_space_;
335 SmartPtr<const SymMatrixSpace> Hess_lagrangian_space_;
337
340 Number* full_x_;
341 Number* full_lambda_;
342 Number* full_g_;
343 Number* jac_g_;
344 Number* c_rhs_;
346
349 TaggedObject::Tag x_tag_for_iterates_;
350 TaggedObject::Tag y_c_tag_for_iterates_;
351 TaggedObject::Tag y_d_tag_for_iterates_;
352 TaggedObject::Tag x_tag_for_g_;
353 TaggedObject::Tag x_tag_for_jac_g_;
355
358 bool update_local_x(const Vector& x);
359 bool update_local_lambda(const Vector& y_c, const Vector& y_d);
361
365 bool internal_eval_g(bool new_x);
366 bool internal_eval_jac_g(bool new_x);
368
373 void initialize_findiff_jac(const Index* iRow, const Index* jCol);
375
380 SmartPtr<ExpansionMatrix> P_x_full_x_;
381 SmartPtr<ExpansionMatrixSpace> P_x_full_x_space_;
382
384 SmartPtr<ExpansionMatrix> P_x_x_L_;
385 SmartPtr<ExpansionMatrixSpace> P_x_x_L_space_;
386
388 SmartPtr<ExpansionMatrix> P_x_x_U_;
389 SmartPtr<ExpansionMatrixSpace> P_x_x_U_space_;
390
392 SmartPtr<ExpansionMatrixSpace> P_c_g_space_;
393 SmartPtr<ExpansionMatrix> P_c_g_;
394
396 SmartPtr<ExpansionMatrixSpace> P_d_g_space_;
397 SmartPtr<ExpansionMatrix> P_d_g_;
398
399 Index* jac_idx_map_;
400 Index* h_idx_map_;
401
403 Index* x_fixed_map_;
405
409 Index findiff_jac_nnz_;
412 Index* findiff_jac_ia_;
415 Index* findiff_jac_ja_;
417 Index* findiff_jac_postriplet_;
419 Number* findiff_x_l_;
421 Number* findiff_x_u_;
423 };
424
425 } // namespace Ipopt
426
427 #endif
Ipopt::TNLPAdapter::nlp_upper_bound_inf_
Number nlp_upper_bound_inf_
Value for a upper bound that denotes infinity.
Definition: IpTNLPAdapter.hpp:250
Ipopt::TNLPAdapter::tol_
Number tol_
Overall convergence tolerance.
Definition: IpTNLPAdapter.hpp:291
Ipopt::TNLPAdapter::Eval_grad_f
virtual bool Eval_grad_f(const Vector &x, Vector &g_f)
x
Number * x
Input: Starting point Output: Optimal solution.
Definition: IpStdCInterface.h:238
Ipopt::TNLPAdapter::internal_eval_g
bool internal_eval_g(bool new_x)
Ipopt::TNLPAdapter::n_x_fixed_
Index n_x_fixed_
Number of fixed variables.
Definition: IpTNLPAdapter.hpp:314
Ipopt::TNLPAdapter::derivative_test_first_index_
Index derivative_test_first_index_
Index of first quantity to be checked.
Definition: IpTNLPAdapter.hpp:272
Ipopt::TNLPAdapter
This class Adapts the TNLP interface so it looks like an NLP interface.
Definition: IpTNLPAdapter.hpp:30
Ipopt::TNLPAdapter::Eval_c
virtual bool Eval_c(const Vector &x, Vector &c)
Ipopt::TNLPAdapter::findiff_jac_nnz_
Index findiff_jac_nnz_
Number of unique nonzeros in constraint Jacobian.
Definition: IpTNLPAdapter.hpp:409
Ipopt::TNLPAdapter::findiff_perturbation_
Number findiff_perturbation_
Size of the perturbation for the derivative approximation.
Definition: IpTNLPAdapter.hpp:283
Ipopt::TNLPAdapter::c_rhs_
Number * c_rhs_
the values for the full jacobian of g
Definition: IpTNLPAdapter.hpp:344
Ipopt::TNLPAdapter::x_tag_for_jac_g_
TaggedObject::Tag x_tag_for_jac_g_
Definition: IpTNLPAdapter.hpp:353
Ipopt::TNLPAdapter::RegisterOptions
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
Ipopt::IteratesVector
Specialized CompoundVector class specifically for the algorithm iterates.
Definition: IpIteratesVector.hpp:27
Ipopt::IpoptCalculatedQuantities
Class for all IPOPT specific calculated quantities.
Definition: IpIpoptCalculatedQuantities.hpp:81
Ipopt::TNLPAdapter::FixedVariableTreatmentEnum
FixedVariableTreatmentEnum
Enum for treatment of fixed variables option.
Definition: IpTNLPAdapter.hpp:159
Ipopt::TNLPAdapter::bound_relax_factor_
Number bound_relax_factor_
Definition: IpTNLPAdapter.hpp:254
Ipopt::TNLPAdapter::RELAX_BOUNDS
Definition: IpTNLPAdapter.hpp:163
Ipopt::TNLPAdapter::JacobianApproxEnum
JacobianApproxEnum
Enum for specifying technique for computing Jacobian.
Definition: IpTNLPAdapter.hpp:176
Ipopt::TNLPAdapter::jac_idx_map_
Index * jac_idx_map_
Definition: IpTNLPAdapter.hpp:399
Ipopt::TNLPAdapter::update_local_lambda
bool update_local_lambda(const Vector &y_c, const Vector &y_d)
Ipopt::TNLPAdapter::JAC_FINDIFF_VALUES
Definition: IpTNLPAdapter.hpp:179
Ipopt::TNLPAdapter::index_style_
TNLP::IndexStyleEnum index_style_
Numbering style of variables and constraints.
Definition: IpTNLPAdapter.hpp:318
Ipopt::TNLPAdapter::jacobian_approximation_
JacobianApproxEnum jacobian_approximation_
Flag indicating how Jacobian is computed.
Definition: IpTNLPAdapter.hpp:281
Ipopt::TNLPAdapter::ResortG
void ResortG(const Vector &c, const Vector &d, Number *g_orig)
Ipopt::TNLPAdapter::FIRST_ORDER_TEST
Definition: IpTNLPAdapter.hpp:170
Ipopt::TNLPAdapter::derivative_test_
DerivativeTestEnum derivative_test_
Enum indicating whether and which derivative test should be performed at starting point...
Definition: IpTNLPAdapter.hpp:262
Ipopt::TNLPAdapter::GetStartingPoint
virtual bool GetStartingPoint(SmartPtr< Vector > x, bool need_x, SmartPtr< Vector > y_c, bool need_y_c, SmartPtr< Vector > y_d, bool need_y_d, SmartPtr< Vector > z_L, bool need_z_L, SmartPtr< Vector > z_U, bool need_z_U)
Method for obtaining the starting point for all the iterates.
Ipopt::TNLPAdapter::pd_u_space_
SmartPtr< const MatrixSpace > pd_u_space_
Definition: IpTNLPAdapter.hpp:332
Ipopt::TNLPAdapter::jac_g_
Number * jac_g_
copy of g (c &amp; d)
Definition: IpTNLPAdapter.hpp:343
IpNLP.hpp
Ipopt::TNLPAdapter::ONLY_SECOND_ORDER_TEST
Definition: IpTNLPAdapter.hpp:172
Ipopt::TNLPAdapter::x_fixed_map_
Index * x_fixed_map_
Position of fixed variables.
Definition: IpTNLPAdapter.hpp:403
Ipopt::AlgorithmMode
AlgorithmMode
enum to indicate the mode in which the algorithm is
Definition: IpReturnCodes.hpp:43
Ipopt::TNLPAdapter::ProcessOptions
virtual bool ProcessOptions(const OptionsList &options, const std::string &prefix)
Overload if you want the chance to process options or parameters that may be specific to the NLP...
Ipopt::TNLPAdapter::P_d_g_
SmartPtr< ExpansionMatrix > P_d_g_
Definition: IpTNLPAdapter.hpp:397
Ipopt::TNLPAdapter::GetWarmStartIterate
virtual bool GetWarmStartIterate(IteratesVector &warm_start_iterate)
Method for obtaining an entire iterate as a warmstart point.
Ipopt::Number
double Number
Type of all numbers.
Definition: IpTypes.hpp:17
Ipopt::TNLPAdapter::fixed_variable_treatment_
FixedVariableTreatmentEnum fixed_variable_treatment_
Flag indicating how fixed variables should be handled.
Definition: IpTNLPAdapter.hpp:252
Ipopt::TNLPAdapter::IntermediateCallBack
virtual bool IntermediateCallBack(AlgorithmMode mode, Index iter, Number obj_value, Number inf_pr, Number inf_du, Number mu, Number d_norm, Number regularization_size, Number alpha_du, Number alpha_pr, Index ls_trials, const IpoptData *ip_data, IpoptCalculatedQuantities *ip_cq)
This method is called once per iteration, after the iteration summary output has been printed...
Ipopt::Vector
Vector Base Class.
Definition: IpVector.hpp:47
Ipopt::TNLPAdapter::CheckDerivatives
bool CheckDerivatives(DerivativeTestEnum deriv_test, Index deriv_test_start_index)
Method for performing the derivative test.
Ipopt::TNLPAdapter::dependency_detector_
SmartPtr< TDependencyDetector > dependency_detector_
Object that can be used to detect linearly dependent rows in the equality constraint Jacobian...
Definition: IpTNLPAdapter.hpp:243
Ipopt::TNLPAdapter::Jac_d_space_
SmartPtr< const MatrixSpace > Jac_d_space_
Definition: IpTNLPAdapter.hpp:334
Ipopt::TNLPAdapter::DECLARE_STD_EXCEPTION
DECLARE_STD_EXCEPTION(INVALID_TNLP)
Ipopt::TNLPAdapter::P_x_x_U_
SmartPtr< ExpansionMatrix > P_x_x_U_
Expansion from fixed x_U (ipopt) to full x.
Definition: IpTNLPAdapter.hpp:388
Ipopt::TNLPAdapter::findiff_jac_ia_
Index * findiff_jac_ia_
Start position for nonzero indices in ja for each column of Jacobian
Definition: IpTNLPAdapter.hpp:412
Ipopt::TNLPAdapter::ResortBnds
void ResortBnds(const Vector &x_L, Number *x_L_orig, const Vector &x_U, Number *x_U_orig)
Ipopt::TNLPAdapter::initialize_findiff_jac
void initialize_findiff_jac(const Index *iRow, const Index *jCol)
Initialize sparsity structure for finite difference Jacobian.
Ipopt::TNLPAdapter::findiff_jac_ja_
Index * findiff_jac_ja_
Ordered by columns, for each column the row indices in Jacobian
Definition: IpTNLPAdapter.hpp:415
Ipopt::TNLPAdapter::x_l_space_
SmartPtr< const VectorSpace > x_l_space_
Definition: IpTNLPAdapter.hpp:325
IpOrigIpoptNLP.hpp
Ipopt::TNLPAdapter::n_full_x_
Index n_full_x_
full dimension of x (fixed + non-fixed)
Definition: IpTNLPAdapter.hpp:297
Ipopt::TNLPAdapter::internal_eval_jac_g
bool internal_eval_jac_g(bool new_x)
Ipopt::TNLPAdapter::warm_start_same_structure_
bool warm_start_same_structure_
Flag indicating whether the TNLP with identical structure has already been solved before...
Definition: IpTNLPAdapter.hpp:275
Ipopt::TNLPAdapter::P_x_x_L_
SmartPtr< ExpansionMatrix > P_x_x_L_
Expansion from fixed x_L (ipopt) to full x.
Definition: IpTNLPAdapter.hpp:384
Ipopt::TNLPAdapter::pd_l_space_
SmartPtr< const MatrixSpace > pd_l_space_
Definition: IpTNLPAdapter.hpp:330
Ipopt::TNLPAdapter::y_d_tag_for_iterates_
TaggedObject::Tag y_d_tag_for_iterates_
Definition: IpTNLPAdapter.hpp:351
Ipopt::SymMatrix
This is the base class for all derived symmetric matrix types.
Definition: IpSymMatrix.hpp:23
Ipopt::SmartPtr
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:172
Ipopt::TNLPAdapter::x_tag_for_g_
TaggedObject::Tag x_tag_for_g_
Definition: IpTNLPAdapter.hpp:352
Ipopt::TNLPAdapter::derivative_test_tol_
Number derivative_test_tol_
Relative threshold for marking deviation from finite difference test.
Definition: IpTNLPAdapter.hpp:267
Ipopt::OptionsList
This class stores a list of user set options.
Definition: IpOptionsList.hpp:32
Ipopt::TNLPAdapter::operator=
void operator=(const TNLPAdapter &)
Overloaded Equals Operator.
Ipopt::TNLPAdapter::P_d_g_space_
SmartPtr< ExpansionMatrixSpace > P_d_g_space_
Expansion from d only (ipopt) to full ampl d.
Definition: IpTNLPAdapter.hpp:396
Ipopt::TNLPAdapter::derivative_test_print_all_
bool derivative_test_print_all_
Flag indicating if all test values should be printed, or only those violating the threshold...
Definition: IpTNLPAdapter.hpp:270
Ipopt::SolverReturn
SolverReturn
enum for the return from the optimize algorithm (obviously we need to add more)
Definition: IpAlgTypes.hpp:22
Ipopt::TNLPAdapter::findiff_x_l_
Number * findiff_x_l_
Copy of the lower bounds.
Definition: IpTNLPAdapter.hpp:419
Ipopt::TNLPAdapter::y_c_tag_for_iterates_
TaggedObject::Tag y_c_tag_for_iterates_
Definition: IpTNLPAdapter.hpp:350
Ipopt::TNLPAdapter::Eval_jac_d
virtual bool Eval_jac_d(const Vector &x, Matrix &jac_d)
Ipopt::TNLPAdapter::jnlst_
SmartPtr< const Journalist > jnlst_
Journalist.
Definition: IpTNLPAdapter.hpp:239
Ipopt::Matrix
Matrix Base Class.
Definition: IpMatrix.hpp:27
Ipopt::TNLPAdapter::nz_jac_c_
Index nz_jac_c_
non-zeros of the jacobian of c
Definition: IpTNLPAdapter.hpp:301
Ipopt::TNLPAdapter::DetermineDependentConstraints
bool DetermineDependentConstraints(Index n_x_var, const Index *x_not_fixed_map, const Number *x_l, const Number *x_u, const Number *g_l, const Number *g_u, Index n_c, const Index *c_map, std::list< Index > &c_deps)
Ipopt::HessianApproximationType
HessianApproximationType
enumeration for the Hessian information type.
Definition: IpOrigIpoptNLP.hpp:20
Ipopt::TNLPAdapter::findiff_jac_postriplet_
Index * findiff_jac_postriplet_
Position of entry in original triplet matrix.
Definition: IpTNLPAdapter.hpp:417
Ipopt::TNLPAdapter::n_full_g_
Index n_full_g_
full dimension of g (c + d)
Definition: IpTNLPAdapter.hpp:299
Ipopt::IpoptData
Class to organize all the data required by the algorithm.
Definition: IpIpoptData.hpp:83
Ipopt::TNLPAdapter::nz_jac_d_
Index nz_jac_d_
non-zeros of the jacobian of d
Definition: IpTNLPAdapter.hpp:306
Ipopt::TNLPAdapter::GetScalingParameters
virtual void GetScalingParameters(const SmartPtr< const VectorSpace > x_space, const SmartPtr< const VectorSpace > c_space, const SmartPtr< const VectorSpace > d_space, Number &obj_scaling, SmartPtr< Vector > &x_scaling, SmartPtr< Vector > &c_scaling, SmartPtr< Vector > &d_scaling) const
Routines to get the scaling parameters.
Ipopt::TNLPAdapter::DerivativeTestEnum
DerivativeTestEnum
Enum for specifying which derivative test is to be performed.
Definition: IpTNLPAdapter.hpp:167
Ipopt::TNLPAdapter::Eval_jac_c
virtual bool Eval_jac_c(const Vector &x, Matrix &jac_c)
Ipopt::TNLPAdapter::SECOND_ORDER_TEST
Definition: IpTNLPAdapter.hpp:171
Ipopt::TNLPAdapter::num_linear_variables_
Index num_linear_variables_
Number of linear variables.
Definition: IpTNLPAdapter.hpp:279
x_L
Number * x_L
Lower bounds on variables.
Definition: IpStdCInterface.h:137
Ipopt::TNLPAdapter::update_local_x
bool update_local_x(const Vector &x)
Ipopt::TNLPAdapter::MAKE_CONSTRAINT
Definition: IpTNLPAdapter.hpp:162
Ipopt::TNLPAdapter::px_u_space_
SmartPtr< const MatrixSpace > px_u_space_
Definition: IpTNLPAdapter.hpp:328
Ipopt::TNLPAdapter::P_x_full_x_space_
SmartPtr< ExpansionMatrixSpace > P_x_full_x_space_
Definition: IpTNLPAdapter.hpp:381
Ipopt::Index
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:19
Ipopt::TNLPAdapter::P_x_x_U_space_
SmartPtr< ExpansionMatrixSpace > P_x_x_U_space_
Definition: IpTNLPAdapter.hpp:389
x_U
Number Number * x_U
Upper bounds on variables.
Definition: IpStdCInterface.h:137
Ipopt::TNLPAdapter::P_c_g_
SmartPtr< ExpansionMatrix > P_c_g_
Definition: IpTNLPAdapter.hpp:393
Ipopt::TNLPAdapter::nlp_lower_bound_inf_
Number nlp_lower_bound_inf_
Value for a lower bound that denotes -infinity.
Definition: IpTNLPAdapter.hpp:248
Ipopt::TNLPAdapter::ResortX
void ResortX(const Vector &x, Number *x_orig)
Sort the primal variables, and add the fixed values in x.
x_scaling
Number Number * x_scaling
Definition: IpStdCInterface.h:210
Ipopt::TNLPAdapter::GetQuasiNewtonApproximationSpaces
virtual void GetQuasiNewtonApproximationSpaces(SmartPtr< VectorSpace > &approx_space, SmartPtr< Matrix > &P_approx)
Method returning information on quasi-Newton approximation.
Ipopt::TNLPAdapter::TNLPAdapter
TNLPAdapter(const SmartPtr< TNLP > tnlp, const SmartPtr< const Journalist > jnlst=NULL)
Default constructor.
Ipopt::TaggedObject::Tag
unsigned int Tag
Type for the Tag values.
Definition: IpTaggedObject.hpp:80
Ipopt::TNLPAdapter::c_space_
SmartPtr< const VectorSpace > c_space_
Definition: IpTNLPAdapter.hpp:323
IpTNLP.hpp
Ipopt::TNLPAdapter::tnlp_
SmartPtr< TNLP > tnlp_
Pointer to the TNLP class (class specific to Number* vectors and harwell triplet matrices) ...
Definition: IpTNLPAdapter.hpp:236
Ipopt::TNLPAdapter::NO_TEST
Definition: IpTNLPAdapter.hpp:169
Ipopt::NLP
Brief Class Description.
Definition: IpNLP.hpp:31
Ipopt::TNLPAdapter::hessian_approximation_
HessianApproximationType hessian_approximation_
Flag indicating what Hessian information is to be used.
Definition: IpTNLPAdapter.hpp:277
Ipopt::TNLPAdapter::nz_jac_c_no_extra_
Index nz_jac_c_no_extra_
non-zeros of the jacobian of c without added constraints for fixed variables.
Definition: IpTNLPAdapter.hpp:304
Ipopt::TNLPAdapter::P_c_g_space_
SmartPtr< ExpansionMatrixSpace > P_c_g_space_
Expansion from c only (ipopt) to full ampl c.
Definition: IpTNLPAdapter.hpp:392
Ipopt::TNLPAdapter::dependency_detection_with_rhs_
bool dependency_detection_with_rhs_
Flag indicating if rhs should be considered during dependency detection.
Definition: IpTNLPAdapter.hpp:288
Ipopt::TNLPAdapter::d_l_space_
SmartPtr< const VectorSpace > d_l_space_
Definition: IpTNLPAdapter.hpp:329
Ipopt::TNLPAdapter::d_u_space_
SmartPtr< const VectorSpace > d_u_space_
Definition: IpTNLPAdapter.hpp:331
Ipopt::TNLPAdapter::nz_full_jac_g_
Index nz_full_jac_g_
number of non-zeros in full-size Jacobian of g
Definition: IpTNLPAdapter.hpp:308
Ipopt::TNLPAdapter::derivative_test_perturbation_
Number derivative_test_perturbation_
Size of the perturbation for the derivative test.
Definition: IpTNLPAdapter.hpp:264
Ipopt::TNLPAdapter::P_x_full_x_
SmartPtr< ExpansionMatrix > P_x_full_x_
Expansion from fixed x (ipopt) to full x.
Definition: IpTNLPAdapter.hpp:380
Ipopt::TNLPAdapter::Eval_h
virtual bool Eval_h(const Vector &x, Number obj_factor, const Vector &yc, const Vector &yd, SymMatrix &h)
Ipopt::TNLPAdapter::FinalizeSolution
virtual void FinalizeSolution(SolverReturn status, const Vector &x, const Vector &z_L, const Vector &z_U, const Vector &c, const Vector &d, const Vector &y_c, const Vector &y_d, Number obj_value, const IpoptData *ip_data, IpoptCalculatedQuantities *ip_cq)
This method is called at the very end of the optimization.
Ipopt::TNLP::IndexStyleEnum
IndexStyleEnum
overload this method to return the number of variables and constraints, and the number of non-zeros i...
Definition: IpTNLP.hpp:80
Ipopt::TNLPAdapter::JAC_EXACT
Definition: IpTNLPAdapter.hpp:178
Ipopt::TNLPAdapter::Hess_lagrangian_space_
SmartPtr< const SymMatrixSpace > Hess_lagrangian_space_
Definition: IpTNLPAdapter.hpp:335
Ipopt::TNLPAdapter::P_x_x_L_space_
SmartPtr< ExpansionMatrixSpace > P_x_x_L_space_
Definition: IpTNLPAdapter.hpp:385
Ipopt::TNLPAdapter::Jac_c_space_
SmartPtr< const MatrixSpace > Jac_c_space_
Definition: IpTNLPAdapter.hpp:333
Ipopt::TNLPAdapter::full_lambda_
Number * full_lambda_
copy of the full x vector (fixed &amp; non-fixed)
Definition: IpTNLPAdapter.hpp:341
Ipopt::TNLPAdapter::GetSpaces
virtual bool GetSpaces(SmartPtr< const VectorSpace > &x_space, SmartPtr< const VectorSpace > &c_space, SmartPtr< const VectorSpace > &d_space, SmartPtr< const VectorSpace > &x_l_space, SmartPtr< const MatrixSpace > &px_l_space, SmartPtr< const VectorSpace > &x_u_space, SmartPtr< const MatrixSpace > &px_u_space, SmartPtr< const VectorSpace > &d_l_space, SmartPtr< const MatrixSpace > &pd_l_space, SmartPtr< const VectorSpace > &d_u_space, SmartPtr< const MatrixSpace > &pd_u_space, SmartPtr< const MatrixSpace > &Jac_c_space, SmartPtr< const MatrixSpace > &Jac_d_space, SmartPtr< const SymMatrixSpace > &Hess_lagrangian_space)
Method for creating the derived vector / matrix types (Do not delete these, the ).
Ipopt::TNLPAdapter::nz_h_
Index nz_h_
number of non-zeros in the non-fixed-size Hessian
Definition: IpTNLPAdapter.hpp:312
obj_scaling
Number obj_scaling
Definition: IpStdCInterface.h:210
Ipopt::TNLPAdapter::~TNLPAdapter
virtual ~TNLPAdapter()
Default destructor.
Ipopt::TNLPAdapter::findiff_x_u_
Number * findiff_x_u_
Copy of the upper bounds.
Definition: IpTNLPAdapter.hpp:421
Ipopt::TNLPAdapter::d_space_
SmartPtr< const VectorSpace > d_space_
Definition: IpTNLPAdapter.hpp:324
Ipopt::TNLPAdapter::point_perturbation_radius_
Number point_perturbation_radius_
Maximal perturbation of the initial point.
Definition: IpTNLPAdapter.hpp:285
Ipopt::TNLPAdapter::MAKE_PARAMETER
Definition: IpTNLPAdapter.hpp:161
Ipopt::TNLPAdapter::Eval_d
virtual bool Eval_d(const Vector &x, Vector &d)
Ipopt::TNLPAdapter::x_tag_for_iterates_
TaggedObject::Tag x_tag_for_iterates_
Definition: IpTNLPAdapter.hpp:349
Ipopt::TNLPAdapter::tnlp
SmartPtr< TNLP > tnlp() const
Accessor method for the underlying TNLP.
Definition: IpTNLPAdapter.hpp:192
Ipopt::TNLPAdapter::full_x_
Number * full_x_
Definition: IpTNLPAdapter.hpp:340
Ipopt::TNLPAdapter::Eval_f
virtual bool Eval_f(const Vector &x, Number &f)
Ipopt::TNLPAdapter::h_idx_map_
Index * h_idx_map_
Definition: IpTNLPAdapter.hpp:400
Ipopt::TNLPAdapter::nz_full_h_
Index nz_full_h_
number of non-zeros in full-size Hessian
Definition: IpTNLPAdapter.hpp:310
Ipopt::TNLPAdapter::full_g_
Number * full_g_
copy of lambda (yc &amp; yd)
Definition: IpTNLPAdapter.hpp:342
Ipopt::TNLPAdapter::GetBoundsInformation
virtual bool GetBoundsInformation(const Matrix &Px_L, Vector &x_L, const Matrix &Px_U, Vector &x_U, const Matrix &Pd_L, Vector &d_L, const Matrix &Pd_U, Vector &d_U)
Method for obtaining the bounds information.
Ipopt::TNLPAdapter::x_space_
SmartPtr< const VectorSpace > x_space_
Definition: IpTNLPAdapter.hpp:322
Ipopt::TNLPAdapter::x_u_space_
SmartPtr< const VectorSpace > x_u_space_
Definition: IpTNLPAdapter.hpp:327
Ipopt::TNLPAdapter::px_l_space_
SmartPtr< const MatrixSpace > px_l_space_
Definition: IpTNLPAdapter.hpp:326