Ipopt  3.12.12
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
IpGradientScaling.hpp
Go to the documentation of this file.
1 // Copyright (C) 2005, 2009 International Business Machines and others.
2 // All Rights Reserved.
3 // This code is published under the Eclipse Public License.
4 //
5 // $Id: IpGradientScaling.hpp 2269 2013-05-05 11:32:40Z stefan $
6 //
7 // Authors: Carl Laird, Andreas Waechter IBM 2005-07-13
8 
9 #ifndef __IPGRADIENTSCALING_HPP__
10 #define __IPGRADIENTSCALING_HPP__
11 
12 #include "IpNLPScaling.hpp"
13 #include "IpNLP.hpp"
14 
15 namespace Ipopt
16 {
22  {
23  public:
27  :
29  nlp_(nlp)
30  {}
31 
33  virtual ~GradientScaling()
34  {}
36 
40  static void RegisterOptions(const SmartPtr<RegisteredOptions>& roptions);
42 
43  protected:
45  bool InitializeImpl(const OptionsList& options,
46  const std::string& prefix);
47 
48  virtual void DetermineScalingParametersImpl(
49  const SmartPtr<const VectorSpace> x_space,
50  const SmartPtr<const VectorSpace> c_space,
51  const SmartPtr<const VectorSpace> d_space,
52  const SmartPtr<const MatrixSpace> jac_c_space,
53  const SmartPtr<const MatrixSpace> jac_d_space,
54  const SmartPtr<const SymMatrixSpace> h_space,
55  const Matrix& Px_L, const Vector& x_L,
56  const Matrix& Px_U, const Vector& x_U,
57  Number& df,
58  SmartPtr<Vector>& dx,
59  SmartPtr<Vector>& dc,
60  SmartPtr<Vector>& dd);
61 
62  private:
63 
72 
75 
77  void operator=(const GradientScaling&);
79 
82 
85 
88 
91 
94  };
95 } // namespace Ipopt
96 #endif
bool InitializeImpl(const OptionsList &options, const std::string &prefix)
Initialize the object from the options.
virtual ~GradientScaling()
Default destructor.
double Number
Type of all numbers.
Definition: IpTypes.hpp:17
Vector Base Class.
Definition: IpVector.hpp:47
Number scaling_constr_target_gradient_
target size of norm for constraint gradients
This is a base class for many standard scaling techniques.
GradientScaling(const SmartPtr< NLP > &nlp)
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)
This is the method that has to be overloaded by a particular scaling method that somehow computes the...
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:172
This class stores a list of user set options.
This class does problem scaling by setting the scaling parameters based on the maximum of the gradien...
Matrix Base Class.
Definition: IpMatrix.hpp:27
Number * x_L
Lower bounds on variables.
void operator=(const GradientScaling &)
Overloaded Equals Operator.
Number Number * x_U
Upper bounds on variables.
static void RegisterOptions(const SmartPtr< RegisteredOptions > &roptions)
Methods for IpoptType.
SmartPtr< NLP > nlp_
pointer to the NLP to get scaling parameters
Number scaling_obj_target_gradient_
target size of norm for objective gradient
Number scaling_max_gradient_
maximum allowed gradient before scaling is performed
Number scaling_min_value_
minimum value of a scaling parameter