DualSolver Class Reference

Abstract base class for an optimizer for solving a dual problem of the form: max { obj(x) | x_i>=lower_bound_i }. More...

#include <opt.h>

Inheritance diagram for DualSolver:
Inheritance graph
[legend]
Collaboration diagram for DualSolver:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 DualSolver (DualFunc &f, vector< double > lower_bound_, Param &param_, Pointer< ostream > out_solver_p_=out_out_p, Pointer< ostream > out_solver_log_p_=out_log_p)
 Constructor for a function and lower bounds.
virtual ~DualSolver ()
double rel_improvement1 ()
double rel_improvement2 ()
double rel_improvement_max ()
int serious_steps ()

Public Attributes

double last_rel_improvement
 Last relative improvement, if conv_rate_cntrl is enabled.
double threshold
 Threshold for the dual value.
dvector lower_bound
 Lower bounds of the dual points.
Pointer< vector< double > > dual_vals
 To log the values of the dual function.
Pointer< vector< dvector > > dual_points
 To log the points of the dual problem.
Pointer< vector< vector
< dvector > > > 
orig_points
 To log the points of the original problem.
int log_frequency
 The log frequency.
bool store_primals
 Should we add the primal points to the sample set.

Protected Member Functions

void do_log ()
 Logs the present points.
int check (double val)
 Checks the actual iteration.

Protected Attributes

Paramparam
 Parameters.
DualFuncobj
 Dual function.

Private Attributes

bool threshold_cntrl
 Is the threshold control enabled ?
bool conv_rate_cntrl
 Is the convergence rate control enabled ?
double stopping_rho
 If conv_rate_cntrl is set and improvement in last minor_iter iterations is less than stopping_rho * rel_imp1, check() breakes the solving process.
int minor_iter
 The number of minor iterations for the convergence rate control.
double last_major_val
 The value in the last major iteration.
double last_val
 The value in the last iteration.
double first_major_val
 The value in the first iteration.
double max_rel_improvement
 First relative improvement.
int improve_iter
 Counter for the number of iterations with improvements (serious steps).

Detailed Description

Abstract base class for an optimizer for solving a dual problem of the form: max { obj(x) | x_i>=lower_bound_i }.

Definition at line 148 of file opt.h.


Constructor & Destructor Documentation

DualSolver::DualSolver ( DualFunc f,
vector< double >  lower_bound_,
Param param_,
Pointer< ostream >  out_solver_p_ = out_out_p,
Pointer< ostream >  out_solver_log_p_ = out_log_p 
) [inline]

Constructor for a function and lower bounds.

Sets threshold to INFINITY.

Parameters:
f The function to maximize.
lower_bound_ The lower bounds of the dual points.
threshold_ Threshold.
out_solver_p_ A Pointer to an ostream to print solver-relevant information to.
out_solver_log_p_ A Pointer to an ostream to print solver-relevant logging-information to.

Definition at line 247 of file opt.h.

virtual DualSolver::~DualSolver (  )  [inline, virtual]

Definition at line 258 of file opt.h.


Member Function Documentation

void DualSolver::do_log (  )  [protected]

Logs the present points.

If it's time for a log entry, the dual_value, dual_point and the points from the original problem are stored.

See also:
log_frequency
dual_vals
dual_points
orig_points
int DualSolver::check ( double  val  )  [protected]

Checks the actual iteration.

Calls do_log().

Parameters:
val The last value of the dual function.
Returns:
0, if the solver should continue
100, if threshold is reached
10, if convergence rate is too low
See also:
do_log()
double DualSolver::rel_improvement1 (  )  [inline]

Definition at line 260 of file opt.h.

double DualSolver::rel_improvement2 (  )  [inline]

Definition at line 264 of file opt.h.

double DualSolver::rel_improvement_max (  )  [inline]

Definition at line 268 of file opt.h.

int DualSolver::serious_steps (  )  [inline]

Definition at line 272 of file opt.h.


Member Data Documentation

Is the threshold control enabled ?

Definition at line 152 of file opt.h.

Is the convergence rate control enabled ?

Definition at line 156 of file opt.h.

double DualSolver::stopping_rho [private]

If conv_rate_cntrl is set and improvement in last minor_iter iterations is less than stopping_rho * rel_imp1, check() breakes the solving process.

Definition at line 159 of file opt.h.

int DualSolver::minor_iter [private]

The number of minor iterations for the convergence rate control.

Definition at line 162 of file opt.h.

double DualSolver::last_major_val [private]

The value in the last major iteration.

Definition at line 165 of file opt.h.

double DualSolver::last_val [private]

The value in the last iteration.

Definition at line 168 of file opt.h.

double DualSolver::first_major_val [private]

The value in the first iteration.

Definition at line 171 of file opt.h.

First relative improvement.

Definition at line 174 of file opt.h.

int DualSolver::improve_iter [private]

Counter for the number of iterations with improvements (serious steps).

Definition at line 177 of file opt.h.

Param& DualSolver::param [protected]

Parameters.

Definition at line 182 of file opt.h.

DualFunc& DualSolver::obj [protected]

Dual function.

Definition at line 186 of file opt.h.

Last relative improvement, if conv_rate_cntrl is enabled.

Definition at line 210 of file opt.h.

Threshold for the dual value.

Definition at line 214 of file opt.h.

Lower bounds of the dual points.

Definition at line 218 of file opt.h.

Pointer<vector<double> > DualSolver::dual_vals

To log the values of the dual function.

Definition at line 222 of file opt.h.

To log the points of the dual problem.

Definition at line 225 of file opt.h.

To log the points of the original problem.

Definition at line 228 of file opt.h.

The log frequency.

Indicates, that every log_frequency'th point should be stored. 0 (default) for no logging.

Definition at line 233 of file opt.h.

Should we add the primal points to the sample set.

Default is true.

Definition at line 237 of file opt.h.


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

Generated on 10 Mar 2013 for LaGO by  doxygen 1.6.1