Go to the documentation of this file.
7 #ifndef __IPIPOPTDATA_HPP__
8 #define __IPIPOPTDATA_HPP__
48 virtual bool Initialize(
51 const std::string& prefix
55 virtual bool InitializeDataStructures() = 0;
62 virtual void AcceptTrialPoint() = 0;
105 Number cpu_time_start = -1.
113 bool InitializeDataStructures(
130 const std::string& prefix
167 void SetTrialPrimalVariablesFromStep(
176 void SetTrialEqMultipliersFromStep(
185 void SetTrialBoundMultipliersFromStep(
290 have_deltas_ = have_deltas;
315 return have_affine_deltas_;
327 bool have_affine_deltas
330 have_affine_deltas_ = have_affine_deltas;
338 void CopyTrialToCurrent();
341 void AcceptTrialPoint();
354 iter_count_ = iter_count;
367 mu_initialized_ =
true;
371 return mu_initialized_;
384 tau_initialized_ =
true;
388 return tau_initialized_;
395 free_mu_mode_ = free_mu_mode;
399 return free_mu_mode_;
409 tiny_step_flag_ = flag;
413 return tiny_step_flag_;
459 return cpu_time_start_;
472 info_regu_x_ = regu_x;
476 return info_alpha_primal_;
482 info_alpha_primal_ = alpha_primal;
486 return info_alpha_primal_char_;
489 char info_alpha_primal_char
492 info_alpha_primal_char_ = info_alpha_primal_char;
496 return info_alpha_dual_;
502 info_alpha_dual_ = alpha_dual;
506 return info_ls_count_;
512 info_ls_count_ = ls_count;
516 return info_skip_output_;
519 const std::string& add_str
522 info_string_ += add_str;
532 bool info_skip_output
535 info_skip_output_ = info_skip_output;
541 return info_last_output_;
548 info_last_output_ = info_last_output;
556 return info_iters_since_header_;
563 info_iters_since_header_++;
569 int info_iters_since_header
572 info_iters_since_header_ = info_iters_since_header;
579 info_alpha_primal_ = 0;
580 info_alpha_dual_ = 0.;
581 info_alpha_primal_char_ =
' ';
582 info_skip_output_ =
false;
583 info_string_.erase();
590 return timing_statistics_;
617 add_data_ = add_data;
628 pd_pert_x_ = pd_pert_x;
629 pd_pert_s_ = pd_pert_s;
630 pd_pert_c_ = pd_pert_c;
631 pd_pert_d_ = pd_pert_d;
642 pd_pert_x = pd_pert_x_;
643 pd_pert_s = pd_pert_s_;
644 pd_pert_c = pd_pert_c_;
645 pd_pert_d = pd_pert_d_;
648 static void RegisterOptions(
805 #if COIN_IPOPT_CHECKLEVEL > 0
855 #if COIN_IPOPT_CHECKLEVEL > 0
859 debug_curr_tag_ =
curr_->GetTag();
860 debug_curr_tag_sum_ =
curr_->GetTagSum();
865 debug_curr_tag_sum_ = 0;
878 #if COIN_IPOPT_CHECKLEVEL > 0
883 debug_trial_tag_ =
trial->GetTag();
884 debug_trial_tag_sum_ =
trial->GetTagSum();
888 debug_trial_tag_ = 0;
889 debug_trial_tag_sum_ = 0;
902 #if COIN_IPOPT_CHECKLEVEL > 0
906 debug_delta_tag_ =
delta->GetTag();
907 debug_delta_tag_sum_ =
delta->GetTagSum();
911 debug_delta_tag_ = 0;
912 debug_delta_tag_sum_ = 0;
925 #if COIN_IPOPT_CHECKLEVEL > 0
929 debug_delta_tag_ =
delta->GetTag();
930 debug_delta_tag_sum_ =
delta->GetTagSum();
934 debug_delta_tag_ = 0;
935 debug_delta_tag_sum_ = 0;
948 #if COIN_IPOPT_CHECKLEVEL > 0
952 debug_delta_aff_tag_ =
delta_aff->GetTag();
953 debug_delta_aff_tag_sum_ =
delta_aff->GetTagSum();
957 debug_delta_aff_tag_ = 0;
958 debug_delta_aff_tag_sum_ =
delta_aff->GetTagSum();
Number curr_tau_
current fraction to the boundary parameter
void Append_info_string(const std::string &add_str)
SmartPtr< IpoptAdditionalData > add_data_
Object for the data specific for the Chen-Goldfarb penalty method algorithm.
void set_trial(SmartPtr< IteratesVector > &trial)
Get Trial point in a copied container that is non-const.
void SetHaveDeltas(bool have_deltas)
Method for setting the HaveDeltas flag.
SmartPtr< IteratesVectorSpace > iterates_space_
VectorSpace for all the iterates.
Class to organize all the data required by the algorithm.
bool have_deltas_
The following flag is set to true, if some other part of the algorithm (like the method for computing...
void Set_info_alpha_dual(Number alpha_dual)
void Set_info_last_output(Number info_last_output)
sets time when the last summary output line was printed
This class collects all timing statistics for Ipopt.
void Inc_info_iters_since_header()
increases number of iteration summaries actually printed since last summary header was printed
bool HaveAffineDeltas() const
Returns true, if the affine-scaling step have been already computed for the current iteration.
void Set_tol(Number tol)
Set a new value for the tolerance.
void Set_info_alpha_primal_char(char info_alpha_primal_char)
bool HaveDeltas() const
Returns true, if the primal-dual step have been already computed for the current iteration.
Number info_last_output()
gives time when the last summary output line was printed
void ResetInfo()
Reset all info fields.
bool TauInitialized() const
void Set_info_ls_count(Index ls_count)
This file contains a base class for all exceptions and a set of macros to help with exceptions.
double Number
Type of all numbers.
void Set_iter_count(Index iter_count)
Number cpu_time_start_
CPU time counter at begin of optimization.
Number info_alpha_primal() const
void SetAddData(SmartPtr< IpoptAdditionalData > add_data)
Set a new pointer for additional Ipopt data.
void SetFreeMuMode(bool free_mu_mode)
void Set_info_alpha_primal(Number alpha_primal)
Index info_ls_count() const
void Set_W(SmartPtr< const SymMatrix > W)
Set Hessian approximation.
SmartPtr< const SymMatrix > W()
Hessian or Hessian approximation (do not hold on to it, it might be changed)
char info_alpha_primal_char_
Info character for primal step size.
SmartPtr< const IteratesVector > curr() const
Current point.
void Set_info_regu_x(Number regu_x)
SmartPtr< const IteratesVector > trial() const
Get the current point in a copied container that is non-const.
int Index
Type of all indices of vectors, matrices etc.
Number tol_
Overall convergence tolerance.
Base class for additional data that is special to a particular type of algorithm, such as the CG pena...
U * GetRawPtr(const SmartPtr< U > &smart_ptr)
void CopyTrialToCurrent()
Copy the trial values to the current values.
virtual ~IpoptAdditionalData()
Destructor.
Template class for Smart Pointers.
Number info_regu_x() const
IpoptAdditionalData & AdditionalData()
Get access to additional data object.
bool tiny_step_flag_
flag indicating if a tiny step has been detected
SmartPtr< const IteratesVector > delta_aff() const
Affine Delta.
Index info_ls_count_
Number of backtracking trial steps.
Number info_alpha_dual() const
IpoptAdditionalData()
Default Constructor.
void set_delta(SmartPtr< IteratesVector > &delta)
Set the current delta.
int info_iters_since_header_
number of iteration summaries actually printed since last summary header was printed
Number curr_mu_
current barrier parameter
TimingStatistics & TimingStats()
Return Timing Statistics Object.
Number info_regu_x_
Size of regularization for the Hessian.
const std::string & info_string() const
void set_delta_aff(SmartPtr< IteratesVector > &delta_aff)
Set the affine delta.
void getPDPert(Number &pd_pert_x, Number &pd_pert_s, Number &pd_pert_c, Number &pd_pert_d)
Get the current perturbation of the primal-dual system.
bool have_prototypes_
flag for debugging whether we have already curr_ values available (from which new Vectors can be gene...
SmartPtr< const IteratesVector > delta() const
ToDo: I may need to add versions of set_trial like the following, but I am not sure.
char info_alpha_primal_char() const
void ResetCpuStartTime()
Resetting CPU Start Time.
SmartPtr< const IteratesVector > delta_
void SetHaveAffineDeltas(bool have_affine_deltas)
Method for setting the HaveDeltas flag.
SmartPtr< const U > ConstPtr(const SmartPtr< U > &smart_ptr)
Number info_last_output_
time when the last summary output line was printed
Class responsible for all message output.
void Set_info_iters_since_header(int info_iters_since_header)
sets number of iteration summaries actually printed since last summary header was printed
TimingStatistics timing_statistics_
TimingStatistics object collecting all Ipopt timing statistics.
VectorSpace base class, corresponding to the Vector base class.
IPOPTLIB_EXPORT Number CpuTime()
method determining CPU time
Index iter_count_
iteration count
bool info_skip_output() const
void Set_tiny_step_flag(bool flag)
Setting the flag that indicates if a tiny step (below machine precision) has been detected.
Number tol() const
Overall convergence tolerance.
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.
bool IsValid(const SmartPtr< U > &smart_ptr)
bool initialize_called_
flag indicating if Initialize method has been called (for debugging)
int info_iters_since_header()
gives number of iteration summaries actually printed since last summary header was printed
unsigned int Tag
Type for the Tag values.
bool IsNull(const SmartPtr< U > &smart_ptr)
SmartPtr< const IteratesVector > curr_
Main iteration variables (current iteration)
bool have_affine_deltas_
The following flag is set to true, if some other part of the algorithm (like the method for computing...
Number info_alpha_dual_
Dual step size.
bool MuInitialized() const
void setPDPert(Number pd_pert_x, Number pd_pert_s, Number pd_pert_c, Number pd_pert_d)
Set the perturbation of the primal-dual system.
SmartPtr< const IteratesVector > trial_
Main iteration variables (trial calculations)
This class stores a list of user set options.
std::string info_string_
any string of characters for the end of the output line
bool HaveAddData()
Check if additional data has been set.
bool info_skip_output_
true, if next summary output line should not be printed (eg after restoration phase).
Storing the reference count of all the smart pointers that currently reference it.
SmartPtr< const IteratesVector > delta_aff_
bool free_mu_mode_
flag indicating whether the algorithm is in the free mu mode
Number info_alpha_primal_
Primal step size.
SmartPtr< const SymMatrix > W_
Hessian (approximation) - might be changed elsewhere!
Number cpu_time_start() const
Cpu time counter at the beginning of the optimization.
This is the abstract base class for classes that map the traditional NLP into something that is more ...