#include <IpIpoptNLP.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) |
Initialization method. | |
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)=0 |
Initialize (create) structures for the iteration data. | |
virtual bool | GetWarmStartIterate (IteratesVector &warm_start_iterate)=0 |
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)=0 |
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)=0 |
Method for adapting the variable bounds. | |
SmartPtr< NLPScalingObject > | NLP_scaling () const |
Returns the scaling strategy object. | |
Constructors/Destructors | |
IpoptNLP (const SmartPtr< NLPScalingObject > nlp_scaling) | |
Default destructor. | |
virtual | ~IpoptNLP () |
Default destructor. | |
Possible Exceptions | |
DECLARE_STD_EXCEPTION (Eval_Error) | |
thrown if there is any error evaluating values from the nlp | |
virtual Number | f (const Vector &x)=0 |
Accessor methods for model data. | |
virtual SmartPtr< const Vector > | grad_f (const Vector &x)=0 |
Gradient of the objective. | |
virtual SmartPtr< const Vector > | c (const Vector &x)=0 |
Equality constraint residual. | |
virtual SmartPtr< const Matrix > | jac_c (const Vector &x)=0 |
Jacobian Matrix for equality constraints. | |
virtual SmartPtr< const Vector > | d (const Vector &x)=0 |
Inequality constraint residual (reformulated as equalities with slacks. | |
virtual SmartPtr< const Matrix > | jac_d (const Vector &x)=0 |
Jacobian Matrix for inequality constraints. | |
virtual SmartPtr< const SymMatrix > | h (const Vector &x, Number obj_factor, const Vector &yc, const Vector &yd)=0 |
Hessian of the Lagrangian. | |
virtual SmartPtr< const Vector > | x_L ()=0 |
Lower bounds on x. | |
virtual SmartPtr< const Matrix > | Px_L ()=0 |
Permutation matrix (x_L_ -> x). | |
virtual SmartPtr< const Vector > | x_U ()=0 |
Upper bounds on x. | |
virtual SmartPtr< const Matrix > | Px_U ()=0 |
Permutation matrix (x_U_ -> x. | |
virtual SmartPtr< const Vector > | d_L ()=0 |
Lower bounds on d. | |
virtual SmartPtr< const Matrix > | Pd_L ()=0 |
Permutation matrix (d_L_ -> d). | |
virtual SmartPtr< const Vector > | d_U ()=0 |
Upper bounds on d. | |
virtual SmartPtr< const Matrix > | Pd_U ()=0 |
Permutation matrix (d_U_ -> d. | |
virtual SmartPtr< const SymMatrixSpace > | HessianMatrixSpace () const =0 |
Accessor method to obtain the MatrixSpace for the Hessian matrix (or it's approximation). | |
Counters for the number of function evaluations. | |
virtual Index | f_evals () const =0 |
virtual Index | grad_f_evals () const =0 |
virtual Index | c_evals () const =0 |
virtual Index | jac_c_evals () const =0 |
virtual Index | d_evals () const =0 |
virtual Index | jac_d_evals () const =0 |
virtual Index | h_evals () const =0 |
Special method for dealing with the fact that the | |
restoration phase objective function depends on the barrier parameter | |
virtual bool | objective_depends_on_mu () const |
Method for telling the IpoptCalculatedQuantities class whether the objective function depends on the barrier function. | |
virtual Number | f (const Vector &x, Number mu)=0 |
Replacement for the default objective function method which knows about the barrier parameter. | |
virtual SmartPtr< const Vector > | grad_f (const Vector &x, Number mu)=0 |
Replacement for the default objective gradient method which knows about the barrier parameter. | |
virtual SmartPtr< const SymMatrix > | h (const Vector &x, Number obj_factor, const Vector &yc, const Vector &yd, Number mu)=0 |
Replacement for the default Lagrangian Hessian method which knows about the barrier parameter. | |
virtual SmartPtr< const SymMatrix > | uninitialized_h ()=0 |
Provides a Hessian matrix from the correct matrix space with uninitialized values. | |
solution routines | |
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)=0 |
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, SmartPtr< const IpoptData > ip_data, SmartPtr< IpoptCalculatedQuantities > ip_cq)=0 |
IpoptNLP | ( | const SmartPtr< NLPScalingObject > | nlp_scaling | ) | [inline] |
Default destructor.
virtual ~IpoptNLP | ( | ) | [inline, virtual] |
Default destructor.
virtual bool Initialize | ( | const Journalist & | jnlst, | |
const OptionsList & | options, | |||
const std::string & | prefix | |||
) | [inline, virtual] |
Initialization method.
Set the internal options and initialize internal data structures.
Reimplemented in OrigIpoptNLP, and RestoIpoptNLP.
References Ipopt::IsValid().
Referenced by RestoIpoptNLP::Initialize(), OrigIpoptNLP::Initialize(), and IpoptAlgorithm::InitializeImpl().
DECLARE_STD_EXCEPTION | ( | Eval_Error | ) |
thrown if there is any error evaluating values from the nlp
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 | |||
) | [pure virtual] |
Initialize (create) structures for the iteration data.
Implemented in OrigIpoptNLP, and RestoIpoptNLP.
Referenced by IpoptData::InitializeDataStructures().
virtual bool GetWarmStartIterate | ( | IteratesVector & | warm_start_iterate | ) | [pure virtual] |
Method accessing the GetWarmStartIterate of the NLP.
Implemented in OrigIpoptNLP, and RestoIpoptNLP.
Referenced by WarmStartIterateInitializer::SetInitialIterates().
Inequality constraint residual (reformulated as equalities with slacks.
Implemented in OrigIpoptNLP, and RestoIpoptNLP.
Lower bounds on x.
Implemented in OrigIpoptNLP, and RestoIpoptNLP.
Referenced by QualityFunctionMuOracle::CalculateMu(), and DefaultIterateInitializer::SetInitialIterates().
Permutation matrix (x_L_ -> x).
Implemented in OrigIpoptNLP, and RestoIpoptNLP.
Referenced by QualityFunctionMuOracle::CalculateMu(), LeastSquareMultipliers::CalculateMultipliers(), WarmStartIterateInitializer::SetInitialIterates(), DefaultIterateInitializer::SetInitialIterates(), PDFullSpaceSolver::Solve(), and FilterLSAcceptor::TryCorrector().
Upper bounds on x.
Implemented in OrigIpoptNLP, and RestoIpoptNLP.
Referenced by QualityFunctionMuOracle::CalculateMu(), and DefaultIterateInitializer::SetInitialIterates().
Permutation matrix (x_U_ -> x.
Implemented in OrigIpoptNLP, and RestoIpoptNLP.
Referenced by QualityFunctionMuOracle::CalculateMu(), LeastSquareMultipliers::CalculateMultipliers(), DefaultIterateInitializer::SetInitialIterates(), PDFullSpaceSolver::Solve(), and FilterLSAcceptor::TryCorrector().
Lower bounds on d.
Implemented in OrigIpoptNLP, and RestoIpoptNLP.
Referenced by QualityFunctionMuOracle::CalculateMu().
Permutation matrix (d_L_ -> d).
Implemented in OrigIpoptNLP, and RestoIpoptNLP.
Referenced by QualityFunctionMuOracle::CalculateMu(), LeastSquareMultipliers::CalculateMultipliers(), WarmStartIterateInitializer::SetInitialIterates(), PDFullSpaceSolver::Solve(), and FilterLSAcceptor::TryCorrector().
Upper bounds on d.
Implemented in OrigIpoptNLP, and RestoIpoptNLP.
Referenced by QualityFunctionMuOracle::CalculateMu().
Permutation matrix (d_U_ -> d.
Implemented in OrigIpoptNLP, and RestoIpoptNLP.
Referenced by QualityFunctionMuOracle::CalculateMu(), LeastSquareMultipliers::CalculateMultipliers(), WarmStartIterateInitializer::SetInitialIterates(), PDFullSpaceSolver::Solve(), and FilterLSAcceptor::TryCorrector().
virtual SmartPtr<const SymMatrixSpace> HessianMatrixSpace | ( | ) | const [pure virtual] |
Accessor method to obtain the MatrixSpace for the Hessian matrix (or it's approximation).
Implemented in OrigIpoptNLP, and RestoIpoptNLP.
Referenced by LimMemQuasiNewtonUpdater::UpdateHessian().
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 | |||
) | [pure virtual] |
virtual void AdjustVariableBounds | ( | const Vector & | new_x_L, | |
const Vector & | new_x_U, | |||
const Vector & | new_d_L, | |||
const Vector & | new_d_U | |||
) | [pure virtual] |
Method for adapting the variable bounds.
This is called if slacks are becoming too small
Implemented in OrigIpoptNLP, and RestoIpoptNLP.
virtual Index f_evals | ( | ) | const [pure virtual] |
Implemented in OrigIpoptNLP, and RestoIpoptNLP.
virtual Index grad_f_evals | ( | ) | const [pure virtual] |
Implemented in OrigIpoptNLP, and RestoIpoptNLP.
virtual Index c_evals | ( | ) | const [pure virtual] |
Implemented in OrigIpoptNLP, and RestoIpoptNLP.
virtual Index jac_c_evals | ( | ) | const [pure virtual] |
Implemented in OrigIpoptNLP, and RestoIpoptNLP.
virtual Index d_evals | ( | ) | const [pure virtual] |
Implemented in OrigIpoptNLP, and RestoIpoptNLP.
virtual Index jac_d_evals | ( | ) | const [pure virtual] |
Implemented in OrigIpoptNLP, and RestoIpoptNLP.
virtual Index h_evals | ( | ) | const [pure virtual] |
Implemented in OrigIpoptNLP, and RestoIpoptNLP.
virtual bool objective_depends_on_mu | ( | ) | const [inline, virtual] |
Method for telling the IpoptCalculatedQuantities class whether the objective function depends on the barrier function.
This is only used for the restoration phase NLP formulation. Probably only RestoIpoptNLP should overwrite this.
Reimplemented in RestoIpoptNLP.
Replacement for the default objective function method which knows about the barrier parameter.
Implemented in OrigIpoptNLP, and RestoIpoptNLP.
Replacement for the default objective gradient method which knows about the barrier parameter.
Implemented in OrigIpoptNLP, and RestoIpoptNLP.
virtual SmartPtr<const SymMatrix> h | ( | const Vector & | x, | |
Number | obj_factor, | |||
const Vector & | yc, | |||
const Vector & | yd, | |||
Number | mu | |||
) | [pure virtual] |
Replacement for the default Lagrangian Hessian method which knows about the barrier parameter.
Implemented in OrigIpoptNLP, and RestoIpoptNLP.
Provides a Hessian matrix from the correct matrix space with uninitialized values.
This can be used in LeastSquareMults to obtain a "zero Hessian".
Implemented in OrigIpoptNLP, and RestoIpoptNLP.
Referenced by LeastSquareMultipliers::CalculateMultipliers().
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 | |||
) | [pure virtual] |
Implemented in OrigIpoptNLP, and RestoIpoptNLP.
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, | |||
SmartPtr< const IpoptData > | ip_data, | |||
SmartPtr< IpoptCalculatedQuantities > | ip_cq | |||
) | [pure virtual] |
Implemented in OrigIpoptNLP, and RestoIpoptNLP.
Referenced by RestoFilterConvergenceCheck::CheckConvergence(), and OptimalityErrorConvergenceCheck::CheckConvergence().
SmartPtr<NLPScalingObject> NLP_scaling | ( | ) | const [inline] |
Returns the scaling strategy object.
References DBG_ASSERT, and Ipopt::IsValid().
Referenced by OrigIpoptNLP::c(), OrigIpoptNLP::d(), OrigIpoptNLP::f(), OrigIpoptNLP::FinalizeSolution(), OrigIpoptNLP::GetSpaces(), OrigIpoptNLP::grad_f(), OrigIpoptNLP::h(), RestoIpoptNLP::InitializeStructures(), OrigIpoptNLP::InitializeStructures(), OrigIpoptNLP::jac_c(), OrigIpoptNLP::jac_d(), and AdaptiveMuUpdate::UpdateBarrierParameter().