Base class for Lagrangian Heuristics. More...
#include <lagheu.h>
Public Member Functions | |
LagHeu (Pointer< MinlpProblem > orig_prob_, Pointer< LinearRelax > linrelax_, bool is_gams_prob=false, double closeval_tol_=0., Pointer< dvector > diam_=NULL, Pointer< Param > param_=NULL, Pointer< ostream > out_solver_p_=out_out_p, Pointer< ostream > out_solver_log_p_=out_log_p) | |
void | set_linear_relax (Pointer< LinearRelax > linrelax_) |
virtual int | solve (Pointer< MinlpNode > node_)=0 |
int | solve () |
Solves the problem. | |
Protected Member Functions | |
void | make_project_LP () |
Initialize the project LP. | |
void | update_project_LP () |
Sets variable bounds according to current node in the project LP. | |
void | update_project_LP_x (const dvector &x) |
Sets reference point x in the project LP. | |
MIPSolver::SolutionStatus | solve_project_LP (dvector &sol) |
Solves the current project LP. | |
MIPSolver::SolutionStatus | solve_project_LP (double &val) |
void | project_LP_fix_variable (int i, double val) |
void | project_LP_unfix_variable (int i) |
void | make_lagheu_LP (double delta) |
solves an LP to get a combination of RMP-points that violates the coupling constraints as less as possible. | |
MIPSolver::SolutionStatus | solve_lagheu_LP () |
MIPSolver::SolutionStatus | solve_lagheu_LP (dvector &z, dvector &x) |
MIPSolver::SolutionStatus | solve_lagheu_LP (vector< dvector > &z, dvector &x) |
void | lagheu_LP_fixblock (int k, const MIPSolver::ColItem *colitem) |
void | lagheu_LP_unfixblock (int k) |
double | couple_con_violation (const dvector &x) |
Computes the violation of the coupling constraints. | |
bool | project_and_round (dvector &x) |
successive projection and rounding of a given point to find a point, which is close to x, minimizes the objective function, satisfies the binary-constraints and is feasible for the linear relaxation. | |
Protected Attributes | |
Pointer< MinlpNode > | node |
vector< list< const MIPSolver::ColItem * > > | lagheu_LP_columns |
double | delta |
Penalty parameter in project LP. | |
Private Member Functions | |
bool | project_and_round_rek (dvector &x, map< int, double > &unfixed, int &switch_count) |
Private Attributes | |
Pointer< MIPSolver > | project_LP |
LP to project a point onto the feasible set of (R) with respect to the 1-norm. | |
Pointer< SparseVector< double > > | project_LP_obj |
c^T x from linear relaxation. | |
list< const MIPSolver::RowItem * > | project_LP_cuts |
int | x_con_start |
The index of the start of the x-s= x constraints. | |
Pointer< MIPSolver > | lagheu_LP |
int | z_start |
int | switch_count_limit |
Base class for Lagrangian Heuristics.
LagHeu | penalty parameter options double $ 0$ default 10 Determines penalty parameter $$ in LagHeu-LP and Project-LP. |
Definition at line 23 of file lagheu.h.
LagHeu::LagHeu | ( | Pointer< MinlpProblem > | orig_prob_, | |
Pointer< LinearRelax > | linrelax_, | |||
bool | is_gams_prob = false , |
|||
double | closeval_tol_ = 0. , |
|||
Pointer< dvector > | diam_ = NULL , |
|||
Pointer< Param > | param_ = NULL , |
|||
Pointer< ostream > | out_solver_p_ = out_out_p , |
|||
Pointer< ostream > | out_solver_log_p_ = out_log_p | |||
) | [inline] |
bool LagHeu::project_and_round_rek | ( | dvector & | x, | |
map< int, double > & | unfixed, | |||
int & | switch_count | |||
) | [private] |
void LagHeu::make_project_LP | ( | ) | [protected] |
Initialize the project LP.
project LP: Minimizing objective function and distance from a given point x, s.t. the coupling constraints are feasible. The variable bounds are initialized to [-, ] and will be by update_project_LP.
void LagHeu::update_project_LP | ( | ) | [protected] |
Sets variable bounds according to current node in the project LP.
void LagHeu::update_project_LP_x | ( | const dvector & | x | ) | [protected] |
Sets reference point x in the project LP.
MIPSolver::SolutionStatus LagHeu::solve_project_LP | ( | dvector & | sol | ) | [protected] |
Solves the current project LP.
sol | To store the solution. |
MIPSolver::SolutionStatus LagHeu::solve_project_LP | ( | double & | val | ) | [protected] |
void LagHeu::project_LP_fix_variable | ( | int | i, | |
double | val | |||
) | [protected] |
void LagHeu::project_LP_unfix_variable | ( | int | i | ) | [protected] |
void LagHeu::make_lagheu_LP | ( | double | delta | ) | [protected] |
solves an LP to get a combination of RMP-points that violates the coupling constraints as less as possible.
z | The solution of the LP. |
MIPSolver::SolutionStatus LagHeu::solve_lagheu_LP | ( | ) | [protected] |
MIPSolver::SolutionStatus LagHeu::solve_lagheu_LP | ( | dvector & | z, | |
dvector & | x | |||
) | [protected] |
MIPSolver::SolutionStatus LagHeu::solve_lagheu_LP | ( | vector< dvector > & | z, | |
dvector & | x | |||
) | [protected] |
void LagHeu::lagheu_LP_fixblock | ( | int | k, | |
const MIPSolver::ColItem * | colitem | |||
) | [protected] |
void LagHeu::lagheu_LP_unfixblock | ( | int | k | ) | [protected] |
double LagHeu::couple_con_violation | ( | const dvector & | x | ) | [protected] |
Computes the violation of the coupling constraints.
bool LagHeu::project_and_round | ( | dvector & | x | ) | [protected] |
successive projection and rounding of a given point to find a point, which is close to x, minimizes the objective function, satisfies the binary-constraints and is feasible for the linear relaxation.
x | The point to try. The result is written to x. |
void LagHeu::set_linear_relax | ( | Pointer< LinearRelax > | linrelax_ | ) | [inline] |
Reimplemented from RelaxationSolver.
Implemented in LagHeu1, LagHeu_SimAnnealing, LagHeu2, and LagHeu2b.
int LagHeu::solve | ( | ) | [inline, virtual] |
Solves the problem.
Abstract.
Implements Solver.
Pointer<MIPSolver> LagHeu::project_LP [private] |
Pointer<SparseVector<double> > LagHeu::project_LP_obj [private] |
list<const MIPSolver::RowItem*> LagHeu::project_LP_cuts [private] |
int LagHeu::x_con_start [private] |
Pointer<MIPSolver> LagHeu::lagheu_LP [private] |
int LagHeu::z_start [private] |
int LagHeu::switch_count_limit [private] |
Pointer<MinlpNode> LagHeu::node [protected] |
vector<list<const MIPSolver::ColItem*> > LagHeu::lagheu_LP_columns [protected] |
double LagHeu::delta [protected] |