RestoIpoptNLP Class Reference

#include <IpRestoIpoptNLP.hpp>

Inheritance diagram for RestoIpoptNLP:

IpoptNLP ReferencedObject

List of all members.


Detailed Description

This class maps the traditional NLP into something that is more useful by Ipopt.

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 VectorDR_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 Vectorgrad_f (const Vector &x)
 Gradient of the objective (incorrect version for restoration phase).
virtual SmartPtr< const Vectorgrad_f (const Vector &x, Number mu)
 Gradient of the objective.
virtual SmartPtr< const Vectorc (const Vector &x)
 Equality constraint residual.
virtual SmartPtr< const Matrixjac_c (const Vector &x)
 Jacobian Matrix for equality constraints.
virtual SmartPtr< const Vectord (const Vector &x)
 Inequality constraint residual (reformulated as equalities with slacks.
virtual SmartPtr< const Matrixjac_d (const Vector &x)
 Jacobian Matrix for inequality constraints.
virtual SmartPtr< const SymMatrixh (const Vector &x, Number obj_factor, const Vector &yc, const Vector &yd)
 Hessian of the Lagrangian (incorrect version for restoration phase).
virtual SmartPtr< const SymMatrixh (const Vector &x, Number obj_factor, const Vector &yc, const Vector &yd, Number mu)
 Hessian of the Lagrangian.
virtual SmartPtr< const SymMatrixuninitialized_h ()
 Provides a Hessian matrix from the correct matrix space with uninitialized values.
virtual SmartPtr< const Vectorx_L ()
 Lower bounds on x.
virtual SmartPtr< const MatrixPx_L ()
 Permutation matrix (x_L_ -> x).
virtual SmartPtr< const Vectorx_U ()
 Upper bounds on x.
virtual SmartPtr< const MatrixPx_U ()
 Permutation matrix (x_U_ -> x.
virtual SmartPtr< const Vectord_L ()
 Lower bounds on d.
virtual SmartPtr< const MatrixPd_L ()
 Permutation matrix (d_L_ -> d).
virtual SmartPtr< const Vectord_U ()
 Upper bounds on d.
virtual SmartPtr< const MatrixPd_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.
These methods are not overloaded from IpoptNLP

IpoptNLPOrigIpNLP () const
IpoptDataOrigIpData () const
IpoptCalculatedQuantitiesOrigIpCq () 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.


Constructor & Destructor Documentation

RestoIpoptNLP ( IpoptNLP orig_ip_nlp,
IpoptData orig_ip_data,
IpoptCalculatedQuantities orig_ip_cq 
)

Default destructor.

~RestoIpoptNLP (  ) 

Default destructor.


Member Function Documentation

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]

Method accessing the GetWarmStartIterate of the NLP.

Implements IpoptNLP.

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 
) [inline, virtual]

Solution Routines - overloaded from IpoptNLP.

Implements IpoptNLP.

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.

Number f ( const Vector x  )  [virtual]

Objective value (incorrect version for restoration phase).

Implements IpoptNLP.

References THROW_EXCEPTION.

Number f ( const Vector x,
Number  mu 
) [virtual]

SmartPtr< const Vector > grad_f ( const Vector x  )  [virtual]

Gradient of the objective (incorrect version for restoration phase).

Implements IpoptNLP.

References THROW_EXCEPTION.

SmartPtr< const Vector > grad_f ( const Vector x,
Number  mu 
) [virtual]

SmartPtr< const Vector > c ( const Vector x  )  [virtual]

Equality constraint residual.

Implements IpoptNLP.

References CompoundVector::GetComp(), and Ipopt::GetRawPtr().

SmartPtr< const Matrix > jac_c ( const Vector x  )  [virtual]

Jacobian Matrix for equality constraints.

Implements IpoptNLP.

References DBG_ASSERT, CompoundVector::GetComp(), Ipopt::GetRawPtr(), and IdentityMatrix::SetFactor().

SmartPtr< const Vector > d ( const Vector x  )  [virtual]

Inequality constraint residual (reformulated as equalities with slacks.

Implements IpoptNLP.

References CompoundVector::GetComp(), and Ipopt::GetRawPtr().

SmartPtr< const Matrix > jac_d ( const Vector x  )  [virtual]

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 
) [virtual]

Hessian of the Lagrangian (incorrect version for restoration phase).

Implements IpoptNLP.

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().

SmartPtr< const SymMatrix > uninitialized_h (  )  [virtual]

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 Vector> x_L (  )  [inline, virtual]

Lower bounds on x.

Implements IpoptNLP.

References Ipopt::GetRawPtr().

virtual SmartPtr<const Matrix> Px_L (  )  [inline, virtual]

Permutation matrix (x_L_ -> x).

Implements IpoptNLP.

References Ipopt::GetRawPtr().

virtual SmartPtr<const Vector> x_U (  )  [inline, virtual]

Upper bounds on x.

Implements IpoptNLP.

References Ipopt::GetRawPtr().

virtual SmartPtr<const Matrix> Px_U (  )  [inline, virtual]

Permutation matrix (x_U_ -> x.

Implements IpoptNLP.

References Ipopt::GetRawPtr().

virtual SmartPtr<const Vector> d_L (  )  [inline, virtual]

Lower bounds on d.

Implements IpoptNLP.

References Ipopt::GetRawPtr().

virtual SmartPtr<const Matrix> Pd_L (  )  [inline, virtual]

Permutation matrix (d_L_ -> d).

Implements IpoptNLP.

References Ipopt::GetRawPtr().

virtual SmartPtr<const Vector> d_U (  )  [inline, virtual]

Upper bounds on d.

Implements IpoptNLP.

References Ipopt::GetRawPtr().

virtual SmartPtr<const Matrix> Pd_U (  )  [inline, virtual]

Permutation matrix (d_U_ -> d.

Implements IpoptNLP.

References Ipopt::GetRawPtr().

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]

User callback method.

Implements IpoptNLP.

IpoptNLP& OrigIpNLP (  )  const [inline]

IpoptData& OrigIpData (  )  const [inline]

IpoptCalculatedQuantities& OrigIpCq (  )  const [inline]

Number Rho (  )  const [inline]

Accessor Method for obtaining the Rho penalization factor for the ell_1 norm.

virtual Index f_evals (  )  const [inline, virtual]

Implements IpoptNLP.

virtual Index grad_f_evals (  )  const [inline, virtual]

Implements IpoptNLP.

virtual Index c_evals (  )  const [inline, virtual]

Implements IpoptNLP.

virtual Index jac_c_evals (  )  const [inline, virtual]

Implements IpoptNLP.

virtual Index d_evals (  )  const [inline, virtual]

Implements IpoptNLP.

virtual Index jac_d_evals (  )  const [inline, virtual]

Implements IpoptNLP.

virtual Index h_evals (  )  const [inline, virtual]

Implements IpoptNLP.

Number Eta ( Number  mu  )  const

Method to calculate eta, the factor for the regularization term.

Referenced by RestoIpoptNLP::f(), RestoIpoptNLP::grad_f(), RestoIpoptNLP::h(), and LimMemQuasiNewtonUpdater::UpdateHessian().

SmartPtr<const Vector> DR_x (  )  const [inline]

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().


The documentation for this class was generated from the following files:

Generated on Fri Sep 26 07:44:27 2008 for SimTKcore by  doxygen 1.5.6