00001
00002
00003 #ifndef _BCP_LP_FUNCTIONS_H
00004 #define _BCP_LP_FUNCTIONS_H
00005
00006
00007
00008
00009 #include <vector>
00010
00011 #include "BCP_enum.hpp"
00012 #include "BCP_enum_branch.hpp"
00013 #include "BCP_message_tag.hpp"
00014 #include "BCP_vector.hpp"
00015
00016 class OsiSolverInterface;
00017 class CoinWarmStart;
00018
00019 class BCP_buffer;
00020 class BCP_lp_prob;
00021 class BCP_lp_result;
00022 class BCP_lp_branching_object;
00023 class BCP_presolved_lp_brobj;
00024 class BCP_solution;
00025 class BCP_col;
00026 class BCP_row;
00027 class BCP_warmstart;
00028 class BCP_var;
00029
00030
00031
00032 void
00033 BCP_lp_process_core(BCP_lp_prob& p, BCP_buffer& buf);
00034
00035
00036
00037 void BCP_lp_repricing(BCP_lp_prob& p);
00038
00039
00040
00041 void BCP_lp_main_loop(BCP_lp_prob& p);
00042
00043
00044
00045 void BCP_price_vars(BCP_lp_prob& p, const bool from_fathom,
00046 BCP_vec<BCP_var*>& vars_to_add,
00047 BCP_vec<BCP_col*>& cols_to_add);
00048 void BCP_restore_feasibility(BCP_lp_prob& p,
00049 const std::vector<double*> dual_rays,
00050 BCP_vec<BCP_var*>& vars_to_add,
00051 BCP_vec<BCP_col*>& cols_to_add);
00052 void BCP_lp_perform_fathom(BCP_lp_prob& p, const char* msg,
00053 BCP_message_tag msgtag);
00054 bool BCP_lp_fathom(BCP_lp_prob& p, const bool from_repricing);
00055
00056
00057
00058 int BCP_lp_generate_cuts(BCP_lp_prob& p,
00059 bool first_in_loop, const bool from_repricing);
00060
00061
00062
00063 int BCP_lp_generate_vars(BCP_lp_prob& p,
00064 bool first_in_loop, const bool from_repricing);
00065
00066
00067
00068 void BCP_lp_process_result(BCP_lp_prob& p, const BCP_lp_result& lpres);
00069 void BCP_lp_purge_slack_pool(BCP_lp_prob& p);
00070 void BCP_lp_test_feasibility(BCP_lp_prob& p, const BCP_lp_result& lpres);
00071 double BCP_lp_compute_lower_bound(BCP_lp_prob& p, const BCP_lp_result& lpres);
00072 void BCP_lp_clean_up_node(BCP_lp_prob& p);
00073 BCP_message_tag BCP_lp_pack_for_cg(BCP_lp_prob& p);
00074 BCP_message_tag BCP_lp_pack_for_vg(BCP_lp_prob& p);
00075 void BCP_lp_prepare_for_new_node(BCP_lp_prob& p);
00076 void BCP_lp_add_cols_to_lp(const BCP_vec<BCP_col*>& cols,
00077 OsiSolverInterface* lp);
00078 void BCP_lp_add_rows_to_lp(const BCP_vec<BCP_row*>& rows,
00079 OsiSolverInterface* lp);
00080
00081
00082 void BCP_lp_check_ub(BCP_lp_prob& p);
00083 int BCP_lp_next_var_index(BCP_lp_prob& p);
00084 int BCP_lp_next_cut_index(BCP_lp_prob& p);
00085 void BCP_lp_process_ub_message(BCP_lp_prob& p, BCP_buffer& buf);
00086 void BCP_lp_send_cuts_to_cp(BCP_lp_prob& p, const int eff_cnt_limit);
00087 void BCP_lp_unpack_diving_info(BCP_lp_prob& p, BCP_buffer& buf);
00088
00089
00090
00091 BCP_branching_result
00092 BCP_lp_branch(BCP_lp_prob& p);
00093
00094
00095
00096 bool BCP_lp_fix_vars(BCP_lp_prob& p);
00097 void BCP_lp_adjust_row_effectiveness(BCP_lp_prob& p);
00098 void BCP_lp_delete_cols_and_rows(BCP_lp_prob& p,
00099 BCP_lp_branching_object* can,
00100 const int added_colnum,
00101 const int added_rownum,
00102 const bool from_fathom,
00103 const bool force_delete);
00104 int BCP_lp_add_from_local_cut_pool(BCP_lp_prob& p);
00105 int BCP_lp_add_from_local_var_pool(BCP_lp_prob& p);
00106
00107
00108
00109
00110
00111 int BCP_lp_send_node_description(BCP_lp_prob& p,
00112 BCP_presolved_lp_brobj* brobj,
00113 BCP_message_tag msgtag);
00114
00115
00116
00117 void BCP_lp_unpack_active_node(BCP_lp_prob& p, BCP_buffer& buf);
00118
00119
00120
00121 void BCP_lp_create_lp(BCP_lp_prob& p);
00122
00123
00124
00125
00126
00127 BCP_warmstart* BCP_lp_convert_CoinWarmStart(BCP_lp_prob& p, CoinWarmStart*& ws);
00128
00129 #endif