#include <IpRestoIpoptNLP.hpp>
This class takes care of storing the calculated model results, handles cacheing, and (some day) takes care of addition of slacks.
Public Member Functions | |
virtual bool | Initialize (const Journalist &jnlst, const OptionsList &options, const std::string &prefix) |
Initialize - overloaded from IpoptNLP. | |
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. | |
virtual bool | GetWarmStartIterate (IteratesVector &warm_start_iterate) |
Method accessing the GetWarmStartIterate of the NLP. | |
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. | |
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. | |
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. | |
Number | Rho () const |
Accessor Method for obtaining the Rho penalization factor for the ell_1 norm. | |
Number | Eta (Number mu) const |
Method to calculate eta, the factor for the regularization term. | |
SmartPtr< const Vector > | DR_x () const |
Method returning the scaling factors for the 2-norm penalization term. | |
Constructors/Destructors | |
RestoIpoptNLP (IpoptNLP &orig_ip_nlp, IpoptData &orig_ip_data, IpoptCalculatedQuantities &orig_ip_cq) | |
Default destructor. | |
~RestoIpoptNLP () | |
Default destructor. | |
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) |
Solution Routines - overloaded from IpoptNLP. | |
virtual bool | objective_depends_on_mu () const |
Accessor methods for model data. | |
virtual Number | f (const Vector &x) |
Objective value (incorrect version for restoration phase). | |
virtual Number | f (const Vector &x, Number mu) |
Objective value. | |
virtual SmartPtr< const Vector > | grad_f (const Vector &x) |
Gradient of the objective (incorrect version for restoration phase). | |
virtual SmartPtr< const Vector > | grad_f (const Vector &x, Number mu) |
Gradient of the objective. | |
virtual SmartPtr< const Vector > | c (const Vector &x) |
Equality constraint residual. | |
virtual SmartPtr< const Matrix > | jac_c (const Vector &x) |
Jacobian Matrix for equality constraints. | |
virtual SmartPtr< const Vector > | d (const Vector &x) |
Inequality constraint residual (reformulated as equalities with slacks. | |
virtual SmartPtr< const Matrix > | jac_d (const Vector &x) |
Jacobian Matrix for inequality constraints. | |
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 SmartPtr< const SymMatrix > | h (const Vector &x, Number obj_factor, const Vector &yc, const Vector &yd, Number mu) |
Hessian of the Lagrangian. | |
virtual SmartPtr< const SymMatrix > | uninitialized_h () |
Provides a Hessian matrix from the correct matrix space with uninitialized values. | |
virtual SmartPtr< const Vector > | x_L () |
Lower bounds on x. | |
virtual SmartPtr< const Matrix > | Px_L () |
Permutation matrix (x_L_ -> x). | |
virtual SmartPtr< const Vector > | x_U () |
Upper bounds on x. | |
virtual SmartPtr< const Matrix > | Px_U () |
Permutation matrix (x_U_ -> x. | |
virtual SmartPtr< const Vector > | d_L () |
Lower bounds on d. | |
virtual SmartPtr< const Matrix > | Pd_L () |
Permutation matrix (d_L_ -> d). | |
virtual SmartPtr< const Vector > | d_U () |
Upper bounds on d. | |
virtual SmartPtr< const Matrix > | Pd_U () |
Permutation matrix (d_U_ -> d. | |
virtual SmartPtr< const SymMatrixSpace > | HessianMatrixSpace () const |
Accessor methods for model data. | |
Accessor method for the information of the original NLP. | |
IpoptNLP & | OrigIpNLP () const |
IpoptData & | OrigIpData () const |
IpoptCalculatedQuantities & | OrigIpCq () const |
Counters for the number of function evaluations. | |
virtual Index | f_evals () const |
virtual Index | grad_f_evals () const |
virtual Index | c_evals () const |
virtual Index | jac_c_evals () const |
virtual Index | d_evals () const |
virtual Index | jac_d_evals () const |
virtual Index | h_evals () const |
Static Public Member Functions | |
static void | RegisterOptions (SmartPtr< RegisteredOptions > roptions) |
Methods for IpoptType. |
RestoIpoptNLP | ( | IpoptNLP & | orig_ip_nlp, | |
IpoptData & | orig_ip_data, | |||
IpoptCalculatedQuantities & | orig_ip_cq | |||
) |
Default destructor.
~RestoIpoptNLP | ( | ) |
Default destructor.
bool Initialize | ( | const Journalist & | jnlst, | |
const OptionsList & | options, | |||
const std::string & | prefix | |||
) | [virtual] |
Initialize - overloaded from IpoptNLP.
Reimplemented from IpoptNLP.
References OptionsList::GetBoolValue(), OptionsList::GetEnumValue(), and IpoptNLP::Initialize().
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 | |||
) | [virtual] |
Initialize (create) structures for the iteration data.
Implements IpoptNLP.
References DBG_ASSERT, DBG_PRINT, DBG_PRINT_VECTOR, DBG_START_METH, SymMatrixSpace::Dim(), Ipopt::GetRawPtr(), Ipopt::LIMITED_MEMORY, and IpoptNLP::NLP_scaling().
virtual bool GetWarmStartIterate | ( | IteratesVector & | warm_start_iterate | ) | [inline, virtual] |
virtual bool objective_depends_on_mu | ( | ) | const [inline, virtual] |
Accessor methods for model data.
Method for telling IpoptCalculatedQuantities that the restoration phase objective function depends on the barrier parameter
Reimplemented from IpoptNLP.
Objective value (incorrect version for restoration phase).
Implements IpoptNLP.
References THROW_EXCEPTION.
Objective value.
Implements IpoptNLP.
References DBG_ASSERT, DBG_PRINT, DBG_PRINT_VECTOR, DBG_START_METH, RestoIpoptNLP::Eta(), CompoundVector::GetComp(), and Vector::Sum().
Gradient of the objective (incorrect version for restoration phase).
Implements IpoptNLP.
References THROW_EXCEPTION.
Gradient of the objective.
Implements IpoptNLP.
References Ipopt::ConstPtr(), DBG_ASSERT, RestoIpoptNLP::Eta(), CompoundVector::GetComp(), CompoundVector::GetCompNonConst(), Ipopt::GetRawPtr(), and Vector::MakeNew().
Equality constraint residual.
Implements IpoptNLP.
References CompoundVector::GetComp(), and Ipopt::GetRawPtr().
Jacobian Matrix for equality constraints.
Implements IpoptNLP.
References DBG_ASSERT, CompoundVector::GetComp(), Ipopt::GetRawPtr(), and IdentityMatrix::SetFactor().
Inequality constraint residual (reformulated as equalities with slacks.
Implements IpoptNLP.
References CompoundVector::GetComp(), and Ipopt::GetRawPtr().
Jacobian Matrix for inequality constraints.
Implements IpoptNLP.
References DBG_ASSERT, DBG_PRINT, DBG_START_METH, CompoundVector::GetComp(), Ipopt::GetRawPtr(), and IdentityMatrix::SetFactor().
SmartPtr< const SymMatrix > h | ( | const Vector & | x, | |
Number | obj_factor, | |||
const Vector & | yc, | |||
const Vector & | yd, | |||
Number | mu | |||
) | [virtual] |
Hessian of the Lagrangian.
Implements IpoptNLP.
References DBG_ASSERT, RestoIpoptNLP::Eta(), CompoundVector::GetComp(), and Ipopt::GetRawPtr().
Provides a Hessian matrix from the correct matrix space with uninitialized values.
This can be used in LeastSquareMults to obtain a "zero Hessian".
Implements IpoptNLP.
References Ipopt::GetRawPtr(), and Ipopt::LIMITED_MEMORY.
virtual SmartPtr<const SymMatrixSpace> HessianMatrixSpace | ( | ) | const [inline, virtual] |
Accessor methods for model data.
Method for telling IpoptCalculatedQuantities that the restoration phase objective function depends on the barrier parameter
Implements IpoptNLP.
References Ipopt::GetRawPtr().
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 | |||
) | [virtual] |
Accessor method for vector/matrix spaces pointers.
Implements IpoptNLP.
References Ipopt::GetRawPtr().
void AdjustVariableBounds | ( | const Vector & | new_x_L, | |
const Vector & | new_x_U, | |||
const Vector & | new_d_L, | |||
const Vector & | new_d_U | |||
) | [virtual] |
Method for adapting the variable bounds.
This is called if slacks are becoming too small
Implements IpoptNLP.
References DBG_ASSERT, and CompoundVector::GetComp().
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 | |||
) | [virtual] |
IpoptNLP& OrigIpNLP | ( | ) | const [inline] |
Referenced by RestoIterationOutput::WriteOutput().
IpoptData& OrigIpData | ( | ) | const [inline] |
Referenced by RestoFilterConvergenceCheck::CheckConvergence(), and RestoIterationOutput::WriteOutput().
IpoptCalculatedQuantities& OrigIpCq | ( | ) | const [inline] |
Referenced by RestoFilterConvergenceCheck::CheckConvergence(), and RestoIterationOutput::WriteOutput().
Number Rho | ( | ) | const [inline] |
Accessor Method for obtaining the Rho penalization factor for the ell_1 norm.
Method to calculate eta, the factor for the regularization term.
Referenced by RestoIpoptNLP::f(), RestoIpoptNLP::grad_f(), RestoIpoptNLP::h(), and LimMemQuasiNewtonUpdater::UpdateHessian().
Method returning the scaling factors for the 2-norm penalization term.
References Ipopt::ConstPtr().
Referenced by LimMemQuasiNewtonUpdater::UpdateHessian().
void RegisterOptions | ( | SmartPtr< RegisteredOptions > | roptions | ) | [static] |
Methods for IpoptType.
Called by IpoptType to register the options
Referenced by Ipopt::RegisterOptions_Algorithm().