Ipopt Documentation  
 
Loading...
Searching...
No Matches
Ipopt::NLPScalingObject Class Referenceabstract

This is the abstract base class for problem scaling. More...

#include <IpNLPScaling.hpp>

+ Inheritance diagram for Ipopt::NLPScalingObject:

Public Member Functions

bool Initialize (const Journalist &jnlst, const OptionsList &options, const std::string &prefix)
 Method to initialize the options.
 
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)=0
 This method is called by the IpoptNLP's at a convenient time to compute and/or read scaling factors.
 
Constructors / Destructor
 NLPScalingObject ()
 
virtual ~NLPScalingObject ()
 Destructor.
 
virtual Number apply_obj_scaling (const Number &f)=0
 Methods to map scaled and unscaled matrices.
 
virtual Number unapply_obj_scaling (const Number &f)=0
 Returns an obj-unscaled version of the given scalar.
 
virtual SmartPtr< Vectorapply_vector_scaling_x_NonConst (const SmartPtr< const Vector > &v)=0
 Returns an x-scaled version of the given vector.
 
virtual SmartPtr< const Vectorapply_vector_scaling_x (const SmartPtr< const Vector > &v)=0
 Returns an x-scaled version of the given vector.
 
virtual SmartPtr< Vectorunapply_vector_scaling_x_NonConst (const SmartPtr< const Vector > &v)=0
 Returns an x-unscaled version of the given vector.
 
virtual SmartPtr< const Vectorunapply_vector_scaling_x (const SmartPtr< const Vector > &v)=0
 Returns an x-unscaled version of the given vector.
 
virtual SmartPtr< const Vectorapply_vector_scaling_c (const SmartPtr< const Vector > &v)=0
 Returns an c-scaled version of the given vector.
 
virtual SmartPtr< const Vectorunapply_vector_scaling_c (const SmartPtr< const Vector > &v)=0
 Returns an c-unscaled version of the given vector.
 
virtual SmartPtr< Vectorapply_vector_scaling_c_NonConst (const SmartPtr< const Vector > &v)=0
 Returns an c-scaled version of the given vector.
 
virtual SmartPtr< Vectorunapply_vector_scaling_c_NonConst (const SmartPtr< const Vector > &v)=0
 Returns an c-unscaled version of the given vector.
 
virtual SmartPtr< const Vectorapply_vector_scaling_d (const SmartPtr< const Vector > &v)=0
 Returns an d-scaled version of the given vector.
 
virtual SmartPtr< const Vectorunapply_vector_scaling_d (const SmartPtr< const Vector > &v)=0
 Returns an d-unscaled version of the given vector.
 
virtual SmartPtr< Vectorapply_vector_scaling_d_NonConst (const SmartPtr< const Vector > &v)=0
 Returns an d-scaled version of the given vector.
 
virtual SmartPtr< Vectorunapply_vector_scaling_d_NonConst (const SmartPtr< const Vector > &v)=0
 Returns an d-unscaled version of the given vector.
 
virtual SmartPtr< const Matrixapply_jac_c_scaling (SmartPtr< const Matrix > matrix)=0
 Returns a scaled version of the Jacobian for c.
 
virtual SmartPtr< const Matrixapply_jac_d_scaling (SmartPtr< const Matrix > matrix)=0
 Returns a scaled version of the Jacobian for d.
 
virtual SmartPtr< const SymMatrixapply_hessian_scaling (SmartPtr< const SymMatrix > matrix)=0
 Returns a scaled version of the Hessian of the Lagrangian.
 
SmartPtr< Vectorapply_vector_scaling_x_LU_NonConst (const Matrix &Px_LU, const SmartPtr< const Vector > &lu, const VectorSpace &x_space)
 Methods for scaling bounds - these wrap those above.
 
SmartPtr< const Vectorapply_vector_scaling_x_LU (const Matrix &Px_LU, const SmartPtr< const Vector > &lu, const VectorSpace &x_space)
 Returns an x-scaled vector in the x_L or x_U space.
 
SmartPtr< Vectorapply_vector_scaling_d_LU_NonConst (const Matrix &Pd_LU, const SmartPtr< const Vector > &lu, const VectorSpace &d_space)
 Returns an d-scaled vector in the d_L or d_U space.
 
SmartPtr< const Vectorapply_vector_scaling_d_LU (const Matrix &Pd_LU, const SmartPtr< const Vector > &lu, const VectorSpace &d_space)
 Returns an d-scaled vector in the d_L or d_U space.
 
