Go to the documentation of this file.
7 #ifndef __IPORIGIPOPTNLP_HPP__
8 #define __IPORIGIPOPTNLP_HPP__
85 const std::string& prefix
109 return nlp_->GetWarmStartIterate(warm_start_iterate);
315 virtual Index f_evals()
const
322 return grad_f_evals_;
347 void FinalizeSolution(
370 Number regularization_size,
522 Number bound_relax_factor,
virtual bool InitializeStructures(SmartPtr< Vector > &x, bool init_x, SmartPtr< Vector > &y_c, bool init_y_c, SmartPtr< Vector > &y_d, bool init_y_d, SmartPtr< Vector > &z_L, bool init_z_L, SmartPtr< Vector > &z_U, bool init_z_U, SmartPtr< Vector > &v_L, SmartPtr< Vector > &v_U)
Initialize (create) structures for the iteration data.
CachedResults< SmartPtr< const Vector > > d_cache_
Inequality constraint residual (reformulated as equalities with slacks.
virtual SmartPtr< const Vector > orig_d_L() const
Original unscaled lower bounds on d.
CachedResults< SmartPtr< const Vector > > c_cache_
Equality constraint residuals.
SmartPtr< const Matrix > Px_L_
Permutation matrix (x_L_ -> x)
SmartPtr< const MatrixSpace > pd_l_space_
Class to organize all the data required by the algorithm.
virtual Number f(const Vector &x)
Accessor methods for model data.
HessianApproximationType
enumeration for the Hessian information type.
SmartPtr< const VectorSpace > x_u_space_
SmartPtr< const VectorSpace > x_l_space_
SmartPtr< const MatrixSpace > scaled_jac_c_space_
virtual SmartPtr< const VectorSpace > x_space() const
x_space
This class collects all timing statistics for Ipopt.
bool hessian_constant_
Flag indicating if we need to ask for Hessian only once.
SmartPtr< const SymMatrixSpace > h_space_
SmartPtr< NLP > nlp()
Accessor method to the underlying NLP.
bool check_derivatives_for_naninf_
Flag indicating whether it is desired to check if there are Nan or Inf entries in first and second de...
Class for all IPOPT specific calculated quantities.
SmartPtr< const MatrixSpace > jac_d_space_
CachedResults< SmartPtr< const Vector > > unscaled_x_cache_
Unscaled version of x vector.
virtual SmartPtr< const Matrix > Px_L() const
Permutation matrix (x_L_ -> x)
This file contains a base class for all exceptions and a set of macros to help with exceptions.
SmartPtr< const Vector > orig_d_U_
Original unmodified upper bounds on d.
Number bound_relax_factor_
relaxation factor for the bounds
virtual SmartPtr< const Matrix > Pd_L() const
Permutation matrix (d_L_ -> d)
virtual bool GetWarmStartIterate(IteratesVector &warm_start_iterate)
Method accessing the GetWarmStartIterate of the NLP.
virtual SmartPtr< const Vector > orig_d_U() const
Original unscaled upper bounds on d.
CachedResults< SmartPtr< const Matrix > > jac_c_cache_
Jacobian Matrix for equality constraints (current iteration)
virtual SmartPtr< const Vector > orig_x_U() const
Original unscaled upper bounds on x.
HessianApproximationSpace
enumeration for the Hessian approximation space.
virtual SmartPtr< const Vector > d_U() const
Scaled upper bounds on d.
virtual Index h_evals() const
SmartPtr< const MatrixSpace > jac_c_space_
HessianApproximationType hessian_approximation_
Flag indicating what Hessian information is to be used.
bool initialized_
Flag indicating if initialization method has been called.
SmartPtr< const Vector > x_L_
Lower bounds on x.
OrigIpoptNLP()
Default Constructor.
SmartPtr< const MatrixSpace > px_u_space_
virtual SmartPtr< const Vector > grad_f(const Vector &x, Number mu)
Gradient of the objective (depending in mu) - incorrect version for OrigIpoptNLP.
OrigIpoptNLP(const OrigIpoptNLP &)
Copy Constructor.
bool honor_original_bounds_
Flag indicating whether the primal variables should be projected back into original bounds are optimi...
Number constr_viol_tol_
constraint violation tolerance (from OptimalityErrorConvergenceCheck)
virtual Index jac_d_evals() const
Template class for Smart Pointers.
CachedResults< SmartPtr< const SymMatrix > > h_cache_
Hessian of the lagrangian (current iteration)
CachedResults< Number > f_cache_
Objective function.
SmartPtr< const Journalist > jnlst_
Journalist.
virtual ~OrigIpoptNLP()
Destructor.
SmartPtr< NLP > nlp_
Pointer to the NLP.
CachedResults< SmartPtr< const Matrix > > jac_d_cache_
Jacobian Matrix for inequality constraints (current iteration)
ipindex Index
Type of all indices of vectors, matrices etc.
virtual Index jac_c_evals() const
OrigIpoptNLP(const SmartPtr< const Journalist > &jnlst, const SmartPtr< NLP > &nlp, const SmartPtr< NLPScalingObject > &nlp_scaling, TimingStatistics &timing_statistics)
Constructor.
SmartPtr< const Matrix > Pd_L_
Permutation matrix (d_L_ -> d)
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
Called to register the options.
ipnumber Number
Type of all numbers.
virtual void 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)
Accessor method for vector/matrix spaces pointers.
SmartPtr< const Matrix > Px_U_
Permutation matrix (x_U_ -> x)
virtual SmartPtr< const SymMatrix > h(const Vector &x, Number obj_factor, const Vector &yc, const Vector &yd)
Hessian of the Lagrangian.
SmartPtr< const Vector > orig_d_L_
Original unmodified lower bounds on d.
virtual Number f(const Vector &x, Number mu)
Objective value (depending in mu) - incorrect version for OrigIpoptNLP.
virtual Index d_evals() const
This class maps the traditional NLP into something that is more useful for Ipopt.
SmartPtr< const VectorSpace > d_l_space_
Class responsible for all message output.
SmartPtr< const VectorSpace > d_u_space_
CachedResults< SmartPtr< const Vector > > grad_f_cache_
Gradient of the objective function.
bool grad_f_constant_
Flag indicating if we need to ask for objective Gradient only once.
SmartPtr< const Vector > orig_x_L_
Original unmodified lower bounds on x.
virtual SmartPtr< const SymMatrixSpace > HessianMatrixSpace() const
Accessor method to obtain the MatrixSpace for the Hessian matrix (or it's approximation)
virtual SmartPtr< const Vector > x_U() const
Scaled upper bounds on x.
virtual void AdjustVariableBounds(const Vector &new_x_L, const Vector &new_x_U, const Vector &new_d_L, const Vector &new_d_U)
Method for adapting the variable bounds.
SmartPtr< const VectorSpace > d_space_
virtual SmartPtr< const SymMatrix > uninitialized_h()
Provides a Hessian matrix from the correct matrix space with uninitialized values.
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, SmartPtr< const IpoptData > ip_data, SmartPtr< IpoptCalculatedQuantities > ip_cq)
SmartPtr< const MatrixSpace > scaled_jac_d_space_
virtual SmartPtr< const Vector > d_L() const
Scaled lower bounds on d.
virtual Index grad_f_evals() const
virtual SmartPtr< const Vector > d(const Vector &x)
Inequality constraint residual (reformulated as equalities with slacks)
virtual Index c_evals() const
void operator=(const OrigIpoptNLP &)
Overloaded Assignment Operator.
virtual SmartPtr< const Matrix > Px_U() const
Permutation matrix (x_U_ -> x)
virtual SmartPtr< const SymMatrix > h(const Vector &x, Number obj_factor, const Vector &yc, const Vector &yd, Number mu)
Hessian of the Lagrangian (depending in mu) - incorrect version for OrigIpoptNLP.
HessianApproximationSpace hessian_approximation_space_
Flag indicating in which space Hessian is to be approximated.
bool jac_d_constant_
Flag indicating if we need to ask for inequality constraint Jacobians only once.
virtual SmartPtr< const Matrix > Pd_U() const
Permutation matrix (d_U_ -> d)
SolverReturn
enum for the return from the optimize algorithm
virtual SmartPtr< const Vector > grad_f(const Vector &x)
Gradient of the objective.
SmartPtr< const MatrixSpace > px_l_space_
SmartPtr< const VectorSpace > c_space_
virtual SmartPtr< const Vector > c(const Vector &x)
Equality constraint residual.
SmartPtr< const Vector > d_U_
Upper bounds on d.
This class stores a list of user set options.
virtual SmartPtr< const Matrix > jac_c(const Vector &x)
Jacobian Matrix for equality constraints.
SmartPtr< const SymMatrixSpace > scaled_h_space_
bool jac_c_constant_
Flag indicating if we need to ask for equality constraint Jacobians only once.
SmartPtr< const Matrix > Pd_U_
Permutation matrix (d_U_ -> d)
SmartPtr< const Vector > orig_x_U_
Original unmodified upper bounds on x.
SmartPtr< const MatrixSpace > pd_u_space_
virtual bool Initialize(const Journalist &jnlst, const OptionsList &options, const std::string &prefix)
Initialization method.
virtual SmartPtr< const Vector > orig_x_L() const
Original unscaled lower bounds on x.
SmartPtr< const Vector > d_L_
Lower bounds on d.
virtual SmartPtr< const Vector > x_L() const
Scaled lower bounds on x.
AlgorithmMode
enum to indicate the mode in which the algorithm is
void relax_bounds(Number bound_relax_factor, Vector &bounds)
relax the bounds by a relative move of relax_bound_factor.
This is the abstract base class for classes that map the traditional NLP into something that is more ...
bool warm_start_same_structure_
Flag indicating whether the TNLP with identical structure has already been solved before.
Specialized CompoundVector class specifically for the algorithm iterates.
SmartPtr< const Vector > get_unscaled_x(const Vector &x)
Method for getting the unscaled version of the x vector.
virtual SmartPtr< const Matrix > jac_d(const Vector &x)
Jacobian Matrix for inequality constraints.
SmartPtr< const Vector > x_U_
Upper bounds on x.