Main class to solve a MINLP. More...
#include <minlpopt.h>
Public Member Functions | |
MinlpOpt (Pointer< MinlpProblem > prob, Pointer< Param > param_, bool is_gams_prob_=false, Pointer< ostream > out_solver_p=out_out_p, Pointer< ostream > out_solver_log_p=out_log_p) | |
void | box_reduce0 () |
void | box_reduce1 () |
Reduces the box using BoundsFinder. | |
double | box_reduce2 () |
void | box_reduce3 () |
int | start_round_part_heu () |
Starts Rounding and Partition Heuristic. | |
int | start_bb () |
Starts Branch-and-Bound Algorithm. | |
void | check_initial_point () |
Checks, if the initial point is inside it's bound. | |
int | solve () |
Tries to solve the problem. | |
Public Attributes | |
set< SolCandidate > | sol_cand |
Solution candidates. | |
Pointer< dvector > | sol_Cext |
A solution of (C_ext). | |
bool | sol_Cext_is_solution |
double | low_bound |
Private Types | |
enum | { box_off, box_C, box_Cext, box_Pext } |
Private Member Functions | |
void | decompose () |
Computes decomposed formulation (S) of (P). | |
bool | check_convex (MinlpProblem &prob) |
Determines curvature. | |
void | quad_relax () |
Computes the quadratic relaxation (Q) of (S). | |
void | convex_relax () |
Computes the convex relaxation (C) of (Q) or (S). | |
void | init () |
Initialization of (basic) relaxations. | |
void | init2 () |
Initialization of further relaxations. | |
Pointer< MinlpProblem > | get_convex_prob (Pointer< MinlpProblem > prob) |
Gives a problem, which containts only the convex constraints from a given problem. | |
Pointer< MinlpProblem > | get_convex_prob (Pointer< MinlpProblem > prob, Pointer< MinlpProblem > prob_curv_ref) |
Gives a problem, which containts only the convex constraints from a given problem. | |
double | print_box_reduce_quality (dvector &oldlow, dvector &oldup, Pointer< MinlpProblem > prob, char *prefix) |
Private Attributes | |
Pointer< Param > | param |
Parameters. | |
Pointer< Timer > | timer |
Pointer< MINLPData > | minlpdata |
bool | is_gams_prob |
Indicates, whether the original problem comes from gams. | |
Pointer< MinlpProblem > | orig_prob |
The original problem. | |
Pointer< MinlpProblem > | split_prob |
The decomposed original problem. | |
Pointer< MinlpProblem > | quad_prob |
The nonconvex quadratic relaxation of the decomposed problem. | |
Pointer< MinlpProblem > | convex_prob |
The convexified quadratic decomposed problem. | |
Pointer< Reformulation > | reform |
Reformulated problems (Pext), (Qext), (Cext). | |
vector< vector< double > > | min_eigval |
vector< vector< double > > | max_eigval |
bool | prob_is_convex |
Indicates, whether the problem is convex. | |
SparseVector< double > | quad_obj_c_add |
To remember, which constants were added to the objective during computation of (Q). | |
vector< SparseVector< double > > | quad_con_c_add |
To remember, which constants were added to the constraints during computation of (Q). | |
SparseVector< double > | conv_obj_c_add |
To remember, which constants were added to the objective during computation of (C). | |
vector< SparseVector< double > > | conv_con_c_add |
To remember, which constants were added to the constraints during computation of (C). | |
ivector | ineq_index |
Pointer< LinearRelax > | linear_relax |
Linear relaxation methods: Generates (R) and cuts. | |
Pointer< LevelCutHandler > | levelcuts |
IntervalReduction | intervalreduction |
bool | init_called |
double | sol_cand_closeval_tol |
Pointer< dvector > | sol_cand_diam |
enum MinlpOpt:: { ... } | boxreduce_type |
int | boxreduce_effort |
double | boxreduce_time |
list< int > | unbounded_var |
The variables, where still no bound is known. | |
Friends | |
class | LinearRelax |
class | Reformulation |
int | main (int argc, char **argv) |
Main class to solve a MINLP.
MinlpOpt | mode options BCP, off level 0 default BCP Determines, which algorithm to use. BCP is the Branch and Cut algorithm. off stops after preprocessing. | |
Boxreduce | effort options 0, 1, 2 default 1 level 2 How much effort to spend in boxreduction. 0 computes unknown variable bounds only, except of the IntervalReduction, which is still run on all variables. 1 applies IntervalReduction and boxreduction by linear relaxations for all variables. 2 uses all available techniques for all variables. | |
Boxreduce | type options off, NLP, NLP2, MINLP default off level 0 Which method to use for the box reduction phase II. NLP is (C)-method, NLP2 is (Cext)-method, MINLP is (Pext)-method, off, if switches this part off. | |
Boxreduction | limit for reconvexification options [0,1] default 0.8 level 1 If the boxdiameter was reduced better than the value of this parameter, using (C), we compute a new convex relaxation from (Q). | |
Decomposition | options 0, 1 default 1 level 1 Whether to apply decomposition or not. | |
Decomposition | sample set Monte Carlo options integer >= 0 default 20 level 1 | |
Decomposition | sample set mid point options integer >= 0 default 1 level 1 | |
Decomposition | sample set vertices options integer >= 0 default 20 level 1 | |
Relax | check convex sample set Monte Carlo options integer >= 0 default 200 level 1 The number of sample points to use for convexity test. | |
Check | decomposition options 0, 1 default 0 level 0 Performs a test on the decomposition. | |
Check | polynomial underestimator options 0, 1 default 0 level 0 Performs a test on the polynomial underestimators. | |
Check | convexification options 0, 1 default 0 level 0 Performs a test on the convexification. | |
heu | close value tolerance options double $ 0$ default 10E-8 level 0 It the relative distance of two (objective) values is less than this tolerance, they are considered as equal. | |
heu | close points tolerance options double $ 0$ default .0001 level 0 If the maximal (over all variables) relative (to box diameter) distance is less than this tolerance, two points are considered as equal. | |
Level | Cuts options 0, 1 default 1 level 1 Whether to add a level cut. | |
Quadratic | Underestimator adaptive options 0, 1 default 1 level 2 Whether to use the new adaptive (but slower) quadratic underestimator or the old less reliable ones. |
Definition at line 198 of file minlpopt.h.
anonymous enum [private] |
Definition at line 291 of file minlpopt.h.
MinlpOpt::MinlpOpt | ( | Pointer< MinlpProblem > | prob, | |
Pointer< Param > | param_, | |||
bool | is_gams_prob_ = false , |
|||
Pointer< ostream > | out_solver_p = out_out_p , |
|||
Pointer< ostream > | out_solver_log_p = out_log_p | |||
) |
void MinlpOpt::decompose | ( | ) | [private] |
Computes decomposed formulation (S) of (P).
bool MinlpOpt::check_convex | ( | MinlpProblem & | prob | ) | [private] |
Determines curvature.
void MinlpOpt::quad_relax | ( | ) | [private] |
Computes the quadratic relaxation (Q) of (S).
void MinlpOpt::convex_relax | ( | ) | [private] |
Computes the convex relaxation (C) of (Q) or (S).
void MinlpOpt::init | ( | ) | [private] |
Initialization of (basic) relaxations.
void MinlpOpt::init2 | ( | ) | [private] |
Initialization of further relaxations.
Pointer<MinlpProblem> MinlpOpt::get_convex_prob | ( | Pointer< MinlpProblem > | prob | ) | [private] |
Gives a problem, which containts only the convex constraints from a given problem.
Pointer<MinlpProblem> MinlpOpt::get_convex_prob | ( | Pointer< MinlpProblem > | prob, | |
Pointer< MinlpProblem > | prob_curv_ref | |||
) | [private] |
Gives a problem, which containts only the convex constraints from a given problem.
Uses another problem as reference to get curvature information.
double MinlpOpt::print_box_reduce_quality | ( | dvector & | oldlow, | |
dvector & | oldup, | |||
Pointer< MinlpProblem > | prob, | |||
char * | prefix | |||
) | [private] |
void MinlpOpt::box_reduce0 | ( | ) |
void MinlpOpt::box_reduce1 | ( | ) |
Reduces the box using BoundsFinder.
Using NLP method with (C), if available, or convex constraints from (Q) or (P).
double MinlpOpt::box_reduce2 | ( | ) |
void MinlpOpt::box_reduce3 | ( | ) |
int MinlpOpt::start_round_part_heu | ( | ) |
Starts Rounding and Partition Heuristic.
int MinlpOpt::start_bb | ( | ) |
Starts Branch-and-Bound Algorithm.
void MinlpOpt::check_initial_point | ( | ) |
Checks, if the initial point is inside it's bound.
Exits, if the initial point of the original problem isn't inside the box.
int MinlpOpt::solve | ( | ) | [virtual] |
Tries to solve the problem.
Implements Solver.
friend class LinearRelax [friend] |
Definition at line 199 of file minlpopt.h.
friend class Reformulation [friend] |
Definition at line 200 of file minlpopt.h.
int main | ( | int | argc, | |
char ** | argv | |||
) | [friend] |
Pointer<Param> MinlpOpt::param [private] |
Parameters.
Definition at line 205 of file minlpopt.h.
Pointer<Timer> MinlpOpt::timer [private] |
Definition at line 207 of file minlpopt.h.
Pointer<MINLPData> MinlpOpt::minlpdata [private] |
Definition at line 209 of file minlpopt.h.
bool MinlpOpt::is_gams_prob [private] |
Indicates, whether the original problem comes from gams.
Definition at line 213 of file minlpopt.h.
Pointer<MinlpProblem> MinlpOpt::orig_prob [private] |
The original problem.
Definition at line 217 of file minlpopt.h.
Pointer<MinlpProblem> MinlpOpt::split_prob [private] |
The decomposed original problem.
Definition at line 221 of file minlpopt.h.
Pointer<MinlpProblem> MinlpOpt::quad_prob [private] |
The nonconvex quadratic relaxation of the decomposed problem.
Definition at line 225 of file minlpopt.h.
Pointer<MinlpProblem> MinlpOpt::convex_prob [private] |
The convexified quadratic decomposed problem.
Definition at line 229 of file minlpopt.h.
Pointer<Reformulation> MinlpOpt::reform [private] |
Reformulated problems (Pext), (Qext), (Cext).
Definition at line 233 of file minlpopt.h.
vector<vector<double> > MinlpOpt::min_eigval [private] |
Definition at line 235 of file minlpopt.h.
vector<vector<double> > MinlpOpt::max_eigval [private] |
Definition at line 235 of file minlpopt.h.
bool MinlpOpt::prob_is_convex [private] |
Indicates, whether the problem is convex.
Definition at line 239 of file minlpopt.h.
SparseVector<double> MinlpOpt::quad_obj_c_add [private] |
To remember, which constants were added to the objective during computation of (Q).
Definition at line 243 of file minlpopt.h.
vector<SparseVector<double> > MinlpOpt::quad_con_c_add [private] |
To remember, which constants were added to the constraints during computation of (Q).
Definition at line 246 of file minlpopt.h.
SparseVector<double> MinlpOpt::conv_obj_c_add [private] |
To remember, which constants were added to the objective during computation of (C).
Definition at line 249 of file minlpopt.h.
vector<SparseVector<double> > MinlpOpt::conv_con_c_add [private] |
To remember, which constants were added to the constraints during computation of (C).
Definition at line 252 of file minlpopt.h.
ivector MinlpOpt::ineq_index [private] |
Definition at line 254 of file minlpopt.h.
Pointer<LinearRelax> MinlpOpt::linear_relax [private] |
Linear relaxation methods: Generates (R) and cuts.
Definition at line 258 of file minlpopt.h.
Pointer<LevelCutHandler> MinlpOpt::levelcuts [private] |
Definition at line 260 of file minlpopt.h.
IntervalReduction MinlpOpt::intervalreduction [private] |
Definition at line 262 of file minlpopt.h.
bool MinlpOpt::init_called [private] |
Definition at line 280 of file minlpopt.h.
double MinlpOpt::sol_cand_closeval_tol [private] |
Definition at line 288 of file minlpopt.h.
Pointer<dvector> MinlpOpt::sol_cand_diam [private] |
Definition at line 289 of file minlpopt.h.
enum { ... } MinlpOpt::boxreduce_type [private] |
int MinlpOpt::boxreduce_effort [private] |
Definition at line 292 of file minlpopt.h.
double MinlpOpt::boxreduce_time [private] |
Definition at line 293 of file minlpopt.h.
list<int> MinlpOpt::unbounded_var [private] |
The variables, where still no bound is known.
Definition at line 297 of file minlpopt.h.
Solution candidates.
Definition at line 310 of file minlpopt.h.
A solution of (C_ext).
Definition at line 314 of file minlpopt.h.
Definition at line 315 of file minlpopt.h.
double MinlpOpt::low_bound |
Definition at line 317 of file minlpopt.h.