StandardScalingBase Class Reference

#include <IpNLPScaling.hpp>

Inheritance diagram for StandardScalingBase:

NLPScalingObject ReferencedObject GradientScaling NoNLPScalingObject UserScaling

List of all members.


Detailed Description

This is a base class for many standard scaling techniques.

The overloaded classes only need to provide the scaling parameters

Public Member Functions

virtual void DetermineScaling (const SmartPtr< const VectorSpace > x_space, const SmartPtr< const VectorSpace > c_space, const SmartPtr< const VectorSpace > d_space, const SmartPtr< const MatrixSpace > jac_c_space, const SmartPtr< const MatrixSpace > jac_d_space, const SmartPtr< const SymMatrixSpace > h_space, SmartPtr< const MatrixSpace > &new_jac_c_space, SmartPtr< const MatrixSpace > &new_jac_d_space, SmartPtr< const SymMatrixSpace > &new_h_space)
 This method is called by the IpoptNLP's at a convenient time to compute and/or read scaling factors.
Constructors/Destructors
 StandardScalingBase ()
 Default destructor.
virtual ~StandardScalingBase ()
 Default destructor.
virtual Number apply_obj_scaling (const Number &f)
 Methods to map scaled and unscaled matrices.
virtual Number unapply_obj_scaling (const Number &f)
 Returns an obj-unscaled version of the given scalar.
virtual SmartPtr< Vectorapply_vector_scaling_x_NonConst (const SmartPtr< const Vector > &v)
 Returns an x-scaled version of the given vector.
virtual SmartPtr< const Vectorapply_vector_scaling_x (const SmartPtr< const Vector > &v)
 Returns an x-scaled version of the given vector.
virtual SmartPtr< Vectorunapply_vector_scaling_x_NonConst (const SmartPtr< const Vector > &v)
 Returns an x-unscaled version of the given vector.
virtual SmartPtr< const Vectorunapply_vector_scaling_x (const SmartPtr< const Vector > &v)
 Returns an x-unscaled version of the given vector.
virtual SmartPtr< const Vectorapply_vector_scaling_c (const SmartPtr< const Vector > &v)
 Returns an c-scaled version of the given vector.
virtual SmartPtr< const Vectorunapply_vector_scaling_c (const SmartPtr< const Vector > &v)
 Returns an c-unscaled version of the given vector.
virtual SmartPtr< Vectorapply_vector_scaling_c_NonConst (const SmartPtr< const Vector > &v)
 Returns an c-scaled version of the given vector.
virtual SmartPtr< Vectorunapply_vector_scaling_c_NonConst (const SmartPtr< const Vector > &v)
 Returns an c-unscaled version of the given vector.
virtual SmartPtr< const Vectorapply_vector_scaling_d (const SmartPtr< const Vector > &v)
 Returns an d-scaled version of the given vector.
virtual SmartPtr< const Vectorunapply_vector_scaling_d (const SmartPtr< const Vector > &v)
 Returns an d-unscaled version of the given vector.
virtual SmartPtr< Vectorapply_vector_scaling_d_NonConst (const SmartPtr< const Vector > &v)
 Returns an d-scaled version of the given vector.
virtual SmartPtr< Vectorunapply_vector_scaling_d_NonConst (const SmartPtr< const Vector > &v)
 Returns an d-unscaled version of the given vector.
virtual SmartPtr< const Matrixapply_jac_c_scaling (SmartPtr< const Matrix > matrix)
 Returns a scaled version of the jacobian for c.
virtual SmartPtr< const Matrixapply_jac_d_scaling (SmartPtr< const Matrix > matrix)
 Returns a scaled version of the jacobian for d If the overloaded method does not create a new matrix, make sure to set the matrix ptr passed in to NULL.
virtual SmartPtr< const SymMatrixapply_hessian_scaling (SmartPtr< const SymMatrix > matrix)
 Returns a scaled version of the hessian of the lagrangian If the overloaded method does not create a new matrix, make sure to set the matrix ptr passed in to NULL.
Methods for determining whether scaling for entities is
done

virtual bool have_x_scaling ()
 Returns true if the primal x variables are scaled.
virtual bool have_c_scaling ()
 Returns true if the equality constraints are scaled.
virtual bool have_d_scaling ()
 Returns true if the inequality constraints are scaled.

Static Public Member Functions

static void RegisterOptions (SmartPtr< RegisteredOptions > roptions)
 Methods for IpoptType.

Protected Member Functions

virtual bool InitializeImpl (const OptionsList &options, const std::string &prefix)
 Overloaded initialization method.