SmartPtr< Vectorunapply_vector_scaling_d_LU_NonConst (const Matrix &Pd_LU, const SmartPtr< const Vector > &lu, const VectorSpace &d_space)
 Returns an d-unscaled vector in the d_L or d_U space.
 
SmartPtr< const Vectorunapply_vector_scaling_d_LU (const Matrix &Pd_LU, const SmartPtr< const Vector > &lu, const VectorSpace &d_space)
 Returns an d-unscaled vector in the d_L or d_U space.
 
virtual SmartPtr< Vectorapply_grad_obj_scaling_NonConst (const SmartPtr< const Vector > &v)
 Methods for scaling the gradient of the objective - wraps the virtual methods above.
 
virtual SmartPtr< const Vectorapply_grad_obj_scaling (const SmartPtr< const Vector > &v)
 Returns a grad_f scaled version (d_f * D_x^{-1}) of the given vector.
 
virtual SmartPtr< Vectorunapply_grad_obj_scaling_NonConst (const SmartPtr< const Vector > &v)
 Returns a grad_f unscaled version (d_f * D_x^{-1}) of the given vector.
 
virtual SmartPtr< const Vectorunapply_grad_obj_scaling (const SmartPtr< const Vector > &v)
 Returns a grad_f unscaled version (d_f * D_x^{-1}) of the given vector.
 
Methods for determining whether scaling for entities is done
virtual bool have_x_scaling ()=0
 Returns true if the primal x variables are scaled.
 
virtual bool have_c_scaling ()=0
 Returns true if the equality constraints are scaled.
 
virtual bool have_d_scaling ()=0
 Returns true if the inequality constraints are scaled.
 
- Public Member Functions inherited from Ipopt::ReferencedObject
 ReferencedObject ()
 
virtual ~ReferencedObject ()
 
Index ReferenceCount () const
 
void AddRef (const Referencer *referencer) const
 
void ReleaseRef (const Referencer *referencer) const
 

Protected Member Functions

virtual bool InitializeImpl (const OptionsList &options, const std::string &prefix)=0
 Initialization method that has to be overloaded by for each derived class.
 
const JournalistJnlst () const
 Accessor method for the journalist.
 

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.

 NLPScalingObject (const NLPScalingObject &)
 Copy Constructor.
 
void operator= (const NLPScalingObject &)
 Default Assignment Operator.
 

Private Attributes

SmartPtr< const Journalistjnlst_
 

Detailed Description

This is the abstract base class for problem scaling.

It is responsible for determining the scaling factors and mapping quantities in and out of scaled and unscaled versions.

Definition at line 31 of file IpNLPScaling.hpp.

Constructor & Destructor Documentation

◆ NLPScalingObject() [1/2]

Ipopt::NLPScalingObject::NLPScalingObject ( )

◆ ~NLPScalingObject()

virtual Ipopt::NLPScalingObject::~NLPScalingObject ( )
virtual

Destructor.

◆ NLPScalingObject() [2/2]

Ipopt::NLPScalingObject::NLPScalingObject ( const NLPScalingObject )
private

Copy Constructor.

Member Function Documentation

◆ Initialize()

bool Ipopt::NLPScalingObject::Initialize ( const Journalist jnlst,
const OptionsList options,
const std::string &  prefix 
)
inline

Method to initialize the options.

Definition at line 43 of file IpNLPScaling.hpp.

◆ apply_obj_scaling()

virtual Number Ipopt::NLPScalingObject::apply_obj_scaling ( const Number f)
pure virtual

Methods to map scaled and unscaled matrices.

Returns an obj-scaled version of the given scalar

Implemented in Ipopt::StandardScalingBase.

◆ unapply_obj_scaling()

virtual Number Ipopt::NLPScalingObject::unapply_obj_scaling ( const Number f)
pure virtual

Returns an obj-unscaled version of the given scalar.

Implemented in Ipopt::StandardScalingBase.

◆ apply_vector_scaling_x_NonConst()

virtual SmartPtr< Vector > Ipopt::NLPScalingObject::apply_vector_scaling_x_NonConst ( const SmartPtr< const Vector > &  v)
pure virtual

Returns an x-scaled version of the given vector.

Implemented in Ipopt::StandardScalingBase.

◆ apply_vector_scaling_x()

virtual SmartPtr< const Vector > Ipopt::NLPScalingObject::apply_vector_scaling_x ( const SmartPtr< const Vector > &  v)
pure virtual

Returns an x-scaled version of the given vector.

Implemented in Ipopt::StandardScalingBase.

◆ unapply_vector_scaling_x_NonConst()

