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

This class collects statistics about an optimization run, such as iteration count, final infeasibilities etc. More...

#include <IpSolveStatistics.hpp>

+ Inheritance diagram for Ipopt::SolveStatistics:

Public Member Functions

Constructors/Destructors
 SolveStatistics (const SmartPtr< IpoptNLP > &ip_nlp, const SmartPtr< IpoptData > &ip_data, const SmartPtr< IpoptCalculatedQuantities > &ip_cq)
 Default constructor.
 
virtual ~SolveStatistics ()
 Default destructor.
 
Accessor methods for retrieving different kind of solver statistics information
virtual Index IterationCount () const
 Iteration counts.
 
virtual Number TotalCpuTime () const
 Total CPU time, including function evaluations.
 
IPOPT_DEPRECATED Number TotalCPUTime () const
 Total CPU time, including function evaluations.
 
virtual Number TotalSysTime () const
 Total System time, including function evaluations.
 
virtual Number TotalWallclockTime () const
 Total wall clock time, including function evaluations.
 
virtual void NumberOfEvaluations (Index &num_obj_evals, Index &num_constr_evals, Index &num_obj_grad_evals, Index &num_constr_jac_evals, Index &num_hess_evals) const
 Number of NLP function evaluations.
 
virtual IPOPT_DEPRECATED void Infeasibilities (Number &dual_inf, Number &constr_viol, Number &complementarity, Number &kkt_error) const
 Unscaled solution infeasibilities.
 
virtual void Infeasibilities (Number &dual_inf, Number &constr_viol, Number &varbounds_viol, Number &complementarity, Number &kkt_error) const
 Unscaled solution infeasibilities.
 
virtual IPOPT_DEPRECATED void ScaledInfeasibilities (Number &scaled_dual_inf, Number &scaled_constr_viol, Number &scaled_complementarity, Number &scaled_kkt_error) const
 Scaled solution infeasibilities.
 
virtual void ScaledInfeasibilities (Number &scaled_dual_inf, Number &scaled_constr_viol, Number &scaled_varbounds_viol, Number &scaled_complementarity, Number &scaled_kkt_error) const
 Scaled solution infeasibilities.
 
virtual Number FinalObjective () const
 Final value of objective function.
 
virtual Number FinalScaledObjective () const
 Final scaled value of objective 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
 

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.

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

Private Attributes

Fields for storing the statistics data
Index num_iters_
 Number of iterations.
 
Number total_cpu_time_
 
Number total_sys_time_
 
Number total_wallclock_time_
 
Index num_obj_evals_
 Number of objective function evaluations.
 
Index num_constr_evals_
 Number of constraints evaluations (max of equality and inequality)
 
Index num_obj_grad_evals_
 Number of objective gradient evaluations.
 
Index num_constr_jac_evals_
 Number of constraint Jacobian evaluations.
 
Index num_hess_evals_
 Number of Lagrangian Hessian evaluations.
 
Number scaled_obj_val_
 Final scaled value of objective function.
 
Number obj_val_
 Final unscaled value of objective function.
 
Number scaled_dual_inf_
 Final scaled dual infeasibility (max-norm)
 
Number dual_inf_
 Final unscaled dual infeasibility (max-norm)
 
Number scaled_constr_viol_
 Final scaled constraint violation (max-norm)
 
Number constr_viol_
 Final unscaled constraint violation (max-norm)
 
Number scaled_bound_viol_
 Final scaled variable bound violation (max-norm)
 
Number bound_viol_
 Final unscaled variable bound violation (max-norm)
 
Number scaled_compl_
 Final scaled complementarity error (max-norm)
 
Number compl_
 Final unscaled complementarity error (max-norm)
 
Number scaled_kkt_error_
 Final overall scaled KKT error (max-norm)
 
Number kkt_error_
 Final overall unscaled KKT error (max-norm)
 

Detailed Description

This class collects statistics about an optimization run, such as iteration count, final infeasibilities etc.

It is meant to provide such information to a user of Ipopt during the finalize_solution call.

Definition at line 27 of file IpSolveStatistics.hpp.

Constructor & Destructor Documentation

◆ SolveStatistics() [1/3]

Ipopt::SolveStatistics::SolveStatistics ( const SmartPtr< IpoptNLP > &  ip_nlp,
const SmartPtr< IpoptData > &  ip_data,
const SmartPtr< IpoptCalculatedQuantities > &  ip_cq 
)

