IpoptData Class Reference

#include <IpIpoptData.hpp>

Inheritance diagram for IpoptData:

ReferencedObject

List of all members.


Detailed Description

Class to organize all the data required by the algorithm.

Internally, once this Data object has been initialized, all internal curr_ vectors must always be set (so that prototyes are available). The current values can only be set from the trial values. The trial values can be set by copying from a vector or by adding some fraction of a step to the current values. This object also stores steps, which allows to easily communicate the step from the step computation object to the line search object.

Public Member Functions

bool InitializeDataStructures (IpoptNLP &ip_nlp, bool want_x, bool want_y_c, bool want_y_d, bool want_z_L, bool want_z_U)
 Initialize Data Structures.
bool Initialize (const Journalist &jnlst, const OptionsList &options, const std::string &prefix)
 This method must be called to initialize the global algorithmic parameters.
TimingStatisticsTimingStats ()
 Return Timing Statistics Object.
Constructors/Destructors
 IpoptData ()
 Constructor.
 ~IpoptData ()
 Default destructor.
Get Methods for Iterates
SmartPtr< const IteratesVectorcurr () const
 Current point.
SmartPtr< const IteratesVectortrial () const
 Get the current point in a copied container that is non-const.
void set_trial (SmartPtr< IteratesVector > &trial)
 Get Trial point in a copied container that is non-const.
void SetTrialPrimalVariablesFromStep (Number alpha, const Vector &delta_x, const Vector &delta_s)
 Set the values of the primal trial variables (x and s) from provided Step with step length alpha.
void SetTrialEqMultipliersFromStep (Number alpha, const Vector &delta_y_c, const Vector &delta_y_d)
 Set the values of the trial values for the equality constraint multipliers (y_c and y_d) from provided step with step length alpha.
void SetTrialBoundMultipliersFromStep (Number alpha, const Vector &delta_z_L, const Vector &delta_z_U, const Vector &delta_v_L, const Vector &delta_v_U)
 Set the value of the trial values for the bound multipliers (z_L, z_U, v_L, v_U) from provided step with step length alpha.
SmartPtr< const IteratesVectordelta () const
 ToDo: I may need to add versions of set_trial like the following, but I am not sure.
void set_delta (SmartPtr< IteratesVector > &delta)
 Set the current delta - like the trial point, this method copies the pointer for efficiency (no copy and to keep cache tags the same) so after you call set, you cannot modify the data.
SmartPtr< const IteratesVectordelta_aff () const
 Affine Delta.
void set_delta_aff (SmartPtr< IteratesVector > &delta_aff)
 Set the affine delta - like the trial point, this method copies the pointer for efficiency (no copy and to keep cache tags the same) so after you call set, you cannot modify the data.
SmartPtr< const SymMatrixW ()
 Hessian or Hessian approximation (do not hold on to it, it might be changed).
void Set_W (SmartPtr< const SymMatrix > W)
 Set Hessian approximation.
("Main") Primal-dual search direction. Those fields are
used to store the search directions computed from solving the primal-dual system, and can be used in the line search.

They are overwritten in every iteration, so do not hold on to the pointers (make copies instead)

bool HaveDeltas () const
 Returns true, if the primal-dual step have been already computed for the current iteration.
void SetHaveDeltas (bool have_deltas)
 Method for setting the HaveDeltas flag.
Affine-scaling step. Those fields can be used to store
the affine scaling step.

For example, if the method for computing the current barrier parameter computes the affine scaling steps, then the corrector step in the line search does not have to recompute those solutions of the linear system.

bool HaveAffineDeltas () const
 Returns true, if the affine-scaling step have been already computed for the current iteration.
void SetHaveAffineDeltas (bool have_affine_deltas)
 Method for setting the HaveDeltas flag.
Public Methods for updating iterates
void CopyTrialToCurrent ()
 Copy the trial values to the current values.
void AcceptTrialPoint ()
 Set the current iterate values from the trial values.
General algorithmic data
Index iter_count () const
 Setting the flag that indicates if a tiny step (below machine precision) has been detected.
void Set_iter_count (Index iter_count)
 Setting the flag that indicates if a tiny step (below machine precision) has been detected.
Number curr_mu () const
 Setting the flag that indicates if a tiny step (below machine precision) has been detected.
void Set_mu (Number mu)
 Setting the flag that indicates if a tiny step (below machine precision) has been detected.
