Vol  1.5.4
Private Member Functions | List of all members
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 <VolVolume.hpp>

+ Collaboration diagram for VOL_problem:

Public Member Functions

Constructors and destructor
 VOL_problem ()
 Default constructor. More...
 
 VOL_problem (const char *filename)
 Create a a VOL_problem object and read in the parameters from filename. More...
 
 ~VOL_problem ()
 Destruct the object. More...
 
Method to solve the problem.
int solve (VOL_user_hooks &hooks, const bool use_preset_dual=false)
 Solve the problem using the hooks. More...
 
Methods returning final data
int iter () const
 returns the iteration number More...
 
double alpha () const
 returns the value of alpha More...
 
double lambda () const
 returns the value of lambda More...
 

Public Attributes

int iter_
 iteration number More...
 
double __pad0
 
External data (containing the result after solve)
double value
 final lagrangian value (OUTPUT) More...
 
VOL_dvector dsol
 final dual solution (INPUT/OUTPUT) More...
 
VOL_dvector psol
 final primal solution (OUTPUT) More...
 
VOL_dvector viol
 violations (b-Ax) for the relaxed constraints More...
 
External data (may be changed by the user before calling solve)
VOL_parms parm
 The parameters controlling the Volume Algorithm (INPUT) More...
 
int psize
 length of primal solution (INPUT) More...
 
int dsize
 length of dual solution (INPUT) More...
 
VOL_dvector dual_lb
 lower bounds for the duals (if 0 length, then filled with -inf) (INPUT) More...
 
VOL_dvector dual_ub
 upper bounds for the duals (if 0 length, then filled with +inf) (INPUT) More...
 

Private Member Functions

 VOL_problem (const VOL_problem &)
 
VOL_problemoperator= (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. More...
 
int initialize (const bool use_preset_dual)
 initializes duals, bounds for the duals, alpha, lambda More...
 
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 More...
 
double readjust_target (const double oldtarget, const double lcost) const
 Checks if lcost is close to the target, if so it increases the target. More...
 
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. More...
 

Private Attributes

Internal data (may be inquired for)
double alpha_
 value of alpha More...
 
double lambda_
 value of lambda More...
 
union {
   int   iter_
 iteration number More...
 
   double   __pad0
 
}; 
 

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 605 of file VolVolume.hpp.

Constructor & Destructor Documentation

◆ VOL_problem() [1/3]

VOL_problem::VOL_problem ( const VOL_problem )
private

◆ VOL_problem() [2/3]

VOL_problem::VOL_problem ( )

Default constructor.

◆ VOL_problem() [3/3]

VOL_problem::VOL_problem ( const char *  filename)

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

◆ ~VOL_problem()

VOL_problem::~VOL_problem ( )

Destruct the object.

Member Function Documentation

◆ operator=()

VOL_problem& VOL_problem::operator= ( const VOL_problem )
private

◆ set_default_parm()

void VOL_problem::set_default_parm ( )
private

◆ solve()

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.

◆ iter()

int VOL_problem::iter ( ) const
inline

returns the iteration number

Definition at line 681 of file VolVolume.hpp.

◆ alpha()

double VOL_problem::alpha ( ) const
inline

returns the value of alpha

Definition at line 683 of file VolVolume.hpp.

◆ lambda()

double VOL_problem::lambda ( ) const
inline

returns the value of lambda

Definition at line 685 of file VolVolume.hpp.

◆ read_params()

void VOL_problem::read_params ( const char *  filename)
private

Read in the parameters from the file filename.

◆ initialize()

int VOL_problem::initialize ( const bool  use_preset_dual)
private

initializes duals, bounds for the duals, alpha, lambda

◆ print_info()

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

◆ readjust_target()

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.

◆ power_heur()

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

◆ alpha_

double VOL_problem::alpha_
private

value of alpha

Definition at line 635 of file VolVolume.hpp.

◆ lambda_

double VOL_problem::lambda_
private

value of lambda

Definition at line 637 of file VolVolume.hpp.

◆ iter_

int VOL_problem::iter_

iteration number

Definition at line 642 of file VolVolume.hpp.

◆ __pad0

double VOL_problem::__pad0

Definition at line 643 of file VolVolume.hpp.

◆ @1

union { ... }

◆ value

double VOL_problem::value

final lagrangian value (OUTPUT)

Definition at line 652 of file VolVolume.hpp.

◆ dsol

VOL_dvector VOL_problem::dsol

final dual solution (INPUT/OUTPUT)

Definition at line 654 of file VolVolume.hpp.

◆ psol

VOL_dvector VOL_problem::psol

final primal solution (OUTPUT)

Definition at line 656 of file VolVolume.hpp.

◆ viol

VOL_dvector VOL_problem::viol

violations (b-Ax) for the relaxed constraints

Definition at line 658 of file VolVolume.hpp.

◆ parm

VOL_parms VOL_problem::parm

The parameters controlling the Volume Algorithm (INPUT)

Definition at line 664 of file VolVolume.hpp.

◆ psize

int VOL_problem::psize

length of primal solution (INPUT)

Definition at line 666 of file VolVolume.hpp.

◆ dsize

int VOL_problem::dsize

length of dual solution (INPUT)

Definition at line 668 of file VolVolume.hpp.

◆ dual_lb

VOL_dvector VOL_problem::dual_lb

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

Definition at line 671 of file VolVolume.hpp.

◆ dual_ub

VOL_dvector VOL_problem::dual_ub

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

Definition at line 674 of file VolVolume.hpp.


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