virtual SmartPtr< Vector > Ipopt::NLPScalingObject::unapply_vector_scaling_x_NonConst ( const SmartPtr< const Vector > &  v)
pure virtual

Returns an x-unscaled version of the given vector.

Implemented in Ipopt::StandardScalingBase.

◆ unapply_vector_scaling_x()

virtual SmartPtr< const Vector > Ipopt::NLPScalingObject::unapply_vector_scaling_x ( const SmartPtr< const Vector > &  v)
pure virtual

Returns an x-unscaled version of the given vector.

Implemented in Ipopt::StandardScalingBase.

◆ apply_vector_scaling_c()

virtual SmartPtr< const Vector > Ipopt::NLPScalingObject::apply_vector_scaling_c ( const SmartPtr< const Vector > &  v)
pure virtual

Returns an c-scaled version of the given vector.

Implemented in Ipopt::StandardScalingBase.

◆ unapply_vector_scaling_c()

virtual SmartPtr< const Vector > Ipopt::NLPScalingObject::unapply_vector_scaling_c ( const SmartPtr< const Vector > &  v)
pure virtual

Returns an c-unscaled version of the given vector.

Implemented in Ipopt::StandardScalingBase.

◆ apply_vector_scaling_c_NonConst()

virtual SmartPtr< Vector > Ipopt::NLPScalingObject::apply_vector_scaling_c_NonConst ( const SmartPtr< const Vector > &  v)
pure virtual

Returns an c-scaled version of the given vector.

Implemented in Ipopt::StandardScalingBase.

◆ unapply_vector_scaling_c_NonConst()

virtual SmartPtr< Vector > Ipopt::NLPScalingObject::unapply_vector_scaling_c_NonConst ( const SmartPtr< const Vector > &  v)
pure virtual

Returns an c-unscaled version of the given vector.

Implemented in Ipopt::StandardScalingBase.

◆ apply_vector_scaling_d()

virtual SmartPtr< const Vector > Ipopt::NLPScalingObject::apply_vector_scaling_d ( const SmartPtr< const Vector > &  v)
pure virtual

Returns an d-scaled version of the given vector.

Implemented in Ipopt::StandardScalingBase.

◆ unapply_vector_scaling_d()

virtual SmartPtr< const Vector > Ipopt::NLPScalingObject::unapply_vector_scaling_d ( const SmartPtr< const Vector > &  v)
pure virtual

Returns an d-unscaled version of the given vector.

Implemented in Ipopt::StandardScalingBase.

◆ apply_vector_scaling_d_NonConst()

virtual SmartPtr< Vector > Ipopt::NLPScalingObject::apply_vector_scaling_d_NonConst ( const SmartPtr< const Vector > &  v)
pure virtual

Returns an d-scaled version of the given vector.

Implemented in Ipopt::StandardScalingBase.

◆ unapply_vector_scaling_d_NonConst()

virtual SmartPtr< Vector > Ipopt::NLPScalingObject::unapply_vector_scaling_d_NonConst ( const SmartPtr< const Vector > &  v)
pure virtual

Returns an d-unscaled version of the given vector.

Implemented in Ipopt::StandardScalingBase.

◆ apply_jac_c_scaling()

virtual SmartPtr< const Matrix > Ipopt::NLPScalingObject::apply_jac_c_scaling ( SmartPtr< const Matrix matrix)
pure 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.

Implemented in Ipopt::StandardScalingBase.

◆ apply_jac_d_scaling()

virtual SmartPtr< const Matrix > Ipopt::NLPScalingObject::apply_jac_d_scaling ( SmartPtr< const Matrix matrix)
pure 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.

Implemented in Ipopt::StandardScalingBase.

◆ apply_hessian_scaling()

virtual SmartPtr< const SymMatrix > Ipopt::NLPScalingObject::apply_hessian_scaling ( SmartPtr< const SymMatrix matrix)
pure 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.

Implemented in Ipopt::StandardScalingBase.

◆ apply_vector_scaling_x_LU_NonConst()

SmartPtr< Vector > Ipopt::NLPScalingObject::apply_vector_scaling_x_LU_NonConst ( const Matrix Px_LU,
const SmartPtr< const Vector > &  lu,
const VectorSpace x_space 
)

Methods for scaling bounds - these wrap those above.

Returns an x-scaled vector in the x_L or x_U space

◆ apply_vector_scaling_x_LU()

SmartPtr< const Vector > Ipopt::NLPScalingObject::apply_vector_scaling_x_LU ( const Matrix Px_LU,
const SmartPtr< const Vector > &  lu,
const VectorSpace x_space 
)