Default constructor.

It takes in those collecting Ipopt objects that can provide the statistics information. Those statistics are retrieved at the time of the constructor call.

◆ ~SolveStatistics()

virtual Ipopt::SolveStatistics::~SolveStatistics ( )
inlinevirtual

Default destructor.

Definition at line 46 of file IpSolveStatistics.hpp.

◆ SolveStatistics() [2/3]

Ipopt::SolveStatistics::SolveStatistics ( )
private

Default Constructor.

◆ SolveStatistics() [3/3]

Ipopt::SolveStatistics::SolveStatistics ( const SolveStatistics )
private

Copy Constructor.

Member Function Documentation

◆ IterationCount()

virtual Index Ipopt::SolveStatistics::IterationCount ( ) const
virtual

Iteration counts.

◆ TotalCpuTime()

virtual Number Ipopt::SolveStatistics::TotalCpuTime ( ) const
virtual

Total CPU time, including function evaluations.

◆ TotalCPUTime()

IPOPT_DEPRECATED Number Ipopt::SolveStatistics::TotalCPUTime ( ) const
inline

Total CPU time, including function evaluations.

Deprecated:
Use TotalCpuTime() instead.

Definition at line 63 of file IpSolveStatistics.hpp.

◆ TotalSysTime()

virtual Number Ipopt::SolveStatistics::TotalSysTime ( ) const
virtual

Total System time, including function evaluations.

◆ TotalWallclockTime()

virtual Number Ipopt::SolveStatistics::TotalWallclockTime ( ) const
virtual

Total wall clock time, including function evaluations.

◆ NumberOfEvaluations()

virtual void Ipopt::SolveStatistics::NumberOfEvaluations ( Index num_obj_evals,
Index num_constr_evals,
Index num_obj_grad_evals,
Index num_constr_jac_evals,
Index num_hess_evals 
) const
virtual

Number of NLP function evaluations.

◆ Infeasibilities() [1/2]

virtual IPOPT_DEPRECATED void Ipopt::SolveStatistics::Infeasibilities ( Number dual_inf,
Number constr_viol,
Number complementarity,
Number kkt_error 
) const
virtual

Unscaled solution infeasibilities.

Deprecated:
Use Infeasibilities() with 5 arguments instead.

◆ Infeasibilities() [2/2]

virtual void Ipopt::SolveStatistics::Infeasibilities ( Number dual_inf,
Number constr_viol,
Number varbounds_viol,
Number complementarity,
Number kkt_error 
) const
virtual

Unscaled solution infeasibilities.

Parameters
dual_infdual infeasibility (Gradient of Lagrangian not zero)
constr_violviolation of constraints
varbounds_violviolation of variable bounds
Since
3.14.0
Parameters
complementarityviolation of complementarity
kkt_errorKKT error

◆ ScaledInfeasibilities() [1/2]

virtual IPOPT_DEPRECATED void Ipopt::SolveStatistics::ScaledInfeasibilities ( Number scaled_dual_inf,
Number scaled_constr_viol,
Number scaled_complementarity,
Number scaled_kkt_error 
) const
virtual

Scaled solution infeasibilities.

Deprecated:
Use ScaledInfeasibilities() with 5 arguments instead.

◆ ScaledInfeasibilities() [2/2]

virtual void Ipopt::SolveStatistics::ScaledInfeasibilities ( Number scaled_dual_inf,
Number scaled_constr_viol,
Number scaled_varbounds_viol,
Number scaled_complementarity,
Number scaled_kkt_error 
) const
virtual

Scaled solution infeasibilities.

Deprecated:
Use ScaledInfeasibilities() with 5 arguments instead.
Parameters
scaled_dual_infscaled dual infeasibility (Gradient of Lagrangian not zero)
scaled_constr_violviolation of scaled constraints
scaled_varbounds_violviolation of scaled variable bounds
Since
3.14.0
Parameters
scaled_complementarityviolation of scaled complementarity
scaled_kkt_errorscaled KKT error

◆ FinalObjective()

virtual Number Ipopt::SolveStatistics::FinalObjective ( ) const
virtual

Final value of objective function.

◆ FinalScaledObjective()

