14#ifndef PDLP_TERMINATION_H_
15#define PDLP_TERMINATION_H_
20#include "ortools/pdlp/solve_log.pb.h"
21#include "ortools/pdlp/solvers.pb.h"
41 const TerminationCriteria& termination_criteria);
46 const TerminationCriteria::SimpleOptimalityCriteria& simple_criteria);
56 const TerminationCriteria& criteria,
const IterationStats& stats,
57 const std::atomic<bool>* interrupt_solve =
nullptr);
75 const TerminationCriteria& criteria,
const IterationStats& stats,
77 bool force_numerical_termination =
false);
82 const QuadraticProgramStats& stats);
87double EpsilonRatio(
double epsilon_absolute,
double epsilon_relative);
118 const TerminationCriteria::DetailedOptimalityCriteria& optimality_criteria,
119 const ConvergenceInformation& stats,
123 const TerminationCriteria::DetailedOptimalityCriteria& optimality_criteria,
124 const ConvergenceInformation& stats);
128 const TerminationCriteria::DetailedOptimalityCriteria& optimality_criteria,
129 const ConvergenceInformation& stats, OptimalityNorm optimality_norm,
Validation utilities for solvers.proto.
std::optional< TerminationReasonAndPointType > CheckSimpleTerminationCriteria(const TerminationCriteria &criteria, const IterationStats &stats, const std::atomic< bool > *interrupt_solve)
TerminationCriteria::DetailedOptimalityCriteria EffectiveOptimalityCriteria(const TerminationCriteria &termination_criteria)
Computes the effective optimality criteria for a TerminationCriteria.
QuadraticProgramBoundNorms BoundNormsFromProblemStats(const QuadraticProgramStats &stats)
double EpsilonRatio(const double epsilon_absolute, const double epsilon_relative)
std::optional< TerminationReasonAndPointType > CheckIterateTerminationCriteria(const TerminationCriteria &criteria, const IterationStats &stats, const QuadraticProgramBoundNorms &bound_norms, const bool force_numerical_termination)
bool OptimalityCriteriaMet(const TerminationCriteria::DetailedOptimalityCriteria &optimality_criteria, const ConvergenceInformation &stats, const OptimalityNorm optimality_norm, const QuadraticProgramBoundNorms &bound_norms)
Determines if the optimality criteria are met.
bool ObjectiveGapMet(const TerminationCriteria::DetailedOptimalityCriteria &optimality_criteria, const ConvergenceInformation &stats)
RelativeConvergenceInformation ComputeRelativeResiduals(const TerminationCriteria::DetailedOptimalityCriteria &optimality_criteria, const ConvergenceInformation &stats, const QuadraticProgramBoundNorms &bound_norms)
double l_inf_norm_constraint_bounds
double l_inf_norm_primal_linear_objective
double l2_norm_constraint_bounds
double l2_norm_primal_linear_objective