ConicBundle
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
ConicBundle::BundleTerminator Class Reference

basic class implementing termination criteria for BundleSolver, may also serve as base class for other termination criteria More...

#include <BundleTerminator.hxx>

Inheritance diagram for ConicBundle::BundleTerminator:
ConicBundle::CBout

Public Member Functions

virtual void set_defaults ()
 sets the default parameter values
 
virtual void clear ()
 resets terminated
 
 BundleTerminator (const CBout *cb=0, int incr=-1)
 calls set_defaults() and clear()
 
virtual void set_termeps (CH_Matrix_Classes::Real teps)
 set the termination precision (>0!)
 
virtual CH_Matrix_Classes::Real get_termeps () const
 returns the current termination precision
 
virtual void set_aggr_dnormsqr (CH_Matrix_Classes::Real sg)
 set an upper bound for the dual norm squared of the aggregate at termination (or <=0 if no such bound is desired)
 
virtual CH_Matrix_Classes::Real get_aggr_dnormsqr () const
 returns the current bound for the dual norm squared of the aggregate
 
virtual void set_timelimit (const CH_Tools::Clock *cp, CH_Tools::Microseconds tl)
 set cp==0 for no timelimit, otherwise specify clock and microseconds
 
virtual CH_Tools::Microseconds get_timelimit () const
 returns the timelimit value
 
virtual void set_recomplimit (CH_Matrix_Classes::Integer rl)
 set upper bound on the value returned by BundleTerminatorData::get_sumrecomp, <0 if no limit
 
virtual CH_Matrix_Classes::Integer get_recomplimit () const
 returns the current value of this parameter
 
virtual void set_qpfailslimit (CH_Matrix_Classes::Integer ql)
 set upper bound on the value returned by BundleTerminatorData::get_sumqpfails, <0 if no limit
 
virtual CH_Matrix_Classes::Integer get_qpfailslimit () const
 returns the current value of this parameter
 
virtual void set_modelfailslimit (CH_Matrix_Classes::Integer ml)
 set upper bound on the value returned by BundleTerminatorData::get_summodelfails, <0 if no limit
 
virtual CH_Matrix_Classes::Integer get_modelfailslimit () const
 returns the current value of this parameter
 
virtual void set_augvalfailslimit (CH_Matrix_Classes::Integer al)
 set upper bound on the value returned by BundleTerminatorData::get_sumaugvalfails(), <0 if no limit
 
virtual CH_Matrix_Classes::Integer get_augvalfailslimit () const
 returns the current value of this parameter
 
virtual void set_objevallimit (CH_Matrix_Classes::Integer ol)
 set upper bound on the value returned by BundleTerminatorData::get_cntobjeval, <0 if no limit
 
virtual CH_Matrix_Classes::Integer get_objevallimit () const
 returns the current value of this parameter
 
virtual void set_oraclefailslimit (CH_Matrix_Classes::Integer ol)
 set upper bound on the value returned by BundleTerminatorData::get_sumoraclefails, <0 if no limit
 
virtual CH_Matrix_Classes::Integer get_oraclefailslimit () const
 returns the current value of this parameter
 
virtual int get_terminated () const
 return the termination code returned in the last call to check_termination()
 
virtual void clear_terminated ()
 reset the termination code to zero (this does not remove the reason for the termination; for this, set other bounds or clear the numbers supplied by BundleTerminationData)
 
virtual void print_status (std::ostream &o) const
 output an explanation string for the current termination code
 
virtual std::ostream & save (std::ostream &o) const
 output current parameter settings
 
virtual std::istream & restore (std::istream &in)
 input new parameter settings, the clock must be set in addition!
 
- Public Member Functions inherited from ConicBundle::CBout
virtual void set_out (std::ostream *out=0, int print_level=1)
 Specifies the output level (out==NULL: no output at all, out!=NULL and level=0: errors and warnings, level>0 increasingly detailed information) More...
 
virtual void set_cbout (const CBout *cb, int incr=-1)
 Specifies the output level relative to the given CBout class. More...
 
