coin-Bcp
MCF3_tm.hpp
Go to the documentation of this file.
1 #ifndef MCF3_tm_hpp
2 #define MCF3_tm_hpp
3 
4 #include "BCP_buffer.hpp"
5 #include "BCP_tm_user.hpp"
6 #include "BCP_parameters.hpp"
7 #include "MCF3_par.hpp"
8 #include "MCF3_var.hpp"
9 #include "MCF3_data.hpp"
10 
11 class MCF3_packer : public BCP_user_pack
12 {
14  virtual void
16  MCF3_pack_var(var, buf);
17  }
18 
21  return MCF3_unpack_var(buf);
22  }
23 
25  virtual void
27  const MCF3_user* u = dynamic_cast<const MCF3_user*>(ud);
28  u->pack(buf);
29  }
30 
33  return new MCF3_user(buf);
34  }
35 };
36 
37 //##############################################################################
38 
39 class MCF3_tm : public BCP_tm_user
40 {
41 public:
44 
45 public:
46  MCF3_tm() {}
47  virtual ~MCF3_tm() {}
48 
49  virtual void pack_module_data(BCP_buffer& buf, BCP_process_t ptype);
50  virtual void init_new_phase(int phase,
51  BCP_column_generation& colgen,
52  CoinSearchTreeBase*& candidates);
53  virtual void initialize_core(BCP_vec<BCP_var_core*>& vars,
55  BCP_lp_relax*& matrix);
56  virtual void create_root(BCP_vec<BCP_var*>& added_vars,
57  BCP_vec<BCP_cut*>& added_cuts,
58  BCP_user_data*& user_data);
59  virtual void display_feasible_solution(const BCP_solution* sol);
60 };
61 
62 #endif
virtual void create_root(BCP_vec< BCP_var * > &added_vars, BCP_vec< BCP_cut * > &added_cuts, BCP_user_data *&user_data)
Create the set of extra variables and cuts that should be added to the formulation in the root node...
void MCF3_pack_var(const BCP_var_algo *var, BCP_buffer &buf)
MCF3_tm()
Definition: MCF3_tm.hpp:46
BCP_process_t
This enumerative constant describes the various process types.
virtual BCP_var_algo * unpack_var_algo(BCP_buffer &buf)
Unpack an algorithmic variable.
Definition: MCF3_tm.hpp:20
virtual void pack_var_algo(const BCP_var_algo *var, BCP_buffer &buf)
Pack an algorithmic variable.
Definition: MCF3_tm.hpp:15
virtual void init_new_phase(int phase, BCP_column_generation &colgen, CoinSearchTreeBase *&candidates)
Do whatever initialization is necessary before the phase-th phase.
virtual ~MCF3_tm()
Definition: MCF3_tm.hpp:47
BCP_parameter_set< MCF3_par > par
Definition: MCF3_tm.hpp:42
BCP_var_algo * MCF3_unpack_var(BCP_buffer &buf)
virtual BCP_user_data * unpack_user_data(BCP_buffer &buf)
Unpack an user data.
Definition: MCF3_tm.hpp:32
void pack(BCP_buffer &buf) const
MCF3_data data
Definition: MCF3_tm.hpp:43
virtual void pack_user_data(const BCP_user_data *ud, BCP_buffer &buf)
Pack an user data.
Definition: MCF3_tm.hpp:26
This is the class from which the user should derive her own algorithmic variables.
Definition: BCP_var.hpp:277
This class describes the message buffer used for all processes of BCP.
Definition: BCP_buffer.hpp:39
virtual void pack_module_data(BCP_buffer &buf, BCP_process_t ptype)
Pack the initial information (info that the user wants to send over) for the process specified by the...
virtual void display_feasible_solution(const BCP_solution *sol)
Display a feasible solution.
BCP_column_generation
This enumerative constant describes what to do when a search tree node becomes fathomable for the cur...
Definition: BCP_enum.hpp:65
The BCP_tm_user class is the base class from which the user can derive a problem specific class to be...
Definition: BCP_tm_user.hpp:58
virtual void initialize_core(BCP_vec< BCP_var_core * > &vars, BCP_vec< BCP_cut_core * > &cuts, BCP_lp_relax *&matrix)
Create the core of the problem by filling out the last three arguments.
An object of type BCP_lp_relax holds the description of an lp relaxation.
Definition: BCP_matrix.hpp:267
This is the abstract base class for a solution to a Mixed Integer Programming problem.