This class holds every data for the Volume Algorithm and its solve
method must be invoked to solve the problem.
More...
#include <VolVolume.hpp>
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_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 . 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 | |
}; | |
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.
|
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.
|
private |
|
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.
|
inline |
returns the iteration number
Definition at line 681 of file VolVolume.hpp.
|
inline |
returns the value of alpha
Definition at line 683 of file VolVolume.hpp.
|
inline |
returns the value of lambda
Definition at line 685 of file VolVolume.hpp.
|
private |
Read in the parameters from the file filename
.
|
private |
initializes duals, bounds for the duals, alpha, lambda
|
private |
print volume info every parm.printinvl iterations
|
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.
|
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
|
private |
value of alpha
Definition at line 635 of file VolVolume.hpp.
|
private |
value of lambda
Definition at line 637 of file VolVolume.hpp.
int VOL_problem::iter_ |
iteration number
Definition at line 642 of file VolVolume.hpp.
double VOL_problem::__pad0 |
Definition at line 643 of file VolVolume.hpp.
union { ... } |
double VOL_problem::value |
final lagrangian value (OUTPUT)
Definition at line 652 of file VolVolume.hpp.
VOL_dvector VOL_problem::dsol |
final dual solution (INPUT/OUTPUT)
Definition at line 654 of file VolVolume.hpp.
VOL_dvector VOL_problem::psol |
final primal solution (OUTPUT)
Definition at line 656 of file VolVolume.hpp.
VOL_dvector VOL_problem::viol |
violations (b-Ax) for the relaxed constraints
Definition at line 658 of file VolVolume.hpp.
VOL_parms VOL_problem::parm |
The parameters controlling the Volume Algorithm (INPUT)
Definition at line 664 of file VolVolume.hpp.
int VOL_problem::psize |
length of primal solution (INPUT)
Definition at line 666 of file VolVolume.hpp.
int VOL_problem::dsize |
length of dual solution (INPUT)
Definition at line 668 of file VolVolume.hpp.
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.
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.