Ipopt Documentation  
 
Loading...
Searching...
No Matches
Ipopt::OrigIpoptNLP Class Reference

This class maps the traditional NLP into something that is more useful for Ipopt. More...

#include <IpOrigIpoptNLP.hpp>

+ Inheritance diagram for Ipopt::OrigIpoptNLP:

Public Member Functions

virtual bool Initialize (const Journalist &jnlst, const OptionsList &options, const std::string &prefix)
 Initialization method.
 
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.
 
Constructors / Destructor
 OrigIpoptNLP (const SmartPtr< const Journalist > &jnlst, const SmartPtr< NLP > &nlp, const SmartPtr< NLPScalingObject > &nlp_scaling, TimingStatistics &timing_statistics)
 Constructor.
 
virtual ~OrigIpoptNLP ()
 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 () const
 Scaled lower bounds on x.
 
virtual SmartPtr< const MatrixPx_L () const
 Permutation matrix (x_L_ -> x)
 
virtual SmartPtr< const Vectororig_x_L () const
 Original unscaled lower bounds on x.
 
virtual SmartPtr< const Vectorx_U () const
 Scaled upper bounds on x.
 
virtual SmartPtr< const MatrixPx_U () const
 Permutation matrix (x_U_ -> x)
 
virtual SmartPtr< const Vectororig_x_U () const
 Original unscaled upper bounds on x.
 
virtual SmartPtr< const Vectord_L () const
 Scaled lower bounds on d.
 
virtual SmartPtr< const MatrixPd_L () const
 Permutation matrix (d_L_ -> d)
 
virtual SmartPtr< const Vectororig_d_L () const
 Original unscaled lower bounds on d.
 
virtual SmartPtr< const Vectord_U () const
 Scaled upper bounds on d.
 
virtual SmartPtr< const MatrixPd_U () const
 Permutation matrix (d_U_ -> d)
 
virtual SmartPtr< const Vectororig_d_U () const
 Original unscaled upper bounds on d.
 
virtual SmartPtr< const SymMatrixSpaceHessianMatrixSpace () const
 Accessor method to obtain the MatrixSpace for the Hessian matrix (or it's approximation)
 
virtual SmartPtr< const VectorSpacex_space () const
 x_space
 
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, const IpoptData *ip_data, IpoptCalculatedQuantities *ip_cq)
 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)
 
- Public Member Functions inherited from Ipopt::IpoptNLP
SmartPtr< NLPScalingObjectNLP_scaling () const
 Returns the scaling strategy object.
 
 IpoptNLP (const SmartPtr< NLPScalingObject > nlp_scaling)
 
virtual ~IpoptNLP ()
 Destructor.
 
 DECLARE_STD_EXCEPTION (Eval_Error)
 thrown if there is any error evaluating values from the nlp
 
virtual bool objective_depends_on_mu () const
 Method for telling the IpoptCalculatedQuantities class whether the objective function depends on the barrier function.
 
- 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
 

Static Public Member Functions

static void RegisterOptions (SmartPtr< RegisteredOptions > roptions)
 Called to register the options.
 

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.

 OrigIpoptNLP ()
 Default Constructor.
 
 OrigIpoptNLP (const OrigIpoptNLP &)
 Copy Constructor.
 
void operator= (const OrigIpoptNLP &)
 Overloaded Assignment Operator.
 
auxiliary functions
void relax_bounds (Number bound_relax_factor, Vector &bounds)
 relax the bounds by a relative move of relax_bound_factor.
 
SmartPtr< const Vectorget_unscaled_x (const Vector &x)
 Method for getting the unscaled version of the x vector.
 

Private Attributes

SmartPtr< const Journalistjnlst_
 Journalist.
 
SmartPtr< NLPnlp_
 Pointer to the NLP.
 
bool initialized_
 Flag indicating if initialization method has been called.
 
SmartPtr< const VectorSpacex_space_
 Necessary Vector/Matrix spaces.
 
SmartPtr< const VectorSpacec_space_
 
SmartPtr< const VectorSpaced_space_
 
SmartPtr< const VectorSpacex_l_space_
 
SmartPtr< const MatrixSpacepx_l_space_
 
SmartPtr< const VectorSpacex_u_space_
 
SmartPtr< const MatrixSpacepx_u_space_
 
SmartPtr< const VectorSpaced_l_space_
 
SmartPtr< const MatrixSpacepd_l_space_
 
