# VOL_problem Class Reference

This class holds every data for the Volume Algorithm and its `solve` method must be invoked to solve the problem. More...

`#include <OsiTestSolver.hpp>`

Collaboration diagram for VOL_problem:
[legend]

List of all members.

## Public Member Functions
Constructors and destructor
| VOL_problem ()
| Default constructor.
| VOL_problem (const char *filename)
| Create a a `VOL_problem` object and read in the parameters from `filename`.
| ~VOL_problem ()
| Destruct the object.
Method to solve the problem.
int | solve (VOL_user_hooks &hooks, const bool use_preset_dual=false)
| Solve the problem using the `hooks`.
Methods returning final data
int | iter () const
| returns the iteration number
double | alpha () const
| returns the value of alpha
double | lambda () const
| returns the value of lambda
## Public Attributes
int | iter_
| iteration number
double | __pad0
External data (containing the result after solve)
double | value
| final lagrangian value (OUTPUT)
VOL_dvector | dsol
| final dual solution (INPUT/OUTPUT)
VOL_dvector | psol
| final primal solution (OUTPUT)
VOL_dvector | viol
| violations (b-Ax) for the relaxed constraints
External data (may be changed by the user before calling solve)
VOL_parms | parm
| The parameters controlling the Volume Algorithm (INPUT).
int | psize
| length of primal solution (INPUT)
int | dsize
| length of dual solution (INPUT)
VOL_dvector | dual_lb
| lower bounds for the duals (if 0 length, then filled with -inf) (INPUT)
VOL_dvector | dual_ub
| upper bounds for the duals (if 0 length, then filled with +inf) (INPUT)
## Private Member Functions
| VOL_problem (const VOL_problem &)
VOL_problem & | operator= (const VOL_problem &)
void | set_default_parm ()
Private methods used internally
void | read_params (const char *filename)
| Read in the parameters from the file `filename`.
int | initialize (const bool use_preset_dual)
| initializes duals, bounds for the duals, alpha, lambda
void | print_info (const int iter, const VOL_primal &primal, const VOL_primal &pstar, const VOL_dual &dual)
| print volume info every parm.printinvl iterations
double | readjust_target (const double oldtarget, const double lcost) const
| Checks if lcost is close to the target, if so it increases the target.
double | power_heur (const VOL_primal &primal, const VOL_primal &pstar, const VOL_dual &dual) const
| Here we decide the value of alpha1 to be used in the convex combination.
## Private Attributes
Internal data (may be inquired for)
double | alpha_
| value of alpha
double | lambda_
| value of lambda
union {
int iter_
| iteration number
double __pad0
}; |
| value of alpha

## Detailed Description

This class holds every data for the Volume Algorithm and its `solve` method must be invoked to solve the problem.

The INPUT fields must be filled out completely before `solve` is invoked. `dsol` have to be filled out if and only if the last argument to `solve` is `true`.

Definition at line 606 of file OsiTestSolver.hpp.

## Constructor & Destructor Documentation

VOL_problem::VOL_problem | ( | const VOL_problem & |  | ) | `[private]`

VOL_problem::VOL_problem | ( |  | ) |

Default constructor.

VOL_problem::VOL_problem | ( | const char * | filename | ) |

Create a a `VOL_problem` object and read in the parameters from `filename`.

VOL_problem::~VOL_problem | ( |  | ) |

Destruct the object.

## Member Function Documentation

VOL_problem& VOL_problem::operator= | ( | const VOL_problem & |  | ) | `[private]`

void VOL_problem::set_default_parm | ( |  | ) | `[private]`

int VOL_problem::solve | ( | VOL_user_hooks & | hooks,
|  | const bool | use_preset_dual = `false` |
| ) |  |  |

Solve the problem using the `hooks`.

Any information needed in the hooks must be stored in the structure `user_data` points to.

int VOL_problem::iter | ( |  | ) | const`[inline]`

returns the iteration number

Definition at line 682 of file OsiTestSolver.hpp.

double VOL_problem::alpha | ( |  | ) | const`[inline]`

returns the value of alpha

Definition at line 684 of file OsiTestSolver.hpp.

double VOL_problem::lambda | ( |  | ) | const`[inline]`

returns the value of lambda

Definition at line 686 of file OsiTestSolver.hpp.

void VOL_problem::read_params | ( | const char * | filename | ) | `[private]`

Read in the parameters from the file `filename`.

int VOL_problem::initialize | ( | const bool | use_preset_dual | ) | `[private]`

initializes duals, bounds for the duals, alpha, lambda

void VOL_problem::print_info | ( | const int | iter,
|  | const VOL_primal & | primal,
|  | const VOL_primal & | pstar,
|  | const VOL_dual & | dual |
| ) |  |  | `[private]`

print volume info every parm.printinvl iterations

double VOL_problem::readjust_target | ( | const double | oldtarget,
|  | const double | lcost |
| ) |  |  | const`[private]`

Checks if lcost is close to the target, if so it increases the target.

Close means that we got within 5% of the target.

double VOL_problem::power_heur | ( | const VOL_primal & | primal,
|  | const VOL_primal & | pstar,
|  | const VOL_dual & | dual |
| ) |  |  | const`[private]`

Here we decide the value of alpha1 to be used in the convex combination.

The new pstar will be computed as
pstar = alpha1 * pstar + (1 - alpha1) * primal
More details of this are in doc.ps.
IN: alpha, primal, pstar, dual

Returns:
  alpha1

## Member Data Documentation

double VOL_problem::alpha_`[private]`

value of alpha

Definition at line 636 of file OsiTestSolver.hpp.

double VOL_problem::lambda_`[private]`

value of lambda

Definition at line 638 of file OsiTestSolver.hpp.

int VOL_problem::iter_

iteration number

Definition at line 643 of file OsiTestSolver.hpp.

double VOL_problem::__pad0

Definition at line 644 of file OsiTestSolver.hpp.

union { ... } `[private]`

value of alpha

double VOL_problem::value

final lagrangian value (OUTPUT)

Definition at line 653 of file OsiTestSolver.hpp.

VOL_dvector VOL_problem::dsol

final dual solution (INPUT/OUTPUT)

Definition at line 655 of file OsiTestSolver.hpp.

VOL_dvector VOL_problem::psol

final primal solution (OUTPUT)

Definition at line 657 of file OsiTestSolver.hpp.

VOL_dvector VOL_problem::viol

violations (b-Ax) for the relaxed constraints

Definition at line 659 of file OsiTestSolver.hpp.

VOL_parms VOL_problem::parm

The parameters controlling the Volume Algorithm (INPUT).

Definition at line 665 of file OsiTestSolver.hpp.

int VOL_problem::psize

length of primal solution (INPUT)

Definition at line 667 of file OsiTestSolver.hpp.

int VOL_problem::dsize

length of dual solution (INPUT)

Definition at line 669 of file OsiTestSolver.hpp.

VOL_dvector VOL_problem::dual_lb

lower bounds for the duals (if 0 length, then filled with -inf) (INPUT)

Definition at line 672 of file OsiTestSolver.hpp.

VOL_dvector VOL_problem::dual_ub

upper bounds for the duals (if 0 length, then filled with +inf) (INPUT)

Definition at line 675 of file OsiTestSolver.hpp.

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

- /home/coin/svn-release/Alps-1.4.6/Osi/test/OsiTestSolver.hpp