Go to the documentation of this file.
7 #ifndef __IPTNLPADAPTER_HPP__
8 #define __IPTNLPADAPTER_HPP__
19 class ExpansionMatrix;
20 class ExpansionMatrixSpace;
22 class TDependencyDetector;
52 virtual bool ProcessOptions(
54 const std::string& prefix
61 virtual bool GetSpaces(
79 virtual bool GetBoundsInformation(
91 virtual bool GetStartingPoint(
108 virtual bool GetWarmStartIterate(
120 virtual bool Eval_grad_f(
130 virtual bool Eval_jac_c(
140 virtual bool Eval_jac_d(
153 virtual void GetScalingParameters(
166 virtual void FinalizeSolution(
180 virtual bool IntermediateCallBack(
188 Number regularization_size,
198 virtual void GetQuasiNewtonApproximationSpaces(
217 ONLY_SECOND_ORDER_TEST
228 bool CheckDerivatives(
229 DerivativeTestEnum deriv_test,
230 Index deriv_test_start_index
233 static void RegisterOptions(
292 bool DetermineDependentConstraints(
294 const Index* x_not_fixed_map,
301 std::list<Index>& c_deps);
419 bool update_local_x(
const Vector& x);
420 bool update_local_lambda(
const Vector& y_c,
const Vector& y_d);
428 bool internal_eval_g(
bool new_x);
429 bool internal_eval_jac_g(
bool new_x);
435 void initialize_findiff_jac(
const Index* iRow,
const Index* jCol);
Index num_linear_variables_
Number of linear variables.
Number tol_
Overall convergence tolerance.
Number nlp_lower_bound_inf_
Value for a lower bound that denotes -infinity.
SmartPtr< ExpansionMatrix > P_d_g_
Class to organize all the data required by the algorithm.
HessianApproximationType
enumeration for the Hessian information type.
SmartPtr< TNLP > tnlp_
Pointer to the TNLP class (class specific to Number* vectors and triplet matrices)
Index * findiff_jac_postriplet_
Position of entry in original triplet matrix.
Index n_full_g_
full dimension of g (c + d)
SmartPtr< ExpansionMatrix > P_c_g_
Number findiff_perturbation_
Size of the perturbation for the derivative approximation.
Number * c_rhs_
the values for the full jacobian of g
Index findiff_jac_nnz_
Number of unique nonzeros in constraint Jacobian.
Class for all IPOPT specific calculated quantities.
DerivativeTestEnum derivative_test_
Maximal slack for one-sidedly bounded variables.
This file contains a base class for all exceptions and a set of macros to help with exceptions.
FixedVariableTreatmentEnum
Enum for treatment of fixed variables option.
double Number
Type of all numbers.
Number derivative_test_perturbation_
Size of the perturbation for the derivative test.
SmartPtr< ExpansionMatrix > P_x_x_L_
Expansion from fixed x_L (ipopt) to full x.
SmartPtr< ExpansionMatrixSpace > P_x_x_L_space_
SmartPtr< ExpansionMatrixSpace > P_c_g_space_
Expansion from c only (ipopt) to full ampl c.
Index nz_full_jac_g_
number of non-zeros in full-size Jacobian of g
Index n_x_fixed_
Number of fixed variables.
FixedVariableTreatmentEnum fixed_variable_treatment_
Flag indicating how fixed variables should be handled.
bool dependency_detection_with_rhs_
Flag indicating if rhs should be considered during dependency detection.
Number * findiff_x_u_
Copy of the upper bounds.
SmartPtr< const VectorSpace > d_space_
Number bound_relax_factor_
Determines relaxation of fixing bound for RELAX_BOUNDS.
Index nz_h_
number of non-zeros in the non-fixed-size Hessian
int Index
Type of all indices of vectors, matrices etc.
SmartPtr< const MatrixSpace > pd_u_space_
HessianApproximationType hessian_approximation_
Flag indicating what Hessian information is to be used.
Template class for Smart Pointers.
Number * full_g_
copy of lambda (yc & yd)
Number * findiff_x_l_
Copy of the lower bounds.
bool warm_start_same_structure_
Flag indicating whether the TNLP with identical structure has already been solved before.
Number point_perturbation_radius_
Maximal perturbation of the initial point.
SmartPtr< const VectorSpace > x_space_
SmartPtr< const MatrixSpace > px_l_space_
Index nz_jac_c_
non-zeros of the jacobian of c
SmartPtr< const VectorSpace > x_l_space_
SmartPtr< ExpansionMatrixSpace > P_x_x_U_space_
Index * x_fixed_map_
Position of fixed variables.
SmartPtr< const SymMatrixSpace > Hess_lagrangian_space_
Index derivative_test_first_index_
Index of first quantity to be checked.
This class adapts the TNLP interface so it looks like an NLP interface.
Number * jac_g_
copy of g (c & d)
SmartPtr< const VectorSpace > d_l_space_
bool derivative_test_print_all_
Flag indicating if all test values should be printed, or only those violating the threshold.
SmartPtr< ExpansionMatrixSpace > P_x_full_x_space_
SmartPtr< const MatrixSpace > Jac_d_space_
SmartPtr< const VectorSpace > c_space_
SmartPtr< TDependencyDetector > dependency_detector_
Object that can be used to detect linearly dependent rows in the equality constraint Jacobian.
TaggedObject::Tag y_c_tag_for_iterates_
This is the base class for all derived symmetric matrix types.
DerivativeTestEnum
Enum for specifying which derivative test is to be performed.
SmartPtr< const VectorSpace > x_u_space_
Index nz_jac_c_no_extra_
non-zeros of the jacobian of c without added constraints for fixed variables.
Number derivative_test_tol_
Relative threshold for marking deviation from finite difference test.
JacobianApproxEnum jacobian_approximation_
Flag indicating how Jacobian is computed.
Number * full_lambda_
copy of the full x vector (fixed & non-fixed)
SmartPtr< const VectorSpace > d_u_space_
TaggedObject::Tag x_tag_for_iterates_
unsigned int Tag
Type for the Tag values.
SmartPtr< const MatrixSpace > Jac_c_space_
SmartPtr< const MatrixSpace > pd_l_space_
Index * findiff_jac_ia_
Start position for nonzero indices in ja for each column of Jacobian.
DECLARE_STD_EXCEPTION(FATAL_ERROR_IN_LINEAR_SOLVER)
SmartPtr< TNLP > tnlp() const
Accessor method for the underlying TNLP.
Index nz_jac_d_
non-zeros of the jacobian of d
SolverReturn
enum for the return from the optimize algorithm
SmartPtr< ExpansionMatrixSpace > P_d_g_space_
Expansion from d only (ipopt) to full ampl d.
JacobianApproxEnum
Enum for specifying technique for computing Jacobian.
This class stores a list of user set options.
TaggedObject::Tag y_d_tag_for_iterates_
TNLP::IndexStyleEnum index_style_
Numbering style of variables and constraints.
Number nlp_upper_bound_inf_
Value for a upper bound that denotes infinity.
Index * findiff_jac_ja_
Ordered by columns, for each column the row indices in Jacobian.
SmartPtr< const MatrixSpace > px_u_space_
SmartPtr< const Journalist > jnlst_
Journalist.
Index n_full_x_
full dimension of x (fixed + non-fixed)
SmartPtr< ExpansionMatrix > P_x_full_x_
Expansion from fixed x (ipopt) to full x.
TaggedObject::Tag x_tag_for_jac_g_
TaggedObject::Tag x_tag_for_g_
AlgorithmMode
enum to indicate the mode in which the algorithm is
Index nz_full_h_
number of non-zeros in full-size Hessian
Specialized CompoundVector class specifically for the algorithm iterates.
SmartPtr< ExpansionMatrix > P_x_x_U_
Expansion from fixed x_U (ipopt) to full x.