OrigIpoptNLP Class Reference

#include <IpOrigIpoptNLP.hpp>

Inheritance diagram for OrigIpoptNLP:

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.
SmartPtr< NLPnlp ()
 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 Vectorgrad_f (const Vector &x)
 Gradient of the objective.
virtual SmartPtr< const Vectorgrad_f (const Vector &x, Number mu)
 Gradient of the objective (depending in mu) - incorrect version for OrigIpoptNLP.
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.
virtual SmartPtr< const SymMatrixh (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 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.
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.


Constructor & Destructor Documentation

OrigIpoptNLP ( const SmartPtr< const Journalist > &  jnlst,
const SmartPtr< NLP > &  nlp,
const SmartPtr< NLPScalingObject > &  nlp_scaling 
)

Default destructor.

~OrigIpoptNLP (  )  [virtual]

Default destructor.


Member Function Documentation

bool Initialize ( const Journalist jnlst,
const OptionsList options,
const std::string &  prefix 
) [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 
) [virtual]

virtual bool GetWarmStartIterate ( IteratesVector warm_start_iterate  )  [inline, virtual]

Method accessing the GetWarmStartIterate of the NLP.

Implements IpoptNLP.

Number f ( const Vector x  )  [virtual]

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

Objective value (depending in mu) - incorrect version for OrigIpoptNLP.

Implements IpoptNLP.

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

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

Gradient of the objective (depending in mu) - incorrect version for OrigIpoptNLP.

Implements IpoptNLP.

References THROW_EXCEPTION.

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

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

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

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

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

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.

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.

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

Lower bounds on x.

Implements IpoptNLP.

Referenced by OrigIpoptNLP::InitializeStructures().

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

Permutation matrix (x_L_ -> x).

Implements IpoptNLP.

Referenced by OrigIpoptNLP::InitializeStructures().

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

Upper bounds on x.

Implements IpoptNLP.

Referenced by OrigIpoptNLP::InitializeStructures().

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

Permutation matrix (x_U_ -> x.

Implements IpoptNLP.

Referenced by OrigIpoptNLP::InitializeStructures().

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

Lower bounds on d.

Implements IpoptNLP.

Referenced by OrigIpoptNLP::InitializeStructures().

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

Permutation matrix (d_L_ -> d).

Implements IpoptNLP.

Referenced by OrigIpoptNLP::InitializeStructures().

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

Upper bounds on d.

Implements IpoptNLP.

Referenced by OrigIpoptNLP::InitializeStructures().

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

Permutation matrix (d_U_ -> d.

Implements IpoptNLP.

Referenced by OrigIpoptNLP::InitializeStructures().

virtual SmartPtr<const SymMatrixSpace> HessianMatrixSpace (  )  const [inline, virtual]

Accessor methods for model data.

Objective value

Implements IpoptNLP.

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

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.

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]

Solution Routines - overloaded from IpoptNLP.

Implements IpoptNLP.

References Ipopt::GetRawPtr().

void RegisterOptions ( SmartPtr< RegisteredOptions roptions  )  [static]

Called by IpoptType to register the options.

Referenced by Ipopt::RegisterOptions_Algorithm().

SmartPtr<NLP> nlp (  )  [inline]

Accessor method to the underlying NLP.

Referenced by IpoptApplication::ReOptimizeNLP().

void PrintTimingStatistics ( Journalist jnlst,
EJournalLevel  level,
EJournalCategory  category 
) const

Number TotalFunctionEvaluationCPUTime (  )  const


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

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