#include <IpOrigIpoptNLP.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. | |
SmartPtr< NLP > | nlp () |
Accessor method to the underlying NLP. | |
void | PrintTimingStatistics (Journalist &jnlst, EJournalLevel level, EJournalCategory category) const |
Number | TotalFunctionEvaluationCPUTime () const |
Constructors/Destructors | |
OrigIpoptNLP (const SmartPtr< const Journalist > &jnlst, const SmartPtr< NLP > &nlp, const SmartPtr< NLPScalingObject > &nlp_scaling) | |
Default destructor. | |
virtual | ~OrigIpoptNLP () |
Default destructor. | |
virtual Number | f (const Vector &x) |
Accessor methods for model data. | |
virtual Number | f (const Vector &x, Number mu) |
Objective value (depending in mu) - incorrect version for OrigIpoptNLP. | |
virtual SmartPtr< const Vector > | grad_f (const Vector &x) |
Gradient of the objective. | |
virtual SmartPtr< const Vector > | grad_f (const Vector &x, Number mu) |
Gradient of the objective (depending in mu) - incorrect version for OrigIpoptNLP. | |
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. | |
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. | |
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. | |
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 |
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. | |
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) |
Solution Routines - overloaded from IpoptNLP. | |
Static Public Member Functions | |
Methods for IpoptType | |
static void | RegisterOptions (SmartPtr< RegisteredOptions > roptions) |
Called by IpoptType to register the options. |
OrigIpoptNLP | ( | const SmartPtr< const Journalist > & | jnlst, | |
const SmartPtr< NLP > & | nlp, | |||
const SmartPtr< NLPScalingObject > & | nlp_scaling | |||
) |
Default destructor.
~OrigIpoptNLP | ( | ) | [virtual] |
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(), OptionsList::GetNumericValue(), 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 ASSERT_EXCEPTION, Ipopt::ConstPtr(), OrigIpoptNLP::d_L(), OrigIpoptNLP::d_U(), DBG_ASSERT, DBG_START_METH, Ipopt::GetRawPtr(), Ipopt::IsNull(), Ipopt::IsValid(), Ipopt::J_DETAILED, Ipopt::J_INITIALIZATION, Ipopt::J_MOREVECTOR, Ipopt::J_VECTOR, Ipopt::LIMITED_MEMORY, IpoptNLP::NLP_scaling(), OrigIpoptNLP::Pd_L(), OrigIpoptNLP::Pd_U(), OrigIpoptNLP::Px_L(), OrigIpoptNLP::Px_U(), OrigIpoptNLP::x_L(), and OrigIpoptNLP::x_U().
virtual bool GetWarmStartIterate | ( | IteratesVector & | warm_start_iterate | ) | [inline, virtual] |
Accessor methods for model data.
Objective value
Implements IpoptNLP.
References ASSERT_EXCEPTION, DBG_PRINT, DBG_START_METH, Vector::Dot(), TimedTask::End(), TaggedObject::GetTag(), Ipopt::IsFiniteNumber(), IpoptNLP::NLP_scaling(), and TimedTask::Start().
Gradient of the objective.
Implements IpoptNLP.
References ASSERT_EXCEPTION, Ipopt::ConstPtr(), TimedTask::End(), Ipopt::IsFiniteNumber(), IpoptNLP::NLP_scaling(), and TimedTask::Start().
Gradient of the objective (depending in mu) - incorrect version for OrigIpoptNLP.
Implements IpoptNLP.
References THROW_EXCEPTION.
Equality constraint residual.
Implements IpoptNLP.
References ASSERT_EXCEPTION, Ipopt::ConstPtr(), TimedTask::End(), Ipopt::GetRawPtr(), Ipopt::IsFiniteNumber(), IpoptNLP::NLP_scaling(), and TimedTask::Start().
Jacobian Matrix for equality constraints.
Implements IpoptNLP.
References ASSERT_EXCEPTION, Ipopt::ConstPtr(), TimedTask::End(), Ipopt::GetRawPtr(), Ipopt::J_NLP, Ipopt::J_WARNING, IpoptNLP::NLP_scaling(), TimedTask::Start(), and THROW_EXCEPTION.
Inequality constraint residual (reformulated as equalities with slacks.
Implements IpoptNLP.
References ASSERT_EXCEPTION, Ipopt::ConstPtr(), DBG_PRINT_VECTOR, DBG_START_METH, TimedTask::End(), Ipopt::GetRawPtr(), Ipopt::IsFiniteNumber(), IpoptNLP::NLP_scaling(), and TimedTask::Start().
Jacobian Matrix for inequality constraints.
Implements IpoptNLP.
References ASSERT_EXCEPTION, Ipopt::ConstPtr(), TimedTask::End(), Ipopt::GetRawPtr(), IpoptNLP::NLP_scaling(), and TimedTask::Start().
SmartPtr< const SymMatrix > h | ( | const Vector & | x, | |
Number | obj_factor, | |||
const Vector & | yc, | |||
const Vector & | yd | |||
) | [virtual] |
Hessian of the Lagrangian.
Implements IpoptNLP.
References ASSERT_EXCEPTION, Ipopt::ConstPtr(), TimedTask::End(), IpoptNLP::NLP_scaling(), and TimedTask::Start().
SmartPtr< const SymMatrix > h | ( | const Vector & | x, | |
Number | obj_factor, | |||
const Vector & | yc, | |||
const Vector & | yd, | |||
Number | mu | |||
) | [virtual] |
Hessian of the Lagrangian (depending in mu) - incorrect version for OrigIpoptNLP.
Implements IpoptNLP.
References THROW_EXCEPTION.
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.
Permutation matrix (x_L_ -> x).
Implements IpoptNLP.
Referenced by OrigIpoptNLP::InitializeStructures().
Permutation matrix (x_U_ -> x.
Implements IpoptNLP.
Referenced by OrigIpoptNLP::InitializeStructures().
Permutation matrix (d_L_ -> d).
Implements IpoptNLP.
Referenced by OrigIpoptNLP::InitializeStructures().
Permutation matrix (d_U_ -> d.
Implements IpoptNLP.
Referenced by OrigIpoptNLP::InitializeStructures().
virtual SmartPtr<const SymMatrixSpace> HessianMatrixSpace | ( | ) | const [inline, 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 | |||
) | [virtual] |
Accessor method for vector/matrix spaces pointers.
Implements IpoptNLP.
References DBG_ASSERT, Ipopt::IsValid(), and IpoptNLP::NLP_scaling().
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 Vector::MakeNewCopy().
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 | |||
) | [virtual] |
Solution Routines - overloaded from IpoptNLP.
Implements IpoptNLP.
References Ipopt::ConstPtr(), DBG_START_METH, Ipopt::J_SOLUTION, Ipopt::J_VECTOR, and IpoptNLP::NLP_scaling().
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] |
void RegisterOptions | ( | SmartPtr< RegisteredOptions > | roptions | ) | [static] |
void PrintTimingStatistics | ( | Journalist & | jnlst, | |
EJournalLevel | level, | |||
EJournalCategory | category | |||
) | const |
Number TotalFunctionEvaluationCPUTime | ( | ) | const |