bool MuInitialized () const
 Setting the flag that indicates if a tiny step (below machine precision) has been detected.
Number curr_tau () const
 Setting the flag that indicates if a tiny step (below machine precision) has been detected.
void Set_tau (Number tau)
 Setting the flag that indicates if a tiny step (below machine precision) has been detected.
bool TauInitialized () const
 Setting the flag that indicates if a tiny step (below machine precision) has been detected.
void SetFreeMuMode (bool free_mu_mode)
 Setting the flag that indicates if a tiny step (below machine precision) has been detected.
bool FreeMuMode () const
 Setting the flag that indicates if a tiny step (below machine precision) has been detected.
void Set_tiny_step_flag (bool flag)
 Setting the flag that indicates if a tiny step (below machine precision) has been detected.
bool tiny_step_flag ()
 Setting the flag that indicates if a tiny step (below machine precision) has been detected.
Number tol () const
 Overall convergence tolerance.
void Set_tol (Number tol)
 Set a new value for the tolerance.
Information gathered for iteration output
Number info_regu_x () const
 Set this to true, if the next time when output is written, the summary line should not be printed.
void Set_info_regu_x (Number regu_x)
 Set this to true, if the next time when output is written, the summary line should not be printed.
Number info_alpha_primal () const
 Set this to true, if the next time when output is written, the summary line should not be printed.
void Set_info_alpha_primal (Number alpha_primal)
 Set this to true, if the next time when output is written, the summary line should not be printed.
char info_alpha_primal_char () const
 Set this to true, if the next time when output is written, the summary line should not be printed.
void Set_info_alpha_primal_char (char info_alpha_primal_char)
 Set this to true, if the next time when output is written, the summary line should not be printed.
Number info_alpha_dual () const
 Set this to true, if the next time when output is written, the summary line should not be printed.
void Set_info_alpha_dual (Number alpha_dual)
 Set this to true, if the next time when output is written, the summary line should not be printed.
Index info_ls_count () const
 Set this to true, if the next time when output is written, the summary line should not be printed.
void Set_info_ls_count (Index ls_count)
 Set this to true, if the next time when output is written, the summary line should not be printed.
bool info_skip_output () const
 Set this to true, if the next time when output is written, the summary line should not be printed.
void Append_info_string (const std::string &add_str)
 Set this to true, if the next time when output is written, the summary line should not be printed.
const std::string & info_string () const
 Set this to true, if the next time when output is written, the summary line should not be printed.
void Set_info_skip_output (bool info_skip_output)
 Set this to true, if the next time when output is written, the summary line should not be printed.
void ResetInfo ()
 Reset all info fields.

Static Public Member Functions

static void RegisterOptions (const SmartPtr< RegisteredOptions > &roptions)
 Methods for IpoptType.


Constructor & Destructor Documentation

IpoptData (  ) 

Constructor.

~IpoptData (  ) 

Default destructor.


Member Function Documentation

bool InitializeDataStructures ( IpoptNLP ip_nlp,
bool  want_x,
bool  want_y_c,
bool  want_y_d,
bool  want_z_L,
bool  want_z_U 
)

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

This method must be called to initialize the global algorithmic parameters.

The parameters are taken from the OptionsList object.

References OptionsList::GetNumericValue(), and IpoptData::ResetInfo().

Referenced by IpoptAlgorithm::InitializeImpl().

SmartPtr< const IteratesVector > curr (  )  const [inline]

SmartPtr< const IteratesVector > trial (  )  const [inline]

Get the current point in a copied container that is non-const.

The entries in the container cannot be modified, but the container can be modified to point to new entries. Get Trial point

References DBG_ASSERT, and Ipopt::IsNull().

Referenced by DefaultIterateInitializer::least_square_mults(), MinC_1NrmRestorationPhase::PerformRestoration(), RestoIterateInitializer::SetInitialIterates(), DefaultIterateInitializer::SetInitialIterates(), IpoptData::SetTrialBoundMultipliersFromStep(), and IpoptData::SetTrialEqMultipliersFromStep().

void set_trial ( SmartPtr< IteratesVector > &  trial  )  [inline]

Get Trial point in a copied container that is non-const.

The entries in the container can not be modified, but the container can be modified to point to new entries. Set the trial point - this method copies the pointer for efficiency (no copy and to keep cache tags the same) so after you call set you cannot modify the data again

