7 #ifndef __IPIPOPTCALCULATEDQUANTITIES_HPP__ 8 #define __IPIPOPTCALCULATEDQUANTITIES_HPP__ 24 class RegisteredOptions;
60 virtual bool Initialize(
63 const std::string& prefix
132 const std::string& prefix
154 Index AdjustedTrialSlacks();
156 void ResetAdjustedTrialSlacks();
164 virtual Number unscaled_curr_f();
168 virtual Number unscaled_trial_f();
180 virtual Number curr_barrier_obj();
184 virtual Number trial_barrier_obj();
287 virtual Number curr_constraint_violation();
294 virtual Number trial_constraint_violation();
299 virtual Number curr_nlp_constraint_violation(
306 virtual Number unscaled_curr_nlp_constraint_violation(
313 virtual Number unscaled_trial_nlp_constraint_violation(
368 virtual Number curr_primal_infeasibility(
372 virtual Number trial_primal_infeasibility(
377 virtual Number curr_dual_infeasibility(
381 virtual Number trial_dual_infeasibility(
385 virtual Number unscaled_curr_dual_infeasibility(
392 virtual Number curr_complementarity(
399 virtual Number trial_complementarity(
406 virtual Number unscaled_curr_complementarity(
412 Number CalcCentralityMeasure(
419 virtual Number curr_centrality_measure();
427 virtual Number curr_nlp_error();
435 virtual Number unscaled_curr_nlp_error();
440 virtual Number curr_barrier_error();
449 virtual Number curr_primal_dual_system_error(
459 virtual Number trial_primal_dual_system_error(
469 Number primal_frac_to_the_bound(
477 Number curr_primal_frac_to_the_bound(
483 Number dual_frac_to_the_bound(
493 Number uncached_dual_frac_to_the_bound(
503 Number curr_dual_frac_to_the_bound(
516 Number uncached_slack_frac_to_the_bound(
534 Number trial_avrg_compl();
539 Number curr_gradBarrTDelta();
559 return constr_viol_normtype_;
563 bool IsSquareProblem()
const;
581 static void RegisterOptions(
863 void ComputeOptimalityErrorScaling(
881 Index CalculateSafeSlack(
895 void ComputeDampingIndicators(
912 bool in_restoration_phase();
CachedResults< Number > curr_nlp_error_cache_
CachedResults< SmartPtr< const Vector > > curr_compl_s_L_cache_
SmartPtr< Vector > dampind_s_U_
Indicator vector for selecting the elements in s that have only upper bounds.
SmartPtr< Vector > dampind_s_L_
Indicator vector for selecting the elements in s that have only lower bounds.
bool IsValid(const SmartPtr< U > &smart_ptr)
CachedResults< Number > trial_avrg_compl_cache_
Cache for average of trial complementarity.
CachedResults< Number > curr_constraint_violation_cache_
SmartPtr< Vector > tmp_s_U_
SmartPtr< Vector > dampind_x_U_
Indicator vector for selecting the elements in x that have only upper bounds.
CachedResults< SmartPtr< const Matrix > > trial_jac_c_cache_
CachedResults< SmartPtr< const Vector > > trial_compl_s_U_cache_
Index num_adjusted_slack_s_L_
Class for all IPOPT specific calculated quantities.
CachedResults< Number > trial_f_cache_
CachedResults< Number > trial_constraint_violation_cache_
virtual ~IpoptAdditionalCq()
Destructor.
CachedResults< Number > dual_frac_to_the_bound_cache_
CachedResults< SmartPtr< const Matrix > > trial_jac_d_cache_
CachedResults< SmartPtr< Vector > > trial_slack_x_U_cache_
CachedResults< Number > curr_centrality_measure_cache_
CachedResults< SmartPtr< const Vector > > curr_grad_lag_with_damping_x_cache_
CachedResults< SmartPtr< Vector > > curr_slack_s_L_cache_
CachedResults< SmartPtr< const Vector > > curr_sigma_s_cache_
CachedResults< SmartPtr< const Vector > > trial_d_cache_
CachedResults< SmartPtr< const Vector > > curr_grad_lag_with_damping_s_cache_
CachedResults< SmartPtr< const Vector > > curr_jac_c_times_vec_cache_
CachedResults< SmartPtr< const Vector > > trial_compl_x_U_cache_
SmartPtr< Vector > tmp_c_
SmartPtr< IpoptNLP > ip_nlp_
Ipopt NLP object.
CachedResults< SmartPtr< const Vector > > trial_grad_lag_x_cache_
CachedResults< SmartPtr< const Vector > > trial_c_cache_
CachedResults< Number > unscaled_curr_nlp_error_cache_
Index num_adjusted_slack_s_U_
double Number
Type of all numbers.
SmartPtr< Vector > dampind_x_L_
Indicator vector for selecting the elements in x that have only lower bounds.
CachedResults< Number > trial_primal_infeasibility_cache_
CachedResults< SmartPtr< const Vector > > trial_d_minus_s_cache_
Number s_max_
Parameter in formula for computing overall primal-dual optimality error.
CachedResults< Number > curr_primal_dual_system_error_cache_
CachedResults< SmartPtr< const Vector > > trial_jac_cT_times_vec_cache_
CachedResults< Number > curr_complementarity_cache_
CachedResults< SmartPtr< const Vector > > curr_jac_dT_times_vec_cache_
ENormType constr_viol_normtype() const
Norm type used for calculating constraint violation.
Number mu_target_
Desired value of the barrier parameter.
CachedResults< SmartPtr< const Vector > > curr_d_minus_s_cache_
CachedResults< Number > unscaled_trial_nlp_constraint_violation_cache_
IpoptAdditionalCq & AdditionalCq()
CachedResults< SmartPtr< Vector > > trial_slack_x_L_cache_
CachedResults< SmartPtr< const Vector > > curr_relaxed_compl_s_L_cache_
CachedResults< SmartPtr< const Vector > > curr_jac_cT_times_vec_cache_
This file contains a base class for all exceptions and a set of macros to help with exceptions...
CachedResults< Number > trial_barrier_obj_cache_
CachedResults< Number > curr_gradBarrTDelta_cache_
Cache for grad barrier obj.
Template class for Smart Pointers.
Storing the reference count of all the smart pointers that currently reference it.
This class stores a list of user set options.
SmartPtr< IpoptAdditionalCq > add_cq_
Chen-Goldfarb specific calculated quantities.
CachedResults< SmartPtr< const Vector > > curr_relaxed_compl_s_U_cache_
CachedResults< SmartPtr< const Vector > > curr_relaxed_compl_x_U_cache_
IpoptAdditionalCq()
Default Constructor.
Number kappa_d_
Weighting factor for the linear damping term added to the barrier objective function.
CachedResults< SmartPtr< const Vector > > curr_d_cache_
SmartPtr< Vector > tmp_x_L_
SmartPtr< IpoptNLP > & GetIpoptNLP()
Method returning the IpoptNLP object.
SmartPtr< Vector > tmp_x_U_
Number slack_move_
fractional movement allowed in bounds
CachedResults< Number > unscaled_curr_dual_infeasibility_cache_
CachedResults< Number > curr_barrier_error_cache_
CachedResults< SmartPtr< const SymMatrix > > curr_exact_hessian_cache_
Cache for the exact Hessian.
CachedResults< SmartPtr< const Matrix > > curr_jac_c_cache_
CachedResults< SmartPtr< Vector > > trial_slack_s_L_cache_
CachedResults< Number > curr_dual_infeasibility_cache_
CachedResults< SmartPtr< const Vector > > curr_grad_f_cache_
CachedResults< SmartPtr< const Vector > > curr_compl_s_U_cache_
CachedResults< SmartPtr< Vector > > curr_slack_x_U_cache_
CachedResults< SmartPtr< const Vector > > curr_grad_barrier_obj_x_cache_
CachedResults< SmartPtr< Vector > > curr_slack_s_U_cache_
CachedResults< Number > trial_primal_dual_system_error_cache_
int Index
Type of all indices of vectors, matrices etc.
Index num_adjusted_slack_x_U_
SmartPtr< Vector > tmp_d_
CachedResults< SmartPtr< const Vector > > curr_relaxed_compl_x_L_cache_
CachedResults< SmartPtr< const Matrix > > curr_jac_d_cache_
CachedResults< SmartPtr< const Vector > > curr_jac_d_times_vec_cache_
CachedResults< Number > curr_primal_infeasibility_cache_
CachedResults< SmartPtr< const Vector > > curr_grad_barrier_obj_s_cache_
void SetAddCq(SmartPtr< IpoptAdditionalCq > add_cq)
Method for setting pointer for additional calculated quantities.
bool initialize_called_
flag indicating if Initialize method has been called (for debugging)
CachedResults< Number > trial_dual_infeasibility_cache_
Class responsible for all message output.
CachedResults< SmartPtr< const Vector > > grad_kappa_times_damping_s_cache_
SmartPtr< Vector > tmp_s_
CachedResults< Number > curr_avrg_compl_cache_
Cache for average of current complementarity.
CachedResults< Number > curr_nlp_constraint_violation_cache_
CachedResults< SmartPtr< const Vector > > curr_grad_lag_s_cache_
CachedResults< SmartPtr< const Vector > > curr_compl_x_L_cache_
bool warm_start_same_structure_
Flag indicating whether the TNLP with identical structure has already been solved before...
CachedResults< SmartPtr< Vector > > trial_slack_s_U_cache_
CachedResults< SmartPtr< const Vector > > trial_compl_s_L_cache_
Index num_adjusted_slack_x_L_
SmartPtr< IpoptData > ip_data_
Ipopt Data object.
CachedResults< SmartPtr< const Vector > > trial_grad_f_cache_
Base class for additional calculated quantities that is special to a particular type of algorithm...
CachedResults< SmartPtr< const Vector > > curr_compl_x_U_cache_
SmartPtr< Vector > tmp_s_L_
CachedResults< SmartPtr< const Vector > > trial_grad_lag_s_cache_
ENormType constr_viol_normtype_
Norm type to be used when calculating the constraint violation.
CachedResults< SmartPtr< const Vector > > trial_compl_x_L_cache_
CachedResults< Number > unscaled_curr_nlp_constraint_violation_cache_
bool HaveAddCq()
Method detecting if additional object for calculated quantities has already been set.
CachedResults< SmartPtr< const Vector > > trial_jac_dT_times_vec_cache_
CachedResults< Number > trial_complementarity_cache_
CachedResults< SmartPtr< const Vector > > grad_kappa_times_damping_x_cache_