00001 // Copyright (C) 2000, International Business Machines 00002 // Corporation and others. All Rights Reserved. 00003 #ifndef _MC_TM_H 00004 #define _MC_TM_H 00005 00006 #include "BCP_tm_user.hpp" 00007 #include "BCP_parameters.hpp" 00008 00009 #include "MC_tm_param.hpp" 00010 #include "MC_lp_param.hpp" 00011 00012 #include "MC.hpp" 00013 #include "MC_solution.hpp" 00014 #include "MC_cut.hpp" 00015 00016 class MC_tm : public BCP_tm_user { 00017 public: 00018 BCP_parameter_set<MC_tm_par> tm_par; 00019 BCP_parameter_set<MC_lp_par> lp_par; 00020 // BCP_parameter_set<MC_cg_par> cg_par; 00021 // BCP_parameter_set<MC_cg_par> vg_par; 00022 00023 MC_problem mc; 00024 MC_solution best_soln; 00025 00026 public: 00027 MC_tm() : tm_par(), lp_par(), mc(), best_soln() {} 00028 ~MC_tm() {} 00029 00030 //-------------------------------------------------------------------------- 00031 // pack the module data for the appropriate process 00032 void 00033 pack_module_data(BCP_buffer& buf, BCP_process_t ptype); 00034 //-------------------------------------------------------------------------- 00035 // unpack an MIP feasible solution 00036 BCP_solution* 00037 unpack_feasible_solution(BCP_buffer& buf); 00038 //-------------------------------------------------------------------------- 00039 // Pack an algorithmic cut 00040 void 00041 pack_cut_algo(const BCP_cut_algo* cut, BCP_buffer& buf); 00042 //-------------------------------------------------------------------------- 00044 BCP_cut_algo* 00045 unpack_cut_algo(BCP_buffer& buf); 00046 //-------------------------------------------------------------------------- 00047 // feasible solution displaying 00048 void 00049 display_solution(const BCP_solution* soln); 00050 //-------------------------------------------------------------------------- 00051 // setting the core 00052 void 00053 initialize_core(BCP_vec<BCP_var_core*>& vars, 00054 BCP_vec<BCP_cut_core*>& cuts, 00055 BCP_lp_relax*& matrix); 00056 //-------------------------------------------------------------------------- 00057 // create the root node 00058 void 00059 create_root(BCP_vec<BCP_var*>& added_vars, 00060 BCP_vec<BCP_cut*>& added_cuts, 00061 BCP_user_data*& user_data); 00062 00063 //-------------------------------------------------------------------------- 00064 // Display a feasible solution 00065 void 00066 display_feasible_solution(const BCP_solution* sol); 00067 00068 //########################################################################## 00069 }; 00070 00071 #endif