Public Member Functions | Protected Member Functions
Ipopt::StandardScalingBase Class Reference

This is a base class for many standard scaling techniques. More...

#include <IpNLPScaling.hpp>

Inheritance diagram for Ipopt::StandardScalingBase:
Ipopt::NLPScalingObject Ipopt::ReferencedObject Ipopt::EquilibrationScaling Ipopt::GradientScaling Ipopt::NoNLPScalingObject Ipopt::UserScaling

List of all members.

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, const Matrix &Px_L, const Vector &x_L, const Matrix &Px_U, const Vector &x_U)
 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, const Matrix &Px_L, const Vector &x_L, const Matrix &Px_U, const Vector &x_U, 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.

Private Member Functions

Default Compiler Generated Methods

(Hidden to avoid implicit creation/calling).

These methods are not implemented and we do not want the compiler to implement them for us, so we declare them private and do not define them. This ensures that they will not be implicitly created/called.

 StandardScalingBase (const StandardScalingBase &)
 Copy Constructor.
void operator= (const StandardScalingBase &)
 Overloaded Equals Operator.

Private Attributes

Number df_
 Scaling parameters - we only need to keep copies of the objective scaling and the x scaling - the others we can get from the scaled matrix spaces.
SmartPtr< Vectordx_
 x scaling
SmartPtr< ScaledMatrixSpacescaled_jac_c_space_
 Scaled Matrix Spaces.
SmartPtr< ScaledMatrixSpacescaled_jac_d_space_
 Scaled jacobian of d space.
SmartPtr< SymScaledMatrixSpacescaled_h_space_
 Scaled hessian of lagrangian spacea.
Algorithmic parameters
Number obj_scaling_factor_
 Additional scaling value for the objective function.

Detailed Description

This is a base class for many standard scaling techniques.

The overloaded classes only need to provide the scaling parameters

Definition at line 229 of file IpNLPScaling.hpp.


Constructor & Destructor Documentation

Ipopt::StandardScalingBase::StandardScalingBase ( )

Default destructor.

virtual Ipopt::StandardScalingBase::~StandardScalingBase ( ) [virtual]

Default destructor.

Ipopt::StandardScalingBase::StandardScalingBase ( const StandardScalingBase ) [private]

Copy Constructor.


Member Function Documentation

virtual Number Ipopt::StandardScalingBase::apply_obj_scaling ( const Number f) [virtual]

Methods to map scaled and unscaled matrices.

Returns an obj-scaled version of the given scalar

Implements Ipopt::NLPScalingObject.

virtual Number Ipopt::StandardScalingBase::unapply_obj_scaling ( const Number f) [virtual]

Returns an obj-unscaled version of the given scalar.

Implements Ipopt::NLPScalingObject.

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

Returns an x-scaled version of the given vector.

Implements Ipopt::NLPScalingObject.

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

Returns an x-scaled version of the given vector.

Implements Ipopt::NLPScalingObject.

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

Returns an x-unscaled version of the given vector.

Implements Ipopt::NLPScalingObject.

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

Returns an x-unscaled version of the given vector.

Implements Ipopt::NLPScalingObject.

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

Returns an c-scaled version of the given vector.

Implements Ipopt::NLPScalingObject.

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

Returns an c-unscaled version of the given vector.

Implements Ipopt::NLPScalingObject.

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

Returns an c-scaled version of the given vector.

Implements Ipopt::NLPScalingObject.

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

Returns an c-unscaled version of the given vector.

Implements Ipopt::NLPScalingObject.

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

Returns an d-scaled version of the given vector.

Implements Ipopt::NLPScalingObject.

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

Returns an d-unscaled version of the given vector.

Implements Ipopt::NLPScalingObject.

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

Returns an d-scaled version of the given vector.

Implements Ipopt::NLPScalingObject.

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

Returns an d-unscaled version of the given vector.

Implements Ipopt::NLPScalingObject.

virtual SmartPtr<const Matrix> Ipopt::StandardScalingBase::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 Ipopt::NLPScalingObject.

virtual SmartPtr<const Matrix> Ipopt::StandardScalingBase::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 Ipopt::NLPScalingObject.

virtual SmartPtr<const SymMatrix> Ipopt::StandardScalingBase::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 Ipopt::NLPScalingObject.

virtual bool Ipopt::StandardScalingBase::have_x_scaling ( ) [virtual]

Returns true if the primal x variables are scaled.

Implements Ipopt::NLPScalingObject.

virtual bool Ipopt::StandardScalingBase::have_c_scaling ( ) [virtual]

Returns true if the equality constraints are scaled.

Implements Ipopt::NLPScalingObject.

virtual bool Ipopt::StandardScalingBase::have_d_scaling ( ) [virtual]

Returns true if the inequality constraints are scaled.

Implements Ipopt::NLPScalingObject.

virtual void Ipopt::StandardScalingBase::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,
const Matrix Px_L,
const Vector x_L,
const Matrix Px_U,
const Vector x_U 
) [virtual]

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

Implements Ipopt::NLPScalingObject.

static void Ipopt::StandardScalingBase::RegisterOptions ( SmartPtr< RegisteredOptions roptions) [static]

Methods for IpoptType.

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

Overloaded initialization method.

Implements Ipopt::NLPScalingObject.

Reimplemented in Ipopt::EquilibrationScaling, and Ipopt::GradientScaling.

virtual void Ipopt::StandardScalingBase::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,
const Matrix Px_L,
const Vector x_L,
const Matrix Px_U,
const Vector x_U,
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 Ipopt::EquilibrationScaling, Ipopt::GradientScaling, Ipopt::NoNLPScalingObject, and Ipopt::UserScaling.

void Ipopt::StandardScalingBase::operator= ( const StandardScalingBase ) [private]

Overloaded Equals Operator.


Member Data Documentation

Scaling parameters - we only need to keep copies of the objective scaling and the x scaling - the others we can get from the scaled matrix spaces.

objective scaling parameter

Definition at line 377 of file IpNLPScaling.hpp.

x scaling

Definition at line 379 of file IpNLPScaling.hpp.

Scaled Matrix Spaces.

Scaled jacobian of c space

Definition at line 385 of file IpNLPScaling.hpp.

Scaled jacobian of d space.

Definition at line 387 of file IpNLPScaling.hpp.

Scaled hessian of lagrangian spacea.

Definition at line 389 of file IpNLPScaling.hpp.

Additional scaling value for the objective function.

Definition at line 395 of file IpNLPScaling.hpp.


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