coin-Bcp
MKC_tm.hpp
Go to the documentation of this file.
1 // Copyright (C) 2000, International Business Machines
2 // Corporation and others. All Rights Reserved.
3 #ifndef _MKC_TM_H
4 #define _MKC_TM_H
5 
7 
8 #include "BCP_parameters.hpp"
9 #include "BCP_tm_user.hpp"
10 
11 #include "MKC_tm_param.hpp"
12 #include "MKC_lp_param.hpp"
13 #include "MKC_knapsack.hpp"
14 
15 //#############################################################################
16 
17 class MKC_var;
18 
19 //#############################################################################
20 
21 class MKC_tm : public BCP_tm_user {
22 public:
28 public:
29  MKC_tm() : clp(0) {}
30  ~MKC_tm() {
31  if (clp)
32  delete clp;
34  }
35  //===========================================================================
36  // Here are the user defined functions. For each of them a default is given
37  // which can be overridden when the concrete user class is defined.
38  //===========================================================================
39  //---------------------------------------------------------------------------
40  // pack the initial info for the appropriate process
41  virtual void
43  //---------------------------------------------------------------------------
44  // unpack an MIP feasible solution
45  virtual BCP_solution*
47  //---------------------------------------------------------------------------
48  virtual void
49  pack_var_algo(const BCP_var_algo* var, BCP_buffer& buf);
50  //---------------------------------------------------------------------------
51  virtual BCP_var_algo*
53  //---------------------------------------------------------------------------
54  // setting the base
55  virtual void
58  BCP_lp_relax*& matrix);
59  //---------------------------------------------------------------------------
60  // create the root node
61  virtual void
62  create_root(BCP_vec<BCP_var*>& added_vars,
63  BCP_vec<BCP_cut*>& added_cuts,
64  BCP_user_data*& user_data,
65  BCP_pricing_status& pricing_status);
66  //---------------------------------------------------------------------------
67  // feasible solution displaying
68  virtual void
70  //---------------------------------------------------------------------------
71  // various initializations before a new phase (e.g., pricing strategy)
72  virtual void
73  init_new_phase(int phase, BCP_column_generation& colgen);
74 };
75 
76 #endif
MKC_tm()
Definition: MKC_tm.hpp:29
virtual void display_feasible_solution(const BCP_solution *soln)
Display a feasible solution.
~MKC_tm()
Definition: MKC_tm.hpp:30
BCP_process_t
This enumerative constant describes the various process types.
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...
BCP_parameter_set< MKC_tm_par > tm_par
Definition: MKC_tm.hpp:23
virtual void init_new_phase(int phase, BCP_column_generation &colgen)
virtual void pack_var_algo(const BCP_var_algo *var, BCP_buffer &buf)
Clp Solver Interface.
OsiClpSolverInterface * clp
Definition: MKC_tm.hpp:27
BCP_parameter_set< MKC_lp_par > lp_par
Definition: MKC_tm.hpp:24
BCP_vec< MKC_var * > input_vars
Definition: MKC_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 create_root(BCP_vec< BCP_var * > &added_vars, BCP_vec< BCP_cut * > &added_cuts, BCP_user_data *&user_data, BCP_pricing_status &pricing_status)
virtual BCP_solution * unpack_feasible_solution(BCP_buffer &buf)
Unpack a MIP feasible solution that was packed by the BCP_lp_user::pack_feasible_solution() method...
void purge_ptr_vector(BCP_vec< T * > &pvec, typename BCP_vec< T * >::iterator first, typename BCP_vec< T * >::iterator last)
This function purges the entries [first,last) from the vector of pointers pvec.
Definition: BCP_vector.hpp:266
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.
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
MKC_knapsack_set kss
Definition: MKC_tm.hpp:25
virtual BCP_var_algo * unpack_var_algo(BCP_buffer &buf)
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.