Go to the documentation of this file.
9 #ifndef __IPRESTOIPOPTNLP_HPP__
10 #define __IPRESTOIPOPTNLP_HPP__
48 const std::string& prefix);
225 Number regularization_size,
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< Vector > x_ref_
$x$ part of the reference point in the regularization term
virtual bool objective_depends_on_mu() const
Accessor methods for model data.
This class maps the traditional NLP into something that is more useful by Ipopt.
Class to organize all the data required by the algorithm.
HessianApproximationType
enumeration for the Hessian information type.
Number eta_factor_
scaling factor for eta calculation
HessianApproximationType hessian_approximation_
Flag indicating how hessian information is obtained.
SmartPtr< CompoundMatrix > Pd_L_
Permutation matrix (d_L_ -> d)
SmartPtr< CompoundMatrixSpace > px_u_space_
virtual bool GetWarmStartIterate(IteratesVector &warm_start_iterate)
Method accessing the GetWarmStartIterate of the NLP.
virtual Index c_evals() const
Class for all IPOPT specific calculated quantities.
virtual SmartPtr< const SymMatrixSpace > HessianMatrixSpace() const
Accessor method to obtain the MatrixSpace for the Hessian matrix (or it's approximation)
virtual SmartPtr< const Vector > d_U() const
Upper bounds on d.
double Number
Type of all numbers.
virtual SmartPtr< const SymMatrix > h(const Vector &x, Number obj_factor, const Vector &yc, const Vector &yd)
Hessian of the Lagrangian (incorrect version for restoration phase)
virtual Number f(const Vector &x)
Objective value (incorrect version for restoration phase)
virtual SmartPtr< const Matrix > jac_d(const Vector &x)
Jacobian Matrix for inequality constraints.
SmartPtr< CompoundVectorSpace > x_u_space_
SmartPtr< CompoundMatrixSpace > pd_l_space_
SmartPtr< CompoundVectorSpace > d_u_space_
~RestoIpoptNLP()
Default destructor.
virtual SmartPtr< const Matrix > Px_L() const
Permutation matrix (x_L_ -> x)
Number * x
Input: Starting point Output: Optimal solution.
SmartPtr< CompoundVector > d_U_
Upper bounds on d.
virtual SmartPtr< const SymMatrix > uninitialized_h()
Provides a Hessian matrix from the correct matrix space with uninitialized values.
Number Eta(Number mu) const
Method to calculate eta, the factor for the regularization term.
virtual SmartPtr< const Matrix > Pd_L() const
Permutation matrix (d_L_ -> d)
SmartPtr< Vector > dr_x_
Scaling factors for the $x$ part of the regularization term.
virtual SmartPtr< const Matrix > jac_c(const Vector &x)
Jacobian Matrix for equality constraints.
SmartPtr< CompoundMatrixSpace > px_l_space_
int Index
Type of all indices of vectors, matrices etc.
virtual bool Initialize(const Journalist &jnlst, const OptionsList &options, const std::string &prefix)
Initialize - overloaded from IpoptNLP.
IpoptNLP & OrigIpNLP() const
U * GetRawPtr(const SmartPtr< U > &smart_ptr)
virtual SmartPtr< const Matrix > Pd_U() const
Permutation matrix (d_U_ -> d.
Template class for Smart Pointers.
virtual SmartPtr< const Vector > c(const Vector &x)
Equality constraint residual.
IpoptCalculatedQuantities & OrigIpCq() const
SmartPtr< CompoundVectorSpace > x_space_
Necessary Vector/Matrix spaces.
virtual Index d_evals() const
SmartPtr< CompoundVector > x_L_
Lower bounds on x.
SmartPtr< CompoundMatrix > Px_U_
Permutation matrix (x_U_ -> x)
SmartPtr< CompoundMatrix > Pd_U_
Permutation matrix (d_U_ -> d.
virtual Index grad_f_evals() const
SmartPtr< CompoundVector > x_U_
Upper bounds on x.
Number rho_
Penalty parameter for the $l_1$ norm.
SmartPtr< const Vector > DR_x() const
Method returning the scaling factors for the 2-norm penalization term.
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.
RestoIpoptNLP()
Default Constructor.
SmartPtr< CompoundVector > d_L_
Lower bounds on d.
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)
Solution Routines - overloaded from IpoptNLP.
virtual SmartPtr< const Vector > d_L() const
Lower bounds on d.
virtual Index jac_c_evals() const
SmartPtr< CompoundMatrix > Px_L_
Permutation matrix (x_L_ -> x)
virtual SmartPtr< const Vector > grad_f(const Vector &x)
Gradient of the objective (incorrect version for restoration phase)
SmartPtr< const U > ConstPtr(const SmartPtr< U > &smart_ptr)
Class responsible for all message output.
virtual SmartPtr< const Vector > d(const Vector &x)
Inequality constraint residual (reformulated as equalities with slacks.
virtual SmartPtr< const Matrix > Px_U() const
Permutation matrix (x_U_ -> x.
SmartPtr< CompoundVectorSpace > x_l_space_
SmartPtr< CompoundMatrixSpace > jac_d_space_
virtual Index h_evals() const
bool initialized_
Flag indicating if initialization method has been called.
virtual SmartPtr< const Vector > x_U() const
Upper bounds on x.
Number eta_mu_exponent_
exponent for mu in eta calculation
SmartPtr< DiagMatrix > DR_x_
void operator=(const RestoIpoptNLP &)
Overloaded Equals Operator.
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< IpoptCalculatedQuantities > orig_ip_cq_
Pointer to the original IpoptCalculatedQuantities.
SmartPtr< CompoundSymMatrixSpace > h_space_
virtual SmartPtr< const VectorSpace > x_space() const
x_space
SmartPtr< CompoundVectorSpace > c_space_
SmartPtr< CompoundVectorSpace > d_space_
SmartPtr< CompoundMatrixSpace > pd_u_space_
SolverReturn
enum for the return from the optimize algorithm (obviously we need to add more)
virtual SmartPtr< const Vector > x_L() const
Lower bounds on x.
This class stores a list of user set options.
Number Rho() const
Accessor Method for obtaining the Rho penalization factor for the ell_1 norm.
SmartPtr< IpoptNLP > orig_ip_nlp_
Pointer to the original IpoptNLP.
virtual Index f_evals() const
SmartPtr< CompoundVectorSpace > d_l_space_
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
Methods for IpoptType.
SmartPtr< CompoundMatrixSpace > jac_c_space_
bool evaluate_orig_obj_at_resto_trial_
Flag indicating if evalution of the objective should be performed for every restoration phase objecti...
AlgorithmMode
enum to indicate the mode in which the algorithm is
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)
User callback method.
SmartPtr< IpoptData > orig_ip_data_
Pointer to the original IpoptData.
This is the abstract base class for classes that map the traditional NLP into something that is more ...
Specialized CompoundVector class specifically for the algorithm iterates.
virtual Index jac_d_evals() const
IpoptData & OrigIpData() const