virtual Number Ipopt::SolveStatistics::FinalScaledObjective ( ) const
virtual

Final scaled value of objective function.

◆ operator=()

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

Default Assignment Operator.

Member Data Documentation

◆ num_iters_

Index Ipopt::SolveStatistics::num_iters_
private

Number of iterations.

Definition at line 163 of file IpSolveStatistics.hpp.

◆ total_cpu_time_

Number Ipopt::SolveStatistics::total_cpu_time_
private

Definition at line 165 of file IpSolveStatistics.hpp.

◆ total_sys_time_

Number Ipopt::SolveStatistics::total_sys_time_
private

Definition at line 167 of file IpSolveStatistics.hpp.

◆ total_wallclock_time_

Number Ipopt::SolveStatistics::total_wallclock_time_
private

Definition at line 169 of file IpSolveStatistics.hpp.

◆ num_obj_evals_

Index Ipopt::SolveStatistics::num_obj_evals_
private

Number of objective function evaluations.

Definition at line 171 of file IpSolveStatistics.hpp.

◆ num_constr_evals_

Index Ipopt::SolveStatistics::num_constr_evals_
private

Number of constraints evaluations (max of equality and inequality)

Definition at line 173 of file IpSolveStatistics.hpp.

◆ num_obj_grad_evals_

Index Ipopt::SolveStatistics::num_obj_grad_evals_
private

Number of objective gradient evaluations.

Definition at line 175 of file IpSolveStatistics.hpp.

◆ num_constr_jac_evals_

Index Ipopt::SolveStatistics::num_constr_jac_evals_
private

Number of constraint Jacobian evaluations.

Definition at line 177 of file IpSolveStatistics.hpp.

◆ num_hess_evals_

Index Ipopt::SolveStatistics::num_hess_evals_
private

Number of Lagrangian Hessian evaluations.

Definition at line 179 of file IpSolveStatistics.hpp.

◆ scaled_obj_val_

Number Ipopt::SolveStatistics::scaled_obj_val_
private

Final scaled value of objective function.

Definition at line 182 of file IpSolveStatistics.hpp.

◆ obj_val_

Number Ipopt::SolveStatistics::obj_val_
private

Final unscaled value of objective function.

Definition at line 184 of file IpSolveStatistics.hpp.

◆ scaled_dual_inf_

Number Ipopt::SolveStatistics::scaled_dual_inf_
private

Final scaled dual infeasibility (max-norm)

Definition at line 186 of file IpSolveStatistics.hpp.

◆ dual_inf_

Number Ipopt::SolveStatistics::dual_inf_
private

Final unscaled dual infeasibility (max-norm)

Definition at line 188 of file IpSolveStatistics.hpp.

◆ scaled_constr_viol_

Number Ipopt::SolveStatistics::scaled_constr_viol_
private

Final scaled constraint violation (max-norm)

Definition at line 190 of file IpSolveStatistics.hpp.

◆ constr_viol_

Number Ipopt::SolveStatistics::constr_viol_
private

Final unscaled constraint violation (max-norm)

Definition at line 192 of file IpSolveStatistics.hpp.

◆ scaled_bound_viol_

Number Ipopt::SolveStatistics::scaled_bound_viol_
private

Final scaled variable bound violation (max-norm)

Definition at line 194 of file IpSolveStatistics.hpp.

◆ bound_viol_

Number Ipopt::SolveStatistics::bound_viol_
private

Final unscaled variable bound violation (max-norm)

Definition at line 196 of file IpSolveStatistics.hpp.

◆ scaled_compl_

Number Ipopt::SolveStatistics::scaled_compl_
private

Final scaled complementarity error (max-norm)

Definition at line 198 of file IpSolveStatistics.hpp.

◆ compl_

Number Ipopt::SolveStatistics::compl_
private

Final unscaled complementarity error (max-norm)

Definition at line 200 of file IpSolveStatistics.hpp.

◆ scaled_kkt_error_

Number Ipopt::SolveStatistics::scaled_kkt_error_
private

Final overall scaled KKT error (max-norm)

Definition at line 202 of file IpSolveStatistics.hpp.

◆ kkt_error_

Number Ipopt::SolveStatistics::kkt_error_
private

Final overall unscaled KKT error (max-norm)

Definition at line 204 of file IpSolveStatistics.hpp.


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