void clear_cbout ()
 reset to default settings (out=0,print_level=1)
 
 CBout (const CBout *cb=0, int incr=-1)
 calls set_cbout
 
 CBout (std::ostream *outp, int pl=1)
 initialize correspondingly
 
 CBout (const CBout &cb, int incr=0)
 copy constructor
 
virtual bool cb_out (int pl=-1) const
 Returns true if out!=0 and (pl<print_level), pl<0 should be used for WARNINGS and ERRORS only, pl==0 for usual output.
 
std::ostream & get_out () const
 If cb_out() returned true, this returns the output stream, but it will abort if called with out==0.
 
std::ostream * get_out_ptr () const
 returns the pointer to the output stream
 
int get_print_level () const
 returns the print_level
 
virtual int mfile_data (std::ostream &out) const
 writes problem data to the given outstream
 

Protected Member Functions

virtual int check_termination (BundleTerminatorData *sb)
 computes and returns a termination code for the BundleTerminationData passed to this More...
 

Protected Attributes

CH_Matrix_Classes::Real termeps
 termination precision
 
CH_Matrix_Classes::Real aggregate_dnormsqr
 if the value is positive, do not terminate due to sufficient precision as long as the squared dual norm of the aggregate exceeds this
 
const CH_Tools::Clockclockp
 if a computation time criterion is set, this pointer is also set and points at the clock to be used
 
CH_Tools::Microseconds timelimit
 if clockp is not Null then this gives the upper time limit in Microseconds
 
CH_Matrix_Classes::Integer recomplimit
 upper limit on number returned in BundleTerminatorData::get_sumrecomp, <0 if no limit
 
CH_Matrix_Classes::Integer qpfailslimit
 upper limit on number returned in BundleTerminatorData::get_sumqpfails, <0 if no limit
 
CH_Matrix_Classes::Integer modelfailslimit
 upper limit on number returned in BundleTerminatorData::get_summodelfails, <0 if no limit
 
CH_Matrix_Classes::Integer augvalfailslimit
 upper limit on number returned in BundleTerminatorData::get_sumaugvalfails, <0 if no limit
 
CH_Matrix_Classes::Integer objevallimit
 upper limit on number returned in BundleTerminatorData::get_cntobjeval, <0 if no limit
 
CH_Matrix_Classes::Integer oraclefailslimit
 upper limit on number returned in BundleTerminatorData::get_sumoraclefails, <0 if no limit
 
int terminated
 result of last call to check_termination
 

Friends

class BundleSolver
 
class NBundleSolver
 

Detailed Description

basic class implementing termination criteria for BundleSolver, may also serve as base class for other termination criteria

Member Function Documentation

◆ check_termination()

virtual int ConicBundle::BundleTerminator::check_termination ( BundleTerminatorData sb)
inlineprotectedvirtual

computes and returns a termination code for the BundleTerminationData passed to this

The termination code is composed by setting various bits for signaling various reasons for termination. The values/bits mean the following:

  • 0 not terminated,
  • 1 precision achieved,
  • 2 timelimit exceeded
  • 4 recomplimit exceeded
  • 8 qpfailslimit exceeded
  • 16 modelfailslimit exceeded
  • 32 augvalfailslimit exceeded
  • 64 objevallimit exceeded
  • 128 oraclefailslimit exceeded

References CH_Matrix_Classes::abs(), ConicBundle::BundleTerminatorData::get_aggr_dnormsqr(), ConicBundle::BundleTerminatorData::get_center_objval(), ConicBundle::BundleTerminatorData::get_cntobjeval(), ConicBundle::BundleTerminatorData::get_modelval(), ConicBundle::BundleTerminatorData::get_sumaugvalfails(), ConicBundle::BundleTerminatorData::get_suminnerit(), ConicBundle::BundleTerminatorData::get_summodelfails(), ConicBundle::BundleTerminatorData::get_sumoraclefails(), ConicBundle::BundleTerminatorData::get_sumqpfails(), ConicBundle::BundleTerminatorData::get_sumrecomp(), ConicBundle::BundleTerminatorData::get_term_corr(), and CH_Tools::Clock::time().


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