SmartPtr< const VectorSpaced_u_space_
 
SmartPtr< const MatrixSpacepd_u_space_
 
SmartPtr< const MatrixSpacejac_c_space_
 
SmartPtr< const MatrixSpacejac_d_space_
 
SmartPtr< const SymMatrixSpaceh_space_
 
SmartPtr< const MatrixSpacescaled_jac_c_space_
 
SmartPtr< const MatrixSpacescaled_jac_d_space_
 
SmartPtr< const SymMatrixSpacescaled_h_space_
 
Storage for Model Quantities
CachedResults< Numberf_cache_
 Objective function.
 
CachedResults< SmartPtr< const Vector > > grad_f_cache_
 Gradient of the objective function.
 
CachedResults< SmartPtr< const Vector > > c_cache_
 Equality constraint residuals.
 
CachedResults< SmartPtr< const Matrix > > jac_c_cache_
 Jacobian Matrix for equality constraints (current iteration)
 
CachedResults< SmartPtr< const Vector > > d_cache_
 Inequality constraint residual (reformulated as equalities with slacks.
 
CachedResults< SmartPtr< const Matrix > > jac_d_cache_
 Jacobian Matrix for inequality constraints (current iteration)
 
CachedResults< SmartPtr< const SymMatrix > > h_cache_
 Hessian of the lagrangian (current iteration)
 
CachedResults< SmartPtr< const Vector > > unscaled_x_cache_
 Unscaled version of x vector.
 
SmartPtr< const Vectorx_L_
 Lower bounds on x.
 
SmartPtr< const MatrixPx_L_
 Permutation matrix (x_L_ -> x)
 
SmartPtr< const Vectorx_U_
 Upper bounds on x.
 
SmartPtr< const MatrixPx_U_
 Permutation matrix (x_U_ -> x)
 
SmartPtr< const Vectord_L_
 Lower bounds on d.
 
SmartPtr< const MatrixPd_L_
 Permutation matrix (d_L_ -> d)
 
SmartPtr< const Vectord_U_
 Upper bounds on d.
 
SmartPtr< const MatrixPd_U_
 Permutation matrix (d_U_ -> d)
 
SmartPtr< const Vectororig_x_L_
 Original unmodified lower bounds on x.
 
SmartPtr< const Vectororig_x_U_
 Original unmodified upper bounds on x.
 
SmartPtr< const Vectororig_d_L_
 Original unmodified lower bounds on d.
 
SmartPtr< const Vectororig_d_U_
 Original unmodified upper bounds on d.
 
Algorithmic parameters
Number bound_relax_factor_
 relaxation factor for the bounds
 
Number constr_viol_tol_
 constraint violation tolerance (from OptimalityErrorConvergenceCheck)
 
bool honor_original_bounds_
 Flag indicating whether the primal variables should be projected back into original bounds are optimization.
 
bool warm_start_same_structure_
 Flag indicating whether the TNLP with identical structure has already been solved before.
 
HessianApproximationType hessian_approximation_
 Flag indicating what Hessian information is to be used.
 
HessianApproximationSpace hessian_approximation_space_
 Flag indicating in which space Hessian is to be approximated.
 
bool check_derivatives_for_naninf_
 Flag indicating whether it is desired to check if there are Nan or Inf entries in first and second derivative matrices.
 
bool grad_f_constant_
 Flag indicating if we need to ask for objective Gradient only once.
 
bool jac_c_constant_
 Flag indicating if we need to ask for equality constraint Jacobians only once.
 
bool jac_d_constant_
 Flag indicating if we need to ask for inequality constraint Jacobians only once.
 
bool hessian_constant_
 Flag indicating if we need to ask for Hessian only once.
 
Counters for the function evaluations
Index f_evals_
 
Index grad_f_evals_
 
Index c_evals_
 
Index jac_c_evals_
 
Index d_evals_
 
Index jac_d_evals_
 
Index h_evals_
 
Timing statistics for the function evaluations.
TimingStatisticstiming_statistics_
 

Detailed Description

This class maps the traditional NLP into something that is more useful for Ipopt.

This class takes care of storing the calculated model results, handles caching, scaling, and (some day) takes care of addition of slacks.

Given a NLP

\begin{eqnarray*} \mathrm{min} && f(x), \\ \mathrm{s.t.} && c(x) = 0, &\qquad y_c\\ && d_L \leq d(x) \leq d_U, &\qquad y_d \\ && x_L \leq x \leq x_U, &\qquad z_L, z_U \end{eqnarray*}

and (invertible diagonal) scaling matrices \(s_o\), \(s_c\), \(s_d\), \(s_x\), this class represents the NLP

\begin{eqnarray*} \mathrm{min} && s_o f(s_x^{-1} \tilde x), \\ \mathrm{s.t.} && s_c c(s_x^{-1} \tilde x) = 0, &\qquad \tilde y_c \\ && s_d d_L \leq s_d d(s_x^{-1} \tilde x) \leq s_d d_U, &\qquad \tilde y_d \\ && s_x x_L \leq \tilde x \leq s_x x_U, &\qquad \tilde z_L, z_U \end{eqnarray*}

where \(\tilde x\), \(\tilde y_c\), \(\tilde y_d\), \(\tilde z_L\), \(\tilde z_U\), are the primal and dual variables of the scaled problem (though, Ipopt adds slack variables additionally).

The correspondence between a scaled and its corresponding unscaled solution is

\begin{eqnarray*} x && = s_x^{-1} \tilde x \\ y_c && = s_o^{-1} s_c \tilde y_c \\ y_d && = s_o^{-1} s_d \tilde y_d \\ z_L && = s_o^{-1} s_x \tilde z_L \\ z_U && = s_o^{-1} s_x \tilde z_U \end{eqnarray*}

Definition at line 65 of file IpOrigIpoptNLP.hpp.

Constructor & Destructor Documentation

◆ OrigIpoptNLP() [1/3]

Ipopt::OrigIpoptNLP::OrigIpoptNLP ( const SmartPtr< const Journalist > &  jnlst,
const SmartPtr< NLP > &  nlp,
const SmartPtr< NLPScalingObject > &  nlp_scaling,
TimingStatistics timing_statistics 
)

Constructor.

Parameters
jnlstJournalist
nlpNLP
nlp_scalingNLP scaling
timing_statisticsTiming statistics
Since
3.14.0

◆ ~OrigIpoptNLP()

virtual Ipopt::OrigIpoptNLP::~OrigIpoptNLP ( )
virtual

Destructor.

◆ OrigIpoptNLP() [2/3]

Ipopt::OrigIpoptNLP::OrigIpoptNLP ( )
private

Default Constructor.

◆ OrigIpoptNLP() [3/3]

Ipopt::OrigIpoptNLP::OrigIpoptNLP ( const OrigIpoptNLP )
private

Copy Constructor.

Member Function Documentation

◆ Initialize()

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

Initialization method.

Set the internal options and initialize internal data structures.

Reimplemented from Ipopt::IpoptNLP.

◆ InitializeStructures()

virtual bool Ipopt::OrigIpoptNLP::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

Initialize (create) structures for the iteration data.

Implements Ipopt::IpoptNLP.

◆ GetWarmStartIterate()

virtual bool Ipopt::OrigIpoptNLP::GetWarmStartIterate ( IteratesVector warm_start_iterate)
inlinevirtual

Method accessing the GetWarmStartIterate of the NLP.

Implements Ipopt::IpoptNLP.

Definition at line 105 of file IpOrigIpoptNLP.hpp.

◆ f() [1/2]

virtual Number Ipopt::OrigIpoptNLP::f ( const Vector x)
virtual

Accessor methods for model data.

Objective value

Implements Ipopt::IpoptNLP.

◆ f() [2/2]

virtual Number Ipopt::OrigIpoptNLP::f ( const Vector x,
Number  mu 
)
virtual

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

Implements Ipopt::IpoptNLP.

◆ grad_f() [1/2]

virtual SmartPtr< const Vector > Ipopt::OrigIpoptNLP::grad_f ( const Vector x)
virtual

Gradient of the objective.

Implements Ipopt::IpoptNLP.

◆ grad_f() [2/2]

virtual SmartPtr< const Vector > Ipopt::OrigIpoptNLP::grad_f ( const Vector x,
Number  mu 
)
virtual

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

Implements Ipopt::IpoptNLP.

◆ c()

virtual SmartPtr< const Vector > Ipopt::OrigIpoptNLP::c ( const Vector x)
virtual

Equality constraint residual.

Implements Ipopt::IpoptNLP.

◆ jac_c()

virtual SmartPtr< const Matrix > Ipopt::OrigIpoptNLP::jac_c ( const Vector x)
virtual

Jacobian Matrix for equality constraints.

Implements Ipopt::IpoptNLP.

◆ d()

virtual SmartPtr< const Vector > Ipopt::OrigIpoptNLP::d ( const Vector x)
virtual

Inequality constraint residual (reformulated as equalities with slacks)

Implements Ipopt::IpoptNLP.

◆ jac_d()

virtual SmartPtr< const Matrix > Ipopt::OrigIpoptNLP::jac_d ( const Vector x)
virtual

Jacobian Matrix for inequality constraints.

Implements Ipopt::IpoptNLP.

◆ h() [1/2]

virtual SmartPtr< const SymMatrix > Ipopt::OrigIpoptNLP::h ( const Vector x,
Number  obj_factor,
const Vector yc,
const Vector yd 
)
virtual

Hessian of the Lagrangian.

Implements Ipopt::IpoptNLP.

◆ h() [2/2]

virtual SmartPtr< const SymMatrix > Ipopt::OrigIpoptNLP::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 Ipopt::IpoptNLP.

◆ uninitialized_h()

virtual SmartPtr< const SymMatrix > Ipopt::OrigIpoptNLP::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 Ipopt::IpoptNLP.

◆ x_L()

virtual SmartPtr< const Vector > Ipopt::OrigIpoptNLP::x_L ( ) const
inlinevirtual

Scaled lower bounds on x.

Implements Ipopt::IpoptNLP.

Definition at line 189 of file IpOrigIpoptNLP.hpp.

◆ Px_L()

virtual SmartPtr< const Matrix > Ipopt::OrigIpoptNLP::Px_L ( ) const
inlinevirtual

Permutation matrix (x_L_ -> x)

Implements Ipopt::IpoptNLP.

Definition at line 195 of file IpOrigIpoptNLP.hpp.

◆ orig_x_L()

virtual SmartPtr< const Vector > Ipopt::OrigIpoptNLP::orig_x_L ( ) const
inlinevirtual

Original unscaled lower bounds on x.

Returns NULL if bounds are not relaxed.

Since
3.14.0

Definition at line 205 of file IpOrigIpoptNLP.hpp.

◆ x_U()

virtual SmartPtr< const Vector > Ipopt::OrigIpoptNLP::x_U ( ) const
inlinevirtual

Scaled upper bounds on x.

Implements Ipopt::IpoptNLP.

Definition at line 211 of file IpOrigIpoptNLP.hpp.

◆ Px_U()

virtual SmartPtr< const Matrix > Ipopt::OrigIpoptNLP::Px_U ( ) const
inlinevirtual

Permutation matrix (x_U_ -> x)

Implements Ipopt::IpoptNLP.

Definition at line 217 of file IpOrigIpoptNLP.hpp.

◆ orig_x_U()

virtual SmartPtr< const Vector > Ipopt::OrigIpoptNLP::orig_x_U ( ) const
inlinevirtual

Original unscaled upper bounds on x.

Returns NULL if bounds are not relaxed.

Since
3.14.0

Definition at line 227 of file IpOrigIpoptNLP.hpp.

◆ d_L()

virtual SmartPtr< const Vector > Ipopt::OrigIpoptNLP::d_L ( ) const
inlinevirtual

Scaled lower bounds on d.

Implements Ipopt::IpoptNLP.

Definition at line 233 of file IpOrigIpoptNLP.hpp.

◆ Pd_L()

virtual SmartPtr< const Matrix > Ipopt::OrigIpoptNLP::Pd_L ( ) const
inlinevirtual

Permutation matrix (d_L_ -> d)

Implements Ipopt::IpoptNLP.

Definition at line 239 of file IpOrigIpoptNLP.hpp.

◆ orig_d_L()

virtual SmartPtr< const Vector > Ipopt::OrigIpoptNLP::orig_d_L ( ) const
inlinevirtual

Original unscaled lower bounds on d.

Returns NULL if bounds are not relaxed.

Since
3.14.10

Definition at line 249 of file IpOrigIpoptNLP.hpp.

◆ d_U()

virtual SmartPtr< const Vector > Ipopt::OrigIpoptNLP::d_U ( ) const
inlinevirtual

Scaled upper bounds on d.

Implements Ipopt::IpoptNLP.

Definition at line 255 of file IpOrigIpoptNLP.hpp.

◆ Pd_U()

virtual SmartPtr< const Matrix > Ipopt::OrigIpoptNLP::Pd_U ( ) const
inlinevirtual

Permutation matrix (d_U_ -> d)

Implements Ipopt::IpoptNLP.

Definition at line 261 of file IpOrigIpoptNLP.hpp.

◆ orig_d_U()

virtual SmartPtr< const Vector > Ipopt::OrigIpoptNLP::orig_d_U ( ) const
inlinevirtual

Original unscaled upper bounds on d.

Returns NULL if bounds are not relaxed.

Since
3.14.10

Definition at line 271 of file IpOrigIpoptNLP.hpp.

◆ HessianMatrixSpace()

virtual SmartPtr< const SymMatrixSpace > Ipopt::OrigIpoptNLP::HessianMatrixSpace ( ) const
inlinevirtual

Accessor method to obtain the MatrixSpace for the Hessian matrix (or it's approximation)

Implements Ipopt::IpoptNLP.

Definition at line 276 of file IpOrigIpoptNLP.hpp.

◆ x_space()

virtual SmartPtr< const VectorSpace > Ipopt::OrigIpoptNLP::x_space ( ) const
inlinevirtual

x_space

Implements Ipopt::IpoptNLP.

Definition at line 281 of file IpOrigIpoptNLP.hpp.

◆ GetSpaces()

virtual void Ipopt::OrigIpoptNLP::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 Ipopt::IpoptNLP.

◆ AdjustVariableBounds()

virtual void Ipopt::OrigIpoptNLP::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 Ipopt::IpoptNLP.

◆ f_evals()

virtual Index Ipopt::OrigIpoptNLP::f_evals ( ) const
inlinevirtual

Implements Ipopt::IpoptNLP.

Definition at line 316 of file IpOrigIpoptNLP.hpp.

◆ grad_f_evals()

virtual Index Ipopt::OrigIpoptNLP::grad_f_evals ( ) const
inlinevirtual

Implements Ipopt::IpoptNLP.

Definition at line 320 of file IpOrigIpoptNLP.hpp.

◆ c_evals()

virtual Index Ipopt::OrigIpoptNLP::c_evals ( ) const
inlinevirtual

Implements Ipopt::IpoptNLP.

Definition at line 324 of file IpOrigIpoptNLP.hpp.

◆ jac_c_evals()

virtual Index Ipopt::OrigIpoptNLP::jac_c_evals ( ) const
inlinevirtual

Implements Ipopt::IpoptNLP.

Definition at line 328 of file IpOrigIpoptNLP.hpp.

◆ d_evals()

virtual Index Ipopt::OrigIpoptNLP::d_evals ( ) const
inlinevirtual

Implements Ipopt::IpoptNLP.

Definition at line 332 of file IpOrigIpoptNLP.hpp.

◆ jac_d_evals()

virtual Index Ipopt::OrigIpoptNLP::jac_d_evals ( ) const
inlinevirtual

Implements Ipopt::IpoptNLP.

Definition at line 336 of file IpOrigIpoptNLP.hpp.

◆ h_evals()

virtual Index Ipopt::OrigIpoptNLP::h_evals ( ) const
inlinevirtual

Implements Ipopt::IpoptNLP.

Definition at line 340 of file IpOrigIpoptNLP.hpp.

◆ FinalizeSolution()

void Ipopt::OrigIpoptNLP::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,
const IpoptData ip_data,
IpoptCalculatedQuantities ip_cq 
)
virtual

Solution Routines - overloaded from IpoptNLP.

Implements Ipopt::IpoptNLP.

◆ IntermediateCallBack()

bool Ipopt::OrigIpoptNLP::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

Implements Ipopt::IpoptNLP.

◆ RegisterOptions()

static void Ipopt::OrigIpoptNLP::RegisterOptions ( SmartPtr< RegisteredOptions roptions)
static

Called to register the options.

◆ nlp()

SmartPtr< NLP > Ipopt::OrigIpoptNLP::nlp ( )
inline

Accessor method to the underlying NLP.

Definition at line 385 of file IpOrigIpoptNLP.hpp.

◆ operator=()

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

Overloaded Assignment Operator.

◆ relax_bounds()

void Ipopt::OrigIpoptNLP::relax_bounds ( Number  bound_relax_factor,
Vector bounds 
)
private

relax the bounds by a relative move of relax_bound_factor.

Here, relax_bound_factor should be negative (or zero) for lower bounds, and positive (or zero) for upper bounds.

◆ get_unscaled_x()

SmartPtr< const Vector > Ipopt::OrigIpoptNLP::get_unscaled_x ( const Vector x)
private

Method for getting the unscaled version of the x vector.

Member Data Documentation

◆ jnlst_

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

Journalist.

Definition at line 392 of file IpOrigIpoptNLP.hpp.

◆ nlp_

SmartPtr<NLP> Ipopt::OrigIpoptNLP::nlp_
private

Pointer to the NLP.

Definition at line 395 of file IpOrigIpoptNLP.hpp.

◆ x_space_

SmartPtr<const VectorSpace> Ipopt::OrigIpoptNLP::x_space_
private

Necessary Vector/Matrix spaces.

Definition at line 399 of file IpOrigIpoptNLP.hpp.

◆ c_space_

SmartPtr<const VectorSpace> Ipopt::OrigIpoptNLP::c_space_
private

Definition at line 400 of file IpOrigIpoptNLP.hpp.

◆ d_space_

SmartPtr<const VectorSpace> Ipopt::OrigIpoptNLP::d_space_
private

Definition at line 401 of file IpOrigIpoptNLP.hpp.

◆ x_l_space_

SmartPtr<const VectorSpace> Ipopt::OrigIpoptNLP::x_l_space_
private

Definition at line 402 of file IpOrigIpoptNLP.hpp.

◆ px_l_space_

SmartPtr<const MatrixSpace> Ipopt::OrigIpoptNLP::px_l_space_
private

Definition at line 403 of file IpOrigIpoptNLP.hpp.

◆ x_u_space_

SmartPtr<const VectorSpace> Ipopt::OrigIpoptNLP::x_u_space_
private

Definition at line 404 of file IpOrigIpoptNLP.hpp.

◆ px_u_space_

SmartPtr<const MatrixSpace> Ipopt::OrigIpoptNLP::px_u_space_
private

Definition at line 405 of file IpOrigIpoptNLP.hpp.

◆ d_l_space_

SmartPtr<const VectorSpace> Ipopt::OrigIpoptNLP::d_l_space_
private

Definition at line 406 of file IpOrigIpoptNLP.hpp.

◆ pd_l_space_

SmartPtr<const MatrixSpace> Ipopt::OrigIpoptNLP::pd_l_space_
private

Definition at line 407 of file IpOrigIpoptNLP.hpp.

◆ d_u_space_

SmartPtr<const VectorSpace> Ipopt::OrigIpoptNLP::d_u_space_
private

Definition at line 408 of file IpOrigIpoptNLP.hpp.

◆ pd_u_space_

SmartPtr<const MatrixSpace> Ipopt::OrigIpoptNLP::pd_u_space_
private

Definition at line 409 of file IpOrigIpoptNLP.hpp.

◆ jac_c_space_

SmartPtr<const MatrixSpace> Ipopt::OrigIpoptNLP::jac_c_space_
private

Definition at line 410 of file IpOrigIpoptNLP.hpp.

◆ jac_d_space_

SmartPtr<const MatrixSpace> Ipopt::OrigIpoptNLP::jac_d_space_
private

Definition at line 411 of file IpOrigIpoptNLP.hpp.

◆ h_space_

SmartPtr<const SymMatrixSpace> Ipopt::OrigIpoptNLP::h_space_
private

Definition at line 412 of file IpOrigIpoptNLP.hpp.

◆ scaled_jac_c_space_

SmartPtr<const MatrixSpace> Ipopt::OrigIpoptNLP::scaled_jac_c_space_
private

Definition at line 414 of file IpOrigIpoptNLP.hpp.

◆ scaled_jac_d_space_

SmartPtr<const MatrixSpace> Ipopt::OrigIpoptNLP::scaled_jac_d_space_
private

Definition at line 415 of file IpOrigIpoptNLP.hpp.

◆ scaled_h_space_

SmartPtr<const SymMatrixSpace> Ipopt::OrigIpoptNLP::scaled_h_space_
private

Definition at line 416 of file IpOrigIpoptNLP.hpp.

◆ f_cache_

CachedResults<Number> Ipopt::OrigIpoptNLP::f_cache_
private

Objective function.

Definition at line 422 of file IpOrigIpoptNLP.hpp.

◆ grad_f_cache_

CachedResults<SmartPtr<const Vector> > Ipopt::OrigIpoptNLP::grad_f_cache_
private

Gradient of the objective function.

Definition at line 425 of file IpOrigIpoptNLP.hpp.

◆ c_cache_

CachedResults<SmartPtr<const Vector> > Ipopt::OrigIpoptNLP::c_cache_
private

Equality constraint residuals.

Definition at line 428 of file IpOrigIpoptNLP.hpp.

◆ jac_c_cache_

CachedResults<SmartPtr<const Matrix> > Ipopt::OrigIpoptNLP::jac_c_cache_
private

Jacobian Matrix for equality constraints (current iteration)

Definition at line 433 of file IpOrigIpoptNLP.hpp.

◆ d_cache_

CachedResults<SmartPtr<const Vector> > Ipopt::OrigIpoptNLP::d_cache_
private

Inequality constraint residual (reformulated as equalities with slacks.

Definition at line 438 of file IpOrigIpoptNLP.hpp.

◆ jac_d_cache_

CachedResults<SmartPtr<const Matrix> > Ipopt::OrigIpoptNLP::jac_d_cache_
private

Jacobian Matrix for inequality constraints (current iteration)

Definition at line 443 of file IpOrigIpoptNLP.hpp.

◆ h_cache_

CachedResults<SmartPtr<const SymMatrix> > Ipopt::OrigIpoptNLP::h_cache_
private

Hessian of the lagrangian (current iteration)

Definition at line 448 of file IpOrigIpoptNLP.hpp.

◆ unscaled_x_cache_

CachedResults<SmartPtr<const Vector> > Ipopt::OrigIpoptNLP::unscaled_x_cache_
private

Unscaled version of x vector.

Definition at line 451 of file IpOrigIpoptNLP.hpp.

◆ x_L_

SmartPtr<const Vector> Ipopt::OrigIpoptNLP::x_L_
private

Lower bounds on x.

Definition at line 454 of file IpOrigIpoptNLP.hpp.

◆ Px_L_

SmartPtr<const Matrix> Ipopt::OrigIpoptNLP::Px_L_
private

Permutation matrix (x_L_ -> x)

Definition at line 457 of file IpOrigIpoptNLP.hpp.

◆ x_U_

SmartPtr<const Vector> Ipopt::OrigIpoptNLP::x_U_
private

Upper bounds on x.

Definition at line 460 of file IpOrigIpoptNLP.hpp.

◆ Px_U_

SmartPtr<const Matrix> Ipopt::OrigIpoptNLP::Px_U_
private

Permutation matrix (x_U_ -> x)

Definition at line 463 of file IpOrigIpoptNLP.hpp.

◆ d_L_

SmartPtr<const Vector> Ipopt::OrigIpoptNLP::d_L_
private

Lower bounds on d.

Definition at line 466 of file IpOrigIpoptNLP.hpp.

◆ Pd_L_

SmartPtr<const Matrix> Ipopt::OrigIpoptNLP::Pd_L_
private

Permutation matrix (d_L_ -> d)

Definition at line 469 of file IpOrigIpoptNLP.hpp.

◆ d_U_

SmartPtr<const Vector> Ipopt::OrigIpoptNLP::d_U_
private

Upper bounds on d.

Definition at line 472 of file IpOrigIpoptNLP.hpp.

◆ Pd_U_

SmartPtr<const Matrix> Ipopt::OrigIpoptNLP::Pd_U_
private

Permutation matrix (d_U_ -> d)

Definition at line 475 of file IpOrigIpoptNLP.hpp.

◆ orig_x_L_

SmartPtr<const Vector> Ipopt::OrigIpoptNLP::orig_x_L_
private

Original unmodified lower bounds on x.

Definition at line 478 of file IpOrigIpoptNLP.hpp.

◆ orig_x_U_

SmartPtr<const Vector> Ipopt::OrigIpoptNLP::orig_x_U_
private

Original unmodified upper bounds on x.

Definition at line 481 of file IpOrigIpoptNLP.hpp.

◆ orig_d_L_

SmartPtr<const Vector> Ipopt::OrigIpoptNLP::orig_d_L_
private

Original unmodified lower bounds on d.

Definition at line 484 of file IpOrigIpoptNLP.hpp.

◆ orig_d_U_

SmartPtr<const Vector> Ipopt::OrigIpoptNLP::orig_d_U_
private

Original unmodified upper bounds on d.

Definition at line 487 of file IpOrigIpoptNLP.hpp.

◆ bound_relax_factor_

Number Ipopt::OrigIpoptNLP::bound_relax_factor_
private

relaxation factor for the bounds

Definition at line 536 of file IpOrigIpoptNLP.hpp.

◆ constr_viol_tol_

Number Ipopt::OrigIpoptNLP::constr_viol_tol_
private

constraint violation tolerance (from OptimalityErrorConvergenceCheck)

Definition at line 539 of file IpOrigIpoptNLP.hpp.

◆ honor_original_bounds_

bool Ipopt::OrigIpoptNLP::honor_original_bounds_
private

Flag indicating whether the primal variables should be projected back into original bounds are optimization.

Definition at line 544 of file IpOrigIpoptNLP.hpp.

◆ warm_start_same_structure_

bool Ipopt::OrigIpoptNLP::warm_start_same_structure_
private

Flag indicating whether the TNLP with identical structure has already been solved before.

Definition at line 549 of file IpOrigIpoptNLP.hpp.

◆ hessian_approximation_

HessianApproximationType Ipopt::OrigIpoptNLP::hessian_approximation_
private

Flag indicating what Hessian information is to be used.

Definition at line 552 of file IpOrigIpoptNLP.hpp.

◆ hessian_approximation_space_

HessianApproximationSpace Ipopt::OrigIpoptNLP::hessian_approximation_space_
private

Flag indicating in which space Hessian is to be approximated.

Definition at line 555 of file IpOrigIpoptNLP.hpp.

◆ check_derivatives_for_naninf_

bool Ipopt::OrigIpoptNLP::check_derivatives_for_naninf_
private

Flag indicating whether it is desired to check if there are Nan or Inf entries in first and second derivative matrices.

Definition at line 560 of file IpOrigIpoptNLP.hpp.

◆ grad_f_constant_

bool Ipopt::OrigIpoptNLP::grad_f_constant_
private

Flag indicating if we need to ask for objective Gradient only once.

Definition at line 565 of file IpOrigIpoptNLP.hpp.

◆ jac_c_constant_

bool Ipopt::OrigIpoptNLP::jac_c_constant_
private

Flag indicating if we need to ask for equality constraint Jacobians only once.

Definition at line 570 of file IpOrigIpoptNLP.hpp.

◆ jac_d_constant_

bool Ipopt::OrigIpoptNLP::jac_d_constant_
private

Flag indicating if we need to ask for inequality constraint Jacobians only once.

Definition at line 575 of file IpOrigIpoptNLP.hpp.

◆ hessian_constant_

bool Ipopt::OrigIpoptNLP::hessian_constant_
private

Flag indicating if we need to ask for Hessian only once.

Definition at line 578 of file IpOrigIpoptNLP.hpp.

◆ f_evals_

Index Ipopt::OrigIpoptNLP::f_evals_
private

Definition at line 583 of file IpOrigIpoptNLP.hpp.

◆ grad_f_evals_

Index Ipopt::OrigIpoptNLP::grad_f_evals_
private

Definition at line 584 of file IpOrigIpoptNLP.hpp.

◆ c_evals_

Index Ipopt::OrigIpoptNLP::c_evals_
private

Definition at line 585 of file IpOrigIpoptNLP.hpp.

◆ jac_c_evals_

Index Ipopt::OrigIpoptNLP::jac_c_evals_
private

Definition at line 586 of file IpOrigIpoptNLP.hpp.

◆ d_evals_

Index Ipopt::OrigIpoptNLP::d_evals_
private

Definition at line 587 of file IpOrigIpoptNLP.hpp.

◆ jac_d_evals_

Index Ipopt::OrigIpoptNLP::jac_d_evals_
private

Definition at line 588 of file IpOrigIpoptNLP.hpp.

◆ h_evals_

Index Ipopt::OrigIpoptNLP::h_evals_
private

Definition at line 589 of file IpOrigIpoptNLP.hpp.

◆ initialized_

bool Ipopt::OrigIpoptNLP::initialized_
private

Flag indicating if initialization method has been called.

Definition at line 593 of file IpOrigIpoptNLP.hpp.

◆ timing_statistics_

TimingStatistics& Ipopt::OrigIpoptNLP::timing_statistics_
private

Definition at line 597 of file IpOrigIpoptNLP.hpp.


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