References Ipopt::ConstPtr(), DBG_ASSERT, Ipopt::GetRawPtr(), and Ipopt::IsValid().

Referenced by DefaultIterateInitializer::least_square_mults(), RestoRestorationPhase::PerformRestoration(), MinC_1NrmRestorationPhase::PerformRestoration(), WarmStartIterateInitializer::SetInitialIterates(), RestoIterateInitializer::SetInitialIterates(), DefaultIterateInitializer::SetInitialIterates(), IpoptData::SetTrialBoundMultipliersFromStep(), IpoptData::SetTrialEqMultipliersFromStep(), IpoptData::SetTrialPrimalVariablesFromStep(), and AdaptiveMuUpdate::UpdateBarrierParameter().

void SetTrialPrimalVariablesFromStep ( Number  alpha,
const Vector delta_x,
const Vector delta_s 
)

Set the values of the primal trial variables (x and s) from provided Step with step length alpha.

References DBG_ASSERT, Ipopt::IsNull(), and IpoptData::set_trial().

Referenced by BacktrackingLineSearch::FindAcceptableTrialPoint(), FilterLSAcceptor::TryCorrector(), and FilterLSAcceptor::TrySecondOrderCorrection().

void SetTrialEqMultipliersFromStep ( Number  alpha,
const Vector delta_y_c,
const Vector delta_y_d 
)

Set the values of the trial values for the equality constraint multipliers (y_c and y_d) from provided step with step length alpha.

References IpoptData::curr(), DBG_ASSERT, IpoptData::set_trial(), and IpoptData::trial().

void SetTrialBoundMultipliersFromStep ( Number  alpha,
const Vector delta_z_L,
const Vector delta_z_U,
const Vector delta_v_L,
const Vector delta_v_U 
)

Set the value of the trial values for the bound multipliers (z_L, z_U, v_L, v_U) from provided step with step length alpha.

References IpoptData::curr(), DBG_ASSERT, IpoptData::set_trial(), and IpoptData::trial().

Referenced by MinC_1NrmRestorationPhase::PerformRestoration(), and FilterLSAcceptor::TryCorrector().

SmartPtr< const IteratesVector > delta (  )  const [inline]

ToDo: I may need to add versions of set_trial like the following, but I am not sure.

get the current delta

References DBG_ASSERT, and Ipopt::IsNull().

Referenced by BacktrackingLineSearch::FindAcceptableTrialPoint(), RestoIterationOutput::WriteOutput(), and OrigIterationOutput::WriteOutput().

void set_delta ( SmartPtr< IteratesVector > &  delta  )  [inline]

Set the current delta - like the trial point, this method copies the pointer for efficiency (no copy and to keep cache tags the same) so after you call set, you cannot modify the data.

References Ipopt::ConstPtr(), and Ipopt::IsValid().

Referenced by QualityFunctionMuOracle::CalculateMu().

SmartPtr< const IteratesVector > delta_aff (  )  const [inline]

Affine Delta.

References DBG_ASSERT, and Ipopt::IsNull().

Referenced by FilterLSAcceptor::TryCorrector().

void set_delta_aff ( SmartPtr< IteratesVector > &  delta_aff  )  [inline]

Set the affine delta - like the trial point, this method copies the pointer for efficiency (no copy and to keep cache tags the same) so after you call set, you cannot modify the data.

References Ipopt::ConstPtr(), and Ipopt::IsValid().

Referenced by QualityFunctionMuOracle::CalculateMu(), ProbingMuOracle::CalculateMu(), and FilterLSAcceptor::TryCorrector().

SmartPtr<const SymMatrix> W (  )  [inline]

Hessian or Hessian approximation (do not hold on to it, it might be changed).

References DBG_ASSERT, and Ipopt::IsValid().

Referenced by PDFullSpaceSolver::Solve(), RestoIterationOutput::WriteOutput(), and OrigIterationOutput::WriteOutput().

void Set_W ( SmartPtr< const SymMatrix W  )  [inline]

Set Hessian approximation.

Referenced by ExactHessianUpdater::UpdateHessian().

bool HaveDeltas (  )  const [inline]

Returns true, if the primal-dual step have been already computed for the current iteration.