virtual void DetermineScalingParametersImpl (const SmartPtr< const VectorSpace > x_space, const SmartPtr< const VectorSpace > c_space, const SmartPtr< const VectorSpace > d_space, const SmartPtr< const MatrixSpace > jac_c_space, const SmartPtr< const MatrixSpace > jac_d_space, const SmartPtr< const SymMatrixSpace > h_space, Number &df, SmartPtr< Vector > &dx, SmartPtr< Vector > &dc, SmartPtr< Vector > &dd)=0
 This is the method that has to be overloaded by a particular scaling method that somehow computes the scaling vectors dx, dc, and dd.


Constructor & Destructor Documentation

StandardScalingBase (  )  [inline]

Default destructor.

virtual ~StandardScalingBase (  )  [inline, virtual]

Default destructor.


Member Function Documentation

Number apply_obj_scaling ( const Number f  )  [virtual]

Methods to map scaled and unscaled matrices.

Returns an obj-scaled version of the given scalar

Implements NLPScalingObject.

Number unapply_obj_scaling ( const Number f  )  [virtual]

Returns an obj-unscaled version of the given scalar.

Implements NLPScalingObject.

SmartPtr< Vector > apply_vector_scaling_x_NonConst ( const SmartPtr< const Vector > &  v  )  [virtual]

Returns an x-scaled version of the given vector.

Implements NLPScalingObject.

References DBG_PRINT, DBG_START_METH, and Ipopt::IsValid().

Referenced by StandardScalingBase::apply_vector_scaling_x().

SmartPtr< const Vector > apply_vector_scaling_x ( const SmartPtr< const Vector > &  v  )  [virtual]

Returns an x-scaled version of the given vector.

Implements NLPScalingObject.

References StandardScalingBase::apply_vector_scaling_x_NonConst(), Ipopt::ConstPtr(), and Ipopt::IsValid().

SmartPtr< Vector > unapply_vector_scaling_x_NonConst ( const SmartPtr< const Vector > &  v  )  [virtual]

Returns an x-unscaled version of the given vector.

Implements NLPScalingObject.

References DBG_PRINT, DBG_START_METH, and Ipopt::IsValid().

Referenced by StandardScalingBase::unapply_vector_scaling_x().

SmartPtr< const Vector > unapply_vector_scaling_x ( const SmartPtr< const Vector > &  v  )  [virtual]

Returns an x-unscaled version of the given vector.

Implements NLPScalingObject.

References Ipopt::ConstPtr(), Ipopt::IsValid(), and StandardScalingBase::unapply_vector_scaling_x_NonConst().

SmartPtr< const Vector > apply_vector_scaling_c ( const SmartPtr< const Vector > &  v  )  [virtual]

Returns an c-scaled version of the given vector.

Implements NLPScalingObject.

References StandardScalingBase::apply_vector_scaling_c_NonConst(), Ipopt::ConstPtr(), and Ipopt::IsValid().

SmartPtr< const Vector > unapply_vector_scaling_c ( const SmartPtr< const Vector > &  v  )  [virtual]

Returns an c-unscaled version of the given vector.

Implements NLPScalingObject.

References Ipopt::ConstPtr(), Ipopt::IsValid(), and StandardScalingBase::unapply_vector_scaling_c_NonConst().

SmartPtr< Vector > apply_vector_scaling_c_NonConst ( const SmartPtr< const Vector > &  v  )  [virtual]

Returns an c-scaled version of the given vector.

Implements NLPScalingObject.

References DBG_PRINT, DBG_START_METH, and Ipopt::IsValid().

Referenced by StandardScalingBase::apply_vector_scaling_c().

SmartPtr< Vector > unapply_vector_scaling_c_NonConst ( const SmartPtr< const Vector > &  v  )  [virtual]

Returns an c-unscaled version of the given vector.

Implements NLPScalingObject.

References DBG_PRINT, DBG_START_METH, and Ipopt::IsValid().

Referenced by StandardScalingBase::unapply_vector_scaling_c().

SmartPtr< const Vector > apply_vector_scaling_d ( const SmartPtr< const Vector > &  v  )  [virtual]

Returns an d-scaled version of the given vector.

Implements NLPScalingObject.

References StandardScalingBase::apply_vector_scaling_d_NonConst(), Ipopt::ConstPtr(), and Ipopt::IsValid().

SmartPtr< const Vector > unapply_vector_scaling_d ( const SmartPtr< const Vector > &  v  )  [virtual]

Returns an d-unscaled version of the given vector.

Implements NLPScalingObject.

References Ipopt::ConstPtr(), Ipopt::IsValid(), and StandardScalingBase::unapply_vector_scaling_d_NonConst().

