Cbc  2.9.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 <OsiTestSolver.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 607 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 683 of file OsiTestSolver.hpp.

double VOL_problem::alpha ( ) const
inline

returns the value of alpha

Definition at line 685 of file OsiTestSolver.hpp.

double VOL_problem::lambda ( ) const
inline

returns the value of lambda

Definition at line 687 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 637 of file OsiTestSolver.hpp.

double VOL_problem::lambda_
private

value of lambda

Definition at line 639 of file OsiTestSolver.hpp.

int VOL_problem::iter_

iteration number

Definition at line 644 of file OsiTestSolver.hpp.

double VOL_problem::__pad0

Definition at line 645 of file OsiTestSolver.hpp.

union { ... }
double VOL_problem::value

final lagrangian value (OUTPUT)

Definition at line 654 of file OsiTestSolver.hpp.

VOL_dvector VOL_problem::dsol

final dual solution (INPUT/OUTPUT)

Definition at line 656 of file OsiTestSolver.hpp.

VOL_dvector VOL_problem::psol

final primal solution (OUTPUT)

Definition at line 658 of file OsiTestSolver.hpp.

VOL_dvector VOL_problem::viol

violations (b-Ax) for the relaxed constraints

Definition at line 660 of file OsiTestSolver.hpp.

VOL_parms VOL_problem::parm

The parameters controlling the Volume Algorithm (INPUT)

Definition at line 666 of file OsiTestSolver.hpp.

int VOL_problem::psize

length of primal solution (INPUT)

Definition at line 668 of file OsiTestSolver.hpp.

int VOL_problem::dsize

length of dual solution (INPUT)

Definition at line 670 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 673 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 676 of file OsiTestSolver.hpp.


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