This flag is reset after every call of AcceptTrialPoint(). If the search direction is computed during the computation of the barrier parameter, the method computing the barrier parameter should call SetHaveDeltas(true) to tell the IpoptAlgorithm object that it doesn't need to recompute the primal-dual step.

void SetHaveDeltas ( bool  have_deltas  )  [inline]

Method for setting the HaveDeltas flag.

This method should be called if some method computes the primal-dual step (and stores it in the delta_ fields of IpoptData) at an early part of the iteration. If that flag is set to true, the IpoptAlgorithm object will not recompute the step.

Referenced by QualityFunctionMuOracle::CalculateMu().

bool HaveAffineDeltas (  )  const [inline]

Returns true, if the affine-scaling step have been already computed for the current iteration.

This flag is reset after every call of AcceptTrialPoint(). If the search direction is computed during the computation of the barrier parameter, the method computing the barrier parameter should call SetHaveDeltas(true) to tell the line search does not have to recompute them in case it wants to do a corrector step.

void SetHaveAffineDeltas ( bool  have_affine_deltas  )  [inline]

Method for setting the HaveDeltas flag.

This method should be called if some method computes the primal-dual step (and stores it in the delta_ fields of IpoptData) at an early part of the iteration. If that flag is set to true, the IpoptAlgorithm object will not recompute the step.

Referenced by QualityFunctionMuOracle::CalculateMu(), ProbingMuOracle::CalculateMu(), and FilterLSAcceptor::TryCorrector().

void CopyTrialToCurrent (  )  [inline]

Copy the trial values to the current values.

References Ipopt::IsValid().

Referenced by IpoptData::AcceptTrialPoint(), and DefaultIterateInitializer::least_square_mults().

void AcceptTrialPoint (  ) 

Index iter_count (  )  const [inline]

Setting the flag that indicates if a tiny step (below machine precision) has been detected.

Referenced by RestoFilterConvergenceCheck::CheckConvergence(), OptimalityErrorConvergenceCheck::CheckConvergence(), RestoIterationOutput::WriteOutput(), and OrigIterationOutput::WriteOutput().

void Set_iter_count ( Index  iter_count  )  [inline]

Setting the flag that indicates if a tiny step (below machine precision) has been detected.

Referenced by IpoptAlgorithm::Optimize(), and MinC_1NrmRestorationPhase::PerformRestoration().

Number curr_mu (  )  const [inline]

void Set_mu ( Number  mu  )  [inline]

bool MuInitialized (  )  const [inline]

Setting the flag that indicates if a tiny step (below machine precision) has been detected.

Number curr_tau (  )  const [inline]

Setting the flag that indicates if a tiny step (below machine precision) has been detected.

References DBG_ASSERT.

Referenced by MonotoneMuUpdate::UpdateBarrierParameter().

void Set_tau ( Number  tau  )  [inline]

Setting the flag that indicates if a tiny step (below machine precision) has been detected.

Referenced by MonotoneMuUpdate::InitializeImpl(), AdaptiveMuUpdate::InitializeImpl(), MonotoneMuUpdate::UpdateBarrierParameter(), and AdaptiveMuUpdate::UpdateBarrierParameter().

bool TauInitialized (  )  const [inline]

Setting the flag that indicates if a tiny step (below machine precision) has been detected.

void SetFreeMuMode ( bool  free_mu_mode  )  [inline]

Setting the flag that indicates if a tiny step (below machine precision) has been detected.

Referenced by AdaptiveMuUpdate::InitializeImpl(), and AdaptiveMuUpdate::UpdateBarrierParameter().

bool FreeMuMode (  )  const [inline]

Setting the flag that indicates if a tiny step (below machine precision) has been detected.

void Set_tiny_step_flag ( bool  flag  )  [inline]

Setting the flag that indicates if a tiny step (below machine precision) has been detected.

Referenced by BacktrackingLineSearch::FindAcceptableTrialPoint().

bool tiny_step_flag (  )  [inline]

Setting the flag that indicates if a tiny step (below machine precision) has been detected.

Referenced by MonotoneMuUpdate::UpdateBarrierParameter(), and AdaptiveMuUpdate::UpdateBarrierParameter().

Number tol (  )  const [inline]

Overall convergence tolerance.

It is used in the convergence test, but also in some other parts of the algorithm that depend on the specified tolerance, such as the minimum value for the barrier parameter. Obtain the tolerance.

References DBG_ASSERT.