Returns an x-scaled vector in the x_L or x_U space.

◆ apply_vector_scaling_d_LU_NonConst()

SmartPtr< Vector > Ipopt::NLPScalingObject::apply_vector_scaling_d_LU_NonConst ( const Matrix Pd_LU,
const SmartPtr< const Vector > &  lu,
const VectorSpace d_space 
)

Returns an d-scaled vector in the d_L or d_U space.

◆ apply_vector_scaling_d_LU()

SmartPtr< const Vector > Ipopt::NLPScalingObject::apply_vector_scaling_d_LU ( const Matrix Pd_LU,
const SmartPtr< const Vector > &  lu,
const VectorSpace d_space 
)

Returns an d-scaled vector in the d_L or d_U space.

◆ unapply_vector_scaling_d_LU_NonConst()

SmartPtr< Vector > Ipopt::NLPScalingObject::unapply_vector_scaling_d_LU_NonConst ( const Matrix Pd_LU,
const SmartPtr< const Vector > &  lu,
const VectorSpace d_space 
)

Returns an d-unscaled vector in the d_L or d_U space.

◆ unapply_vector_scaling_d_LU()

SmartPtr< const Vector > Ipopt::NLPScalingObject::unapply_vector_scaling_d_LU ( const Matrix Pd_LU,
const SmartPtr< const Vector > &  lu,
const VectorSpace d_space 
)

Returns an d-unscaled vector in the d_L or d_U space.

◆ apply_grad_obj_scaling_NonConst()

virtual SmartPtr< Vector > Ipopt::NLPScalingObject::apply_grad_obj_scaling_NonConst ( const SmartPtr< const Vector > &  v)
virtual

Methods for scaling the gradient of the objective - wraps the virtual methods above.

Returns a grad_f scaled version (d_f * D_x^{-1}) of the given vector

◆ apply_grad_obj_scaling()

virtual SmartPtr< const Vector > Ipopt::NLPScalingObject::apply_grad_obj_scaling ( const SmartPtr< const Vector > &  v)
virtual

Returns a grad_f scaled version (d_f * D_x^{-1}) of the given vector.

◆ unapply_grad_obj_scaling_NonConst()

virtual SmartPtr< Vector > Ipopt::NLPScalingObject::unapply_grad_obj_scaling_NonConst ( const SmartPtr< const Vector > &  v)
virtual

Returns a grad_f unscaled version (d_f * D_x^{-1}) of the given vector.

◆ unapply_grad_obj_scaling()

virtual SmartPtr< const Vector > Ipopt::NLPScalingObject::unapply_grad_obj_scaling ( const SmartPtr< const Vector > &  v)
virtual

Returns a grad_f unscaled version (d_f * D_x^{-1}) of the given vector.

◆ have_x_scaling()

virtual bool Ipopt::NLPScalingObject::have_x_scaling ( )
pure virtual

Returns true if the primal x variables are scaled.

Implemented in Ipopt::StandardScalingBase.

◆ have_c_scaling()

virtual bool Ipopt::NLPScalingObject::have_c_scaling ( )
pure virtual

Returns true if the equality constraints are scaled.

Implemented in Ipopt::StandardScalingBase.

◆ have_d_scaling()

virtual bool Ipopt::NLPScalingObject::have_d_scaling ( )
pure virtual

Returns true if the inequality constraints are scaled.

Implemented in Ipopt::StandardScalingBase.

◆ DetermineScaling()

virtual void Ipopt::NLPScalingObject::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 
)
pure virtual

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

Implemented in Ipopt::StandardScalingBase.

◆ InitializeImpl()

virtual bool Ipopt::NLPScalingObject::InitializeImpl ( const OptionsList options,
const std::string &  prefix 
)
protectedpure virtual

Initialization method that has to be overloaded by for each derived class.

Implemented in Ipopt::EquilibrationScaling, Ipopt::GradientScaling, and Ipopt::StandardScalingBase.

◆ Jnlst()

const Journalist & Ipopt::NLPScalingObject::Jnlst ( ) const
inlineprotected

Accessor method for the journalist.

Definition at line 281 of file IpNLPScaling.hpp.

◆ operator=()

void Ipopt::NLPScalingObject::operator= ( const NLPScalingObject )
private

Default Assignment Operator.

Member Data Documentation

◆ jnlst_

SmartPtr<const Journalist> Ipopt::NLPScalingObject::jnlst_
private

Definition at line 308 of file IpNLPScaling.hpp.


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