SmartPtr< Vector > apply_vector_scaling_d_NonConst ( const SmartPtr< const Vector > &  v  )  [virtual]

Returns an d-scaled version of the given vector.

Implements NLPScalingObject.

References DBG_PRINT, DBG_START_METH, and Ipopt::IsValid().

Referenced by StandardScalingBase::apply_vector_scaling_d().

SmartPtr< Vector > unapply_vector_scaling_d_NonConst ( const SmartPtr< const Vector > &  v  )  [virtual]

Returns an d-unscaled version of the given vector.

Implements NLPScalingObject.

References DBG_PRINT, DBG_START_METH, and Ipopt::IsValid().

Referenced by StandardScalingBase::unapply_vector_scaling_d().

SmartPtr< const Matrix > apply_jac_c_scaling ( SmartPtr< const Matrix matrix  )  [virtual]

Returns a scaled version of the jacobian for c.

If the overloaded method does not make a new matrix, make sure to set the matrix ptr passed in to NULL.

Implements NLPScalingObject.

References Ipopt::GetRawPtr(), and Ipopt::IsValid().

SmartPtr< const Matrix > apply_jac_d_scaling ( SmartPtr< const Matrix matrix  )  [virtual]

Returns a scaled version of the jacobian for d If the overloaded method does not create a new matrix, make sure to set the matrix ptr passed in to NULL.

Implements NLPScalingObject.

References Ipopt::GetRawPtr(), and Ipopt::IsValid().

SmartPtr< const SymMatrix > apply_hessian_scaling ( SmartPtr< const SymMatrix matrix  )  [virtual]

Returns a scaled version of the hessian of the lagrangian If the overloaded method does not create a new matrix, make sure to set the matrix ptr passed in to NULL.

Implements NLPScalingObject.

References Ipopt::GetRawPtr(), and Ipopt::IsValid().

bool have_x_scaling (  )  [virtual]

Returns true if the primal x variables are scaled.

Implements NLPScalingObject.

References Ipopt::IsValid().

bool have_c_scaling (  )  [virtual]

Returns true if the equality constraints are scaled.

Implements NLPScalingObject.

References Ipopt::IsValid().

bool have_d_scaling (  )  [virtual]

Returns true if the inequality constraints are scaled.

Implements NLPScalingObject.

References Ipopt::IsValid().

void DetermineScaling ( const SmartPtr< const VectorSpace x_space,
const SmartPtr< const VectorSpace c_space,
const SmartPtr< const VectorSpace d_space,
const SmartPtr< const MatrixSpace jac_c_space,
const SmartPtr< const MatrixSpace jac_d_space,
const SmartPtr< const SymMatrixSpace h_space,
SmartPtr< const MatrixSpace > &  new_jac_c_space,
SmartPtr< const MatrixSpace > &  new_jac_d_space,
SmartPtr< const SymMatrixSpace > &  new_h_space 
) [virtual]

This method is called by the IpoptNLP's at a convenient time to compute and/or read scaling factors.

Implements NLPScalingObject.

References Ipopt::ConstPtr(), StandardScalingBase::DetermineScalingParametersImpl(), Ipopt::GetRawPtr(), Ipopt::IsValid(), Ipopt::J_MAIN, Ipopt::J_VECTOR, NLPScalingObject::Jnlst(), and Journalist::Printf().

void RegisterOptions ( SmartPtr< RegisteredOptions roptions  )  [static]

Methods for IpoptType.

Referenced by Ipopt::RegisterOptions_Algorithm().

bool InitializeImpl ( const OptionsList options,
const std::string &  prefix 
) [protected, virtual]

Overloaded initialization method.

Implements NLPScalingObject.

Reimplemented in GradientScaling.

References OptionsList::GetNumericValue().

Referenced by GradientScaling::InitializeImpl().

virtual void DetermineScalingParametersImpl ( const SmartPtr< const VectorSpace x_space,
const SmartPtr< const VectorSpace c_space,
const SmartPtr< const VectorSpace d_space,
const SmartPtr< const MatrixSpace jac_c_space,
const SmartPtr< const MatrixSpace jac_d_space,
const SmartPtr< const SymMatrixSpace h_space,
Number df,
SmartPtr< Vector > &  dx,
SmartPtr< Vector > &  dc,
SmartPtr< Vector > &  dd 
) [protected, pure virtual]

This is the method that has to be overloaded by a particular scaling method that somehow computes the scaling vectors dx, dc, and dd.

The pointers to those vectors can be NULL, in which case no scaling for that item will be done later.

Implemented in GradientScaling, NoNLPScalingObject, and UserScaling.

Referenced by StandardScalingBase::DetermineScaling().


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