Referenced by AdaptiveMuUpdate::UpdateBarrierParameter().

void Set_tol ( Number  tol  )  [inline]

Set a new value for the tolerance.

One should be very careful when using this, since changing the predefined tolerance might have unexpected consequences. This method is for example used in the restoration convergence checker to tighten the restoration phase convergence tolerance, if the restoration phase converged to a point that has not a large value for the constraint violation.

Referenced by RestoFilterConvergenceCheck::CheckConvergence().

Number info_regu_x (  )  const [inline]

Set this to true, if the next time when output is written, the summary line should not be printed.

Referenced by RestoFilterConvergenceCheck::CheckConvergence(), OptimalityErrorConvergenceCheck::CheckConvergence(), RestoIterationOutput::WriteOutput(), and OrigIterationOutput::WriteOutput().

void Set_info_regu_x ( Number  regu_x  )  [inline]

Set this to true, if the next time when output is written, the summary line should not be printed.

Referenced by PDPerturbationHandler::ConsiderNewSystem(), and PDPerturbationHandler::PerturbForSingularity().

Number info_alpha_primal (  )  const [inline]

Set this to true, if the next time when output is written, the summary line should not be printed.

Referenced by RestoFilterConvergenceCheck::CheckConvergence(), OptimalityErrorConvergenceCheck::CheckConvergence(), RestoIterationOutput::WriteOutput(), and OrigIterationOutput::WriteOutput().

void Set_info_alpha_primal ( Number  alpha_primal  )  [inline]

Set this to true, if the next time when output is written, the summary line should not be printed.

Referenced by BacktrackingLineSearch::FindAcceptableTrialPoint().

char info_alpha_primal_char (  )  const [inline]

Set this to true, if the next time when output is written, the summary line should not be printed.

Referenced by RestoIterationOutput::WriteOutput(), and OrigIterationOutput::WriteOutput().

void Set_info_alpha_primal_char ( char  info_alpha_primal_char  )  [inline]

Set this to true, if the next time when output is written, the summary line should not be printed.

Referenced by BacktrackingLineSearch::FindAcceptableTrialPoint().

Number info_alpha_dual (  )  const [inline]

Set this to true, if the next time when output is written, the summary line should not be printed.

Referenced by RestoFilterConvergenceCheck::CheckConvergence(), OptimalityErrorConvergenceCheck::CheckConvergence(), RestoIterationOutput::WriteOutput(), and OrigIterationOutput::WriteOutput().

void Set_info_alpha_dual ( Number  alpha_dual  )  [inline]

Set this to true, if the next time when output is written, the summary line should not be printed.

Referenced by BacktrackingLineSearch::FindAcceptableTrialPoint().

Index info_ls_count (  )  const [inline]

Set this to true, if the next time when output is written, the summary line should not be printed.

Referenced by RestoFilterConvergenceCheck::CheckConvergence(), OptimalityErrorConvergenceCheck::CheckConvergence(), RestoIterationOutput::WriteOutput(), and OrigIterationOutput::WriteOutput().

void Set_info_ls_count ( Index  ls_count  )  [inline]

Set this to true, if the next time when output is written, the summary line should not be printed.

Referenced by BacktrackingLineSearch::FindAcceptableTrialPoint().

bool info_skip_output (  )  const [inline]

Set this to true, if the next time when output is written, the summary line should not be printed.

void Append_info_string ( const std::string &  add_str  )  [inline]

const std::string& info_string (  )  const [inline]

Set this to true, if the next time when output is written, the summary line should not be printed.

Referenced by RestoIterationOutput::WriteOutput(), and OrigIterationOutput::WriteOutput().

void Set_info_skip_output ( bool  info_skip_output  )  [inline]

Set this to true, if the next time when output is written, the summary line should not be printed.

Referenced by MinC_1NrmRestorationPhase::PerformRestoration().

void ResetInfo (  )  [inline]

Reset all info fields.

Referenced by IpoptData::Initialize(), and IpoptAlgorithm::Optimize().

TimingStatistics& TimingStats (  )  [inline]

void RegisterOptions ( const SmartPtr< RegisteredOptions > &  roptions  )  [static]

Methods for IpoptType.

Referenced by Ipopt::RegisterOptions_Algorithm().


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

Generated on Fri Sep 26 07:44:26 2008 for SimTKcore by  doxygen 1.5.6