BCP_message_single.cpp
Go to the documentation of this file.
1 // Copyright (C) 2000, International Business Machines
2 // Corporation and others. All Rights Reserved.
3 
4 #include <cstdio>
5 
6 #include "CoinTime.hpp"
7 
8 #include "BCP_math.hpp"
9 
10 #include "BCP_USER.hpp"
11 
12 #include "BCP_error.hpp"
13 #include "BCP_buffer.hpp"
14 #include "BCP_vector.hpp"
15 #include "BCP_message_single.hpp"
16 
17 #include "BCP_problem_core.hpp"
18 #include "BCP_node_change.hpp"
19 
20 #include "BCP_tm_functions.hpp"
21 #include "BCP_tm_user.hpp"
22 #include "BCP_lp_functions.hpp"
23 #include "BCP_lp_user.hpp"
24 #include "BCP_lp.hpp"
25 
26 #include "BCP_cg_user.hpp"
27 #include "BCP_cg.hpp"
28 
29 #include "BCP_vg_user.hpp"
30 #include "BCP_vg.hpp"
31 
32 #include "BCP_tm.hpp"
33 
34 std::map<int, BCP_process*> BCP_single_environment::processes;
35 
36 //#############################################################################
37 
38 void
40  const char* const * args)
41 {
42  int i;
43  for (i = _argnum - 1; i >= 0; --i) {
44  free(_arglist[i]);
45  }
46  _argnum = argnum;
47  _arglist = new char*[argnum];
48  for (i = _argnum - 1; i >= 0; --i) {
49  _arglist[i] = strdup(args[i]);
50  }
51 }
52 
53 //#############################################################################
54 
56 {
57  for (int i = _argnum - 1; i >= 0; --i) {
58  free(_arglist[i]);
59  }
60  delete[] _arglist;
61 }
62 
63 //-----------------------------------------------------------------------------
64 
65 int
67 {
68  // OK, the TM invoked registration. Now this function takes over and
69  // becomes the driver for ALL `virtual' processes.
70  //--------------------------------------------------------------------------
71  // We start as it is in tm_main.cpp
72  int _tm_id(0);
73  int _lp_id(1);
74 #if ! defined(BCP_ONLY_LP_PROCESS_HANDLING_WORKS)
75  int _cg_id(2);
76  int _vg_id(3);
77 #endif
78  // int _cp_id(4);
79  // int _vp_id(5);
80  BCP_tm_prob* _tm_prob = new BCP_tm_prob();
81  processes[0] = _tm_prob;
82 
87  /*
88  _tm_prob->slave_pars.cp.set_entry(BCP_cp_par::MessagePassingIsSerial,true);
89  _tm_prob->slave_pars.vp.set_entry(BCP_vp_par::MessagePassingIsSerial,true);
90  */
92 
93  _tm_prob->msg_env = this;
94  _tm_prob->start_time = CoinWallclockTime();
95  _my_id = _tm_id;
96 
97  // BCP_tm_user_init() returns a BCP_tm_user* and that will be part of p.
98  // Also, it should take care of every I/O, heuristic startup, etc. the user
99  // wants to do. Wreak havoc in p if (s)he wants.
100  // BUT: once this function returns, the processes designated to be part of
101  // BCP must be idle and waiting for a message. See the
102  // BCP_slave_process_stub() function below.
103  _tm_prob->user = user_init->tm_init(*_tm_prob, _argnum, _arglist);
104  _tm_prob->user->setTmProblemPointer(_tm_prob);
105  _tm_prob->packer = user_init->packer_init(_tm_prob->user);
106  _tm_prob->packer->user_class = _tm_prob->user;
107 
108  // Initialize the number of leaves assigned to CP's and VP's as 0
109 #if ! defined(BCP_ONLY_LP_PROCESS_HANDLING_WORKS)
110  if (_tm_prob->param(BCP_tm_par::CpProcessNum) > 0) {
111  _tm_prob->leaves_per_cp.reserve(_tm_prob->slaves.cp->procs().size());
112  for (int i = _tm_prob->slaves.cp->procs().size() - 1; i >= 0; --i)
114  (std::make_pair(_tm_prob->slaves.cp->procs()[i], 0));
115  }
116  if (_tm_prob->param(BCP_tm_par::VpProcessNum) > 0) {
117  _tm_prob->leaves_per_vp.reserve(_tm_prob->slaves.vp->procs().size());
118  for (int i = _tm_prob->slaves.vp->procs().size() - 1; i >= 0; --i)
120  (std::make_pair(_tm_prob->slaves.vp->procs()[i], 0));
121  }
122 #endif
123 
124  // Set the core (variables & cuts)
125  _tm_prob->core = BCP_tm_create_core(*_tm_prob);
126  _tm_prob->core_as_change = new BCP_problem_core_change;
127  *_tm_prob->core_as_change = *_tm_prob->core;
128 
129  // Initialize the root of the search tree (can't invoke directly
130  // p.user->create_root(), b/c the root might contain extra vars/cuts and
131  // it's better if we take care of inserting them into the appropriate data
132  // structures.
133  BCP_tm_node* root = BCP_tm_create_root(*_tm_prob);
134 
135  _tm_prob->next_phase_nodes.push_back(root);
136  _tm_prob->search_tree.insert(root);
137 
138  BCP_sanity_checks(*_tm_prob);
139 
140  // The TM is ready to roll
141 
142  //=========================================================================
143  // Create the slave "processes"
144  //=========================================================================
145  // LP
146  BCP_lp_prob* _lp_prob = new BCP_lp_prob(_lp_id, _tm_id);
147  processes[_lp_id] = _lp_prob;
148  _lp_prob->msg_env = new BCP_single_environment(_lp_id);
149  _tm_prob->lp_procs.push_back(_lp_id);
150  _tm_prob->lp_scheduler.add_free_ids(_tm_prob->lp_procs.size(),
151  &_tm_prob->lp_procs[0]);
152  _tm_prob->lp_scheduler.
155  10.0, /* estimated root time */
162 
163  //-------------------------------------------------------------------------
164  BCP_cg_prob* _cg_prob = 0;
165  BCP_vg_prob* _vg_prob = 0;
166 // BCP_cp_prob* _cp_prob = 0;
167 // BCP_vp_prob* _vp_prob = 0;
168  //-------------------------------------------------------------------------
169  // CG
170 #if ! defined(BCP_ONLY_LP_PROCESS_HANDLING_WORKS)
171  if (_tm_prob->param(BCP_tm_par::CgProcessNum) > 0) {
172  _cg_prob = new BCP_cg_prob(_cg_id, _tm_id);
173  processes[_cg_id] = _cg_prob;
174  _cg_prob->msg_env = new BCP_single_environment(_cg_id);
175  _tm_prob->slaves.cg = new BCP_proc_array;
176  _tm_prob->slaves.cg->add_proc(_cg_id);
177  _tm_prob->slaves.all->add_proc(_cg_id);
178  }
179  //-------------------------------------------------------------------------
180  // VG
181  if (_tm_prob->param(BCP_tm_par::VgProcessNum) > 0) {
182  _vg_prob = new BCP_vg_prob(_vg_id, _tm_id);
183  processes[_vg_id] = _vg_prob;
184  _vg_prob->msg_env = new BCP_single_environment(_vg_id);
185  _tm_prob->slaves.vg = new BCP_proc_array;
186  _tm_prob->slaves.vg->add_proc(_vg_id);
187  _tm_prob->slaves.all->add_proc(_vg_id);
188  }
189  //-------------------------------------------------------------------------
190  // CP
191  if (_tm_prob->param(BCP_tm_par::CpProcessNum) > 0) {
192  _cp_prob = new BCP_cp_prob(_cp_id, _tm_id);
193  processes[_cp_id] = _cp_prob;
194  _cp_prob->msg_env = new BCP_single_environment(_cp_id);
195  _tm_prob->slaves.cp = new BCP_proc_array;
196  _tm_prob->slaves.cp->add_proc(_cp_id);
197  _tm_prob->slaves.all->add_proc(_cp_id);
198  }
199  //-------------------------------------------------------------------------
200  // VP
201  if (_tm_prob->param(BCP_tm_par::VpProcessNum) > 0) {
202  _vp_prob = new BCP_vp_prob(_vp_id, _tm_id);
203  processes[_vp_id] = _vp_prob;
204  _vp_prob->msg_env = new BCP_single_environment(_vp_id);
205  _tm_prob->slaves.vp = new BCP_proc_array;
206  _tm_prob->slaves.vp->add_proc(_vp_id);
207  _tm_prob->slaves.all->add_proc(_vp_id);
208  }
209 #endif
210 
211  //=========================================================================
212  // distribute the core to the slave processes
213  // LP
214  _tm_prob->msg_buf.clear();
215  _tm_prob->core->pack(_tm_prob->msg_buf);
216  BCP_lp_process_core(*_lp_prob, _tm_prob->msg_buf);
217 
218  // CG
219  if (_cg_prob) {
220  _tm_prob->msg_buf.clear();
221  _tm_prob->core->pack(_tm_prob->msg_buf);
222  _cg_prob->core->unpack(_tm_prob->msg_buf);
223  }
224  // VG
225  if (_vg_prob) {
226  _tm_prob->msg_buf.clear();
227  _tm_prob->core->pack(_tm_prob->msg_buf);
228  _vg_prob->core->unpack(_tm_prob->msg_buf);
229  }
230  // CP
231  // VP
232 
233  //=========================================================================
234  // Initialize the slave "processes"
235  //=========================================================================
236  // LP (it already has the core)
237  // copy over the parameter structure
238  _lp_prob->par = _tm_prob->slave_pars.lp;
239  // create the user universe
240  _lp_prob->user = user_init->lp_init(*_lp_prob);
241  _lp_prob->user->setLpProblemPointer(_lp_prob);
242  _lp_prob->packer = user_init->packer_init(_lp_prob->user);
243  _lp_prob->packer->user_class = _lp_prob->user;
244 
245  // copy over the user info
246  _tm_prob->msg_buf.clear();
247  _tm_prob->user->pack_module_data(_tm_prob->msg_buf, BCP_ProcessType_LP);
248  _lp_prob->user->unpack_module_data(_tm_prob->msg_buf);
249  _lp_prob->master_lp = _lp_prob->user->initialize_solver_interface();
250 
251  _lp_prob->upper_bound = std::min<double>(_tm_prob->ub(), BCP_DBL_MAX);
252  //-------------------------------------------------------------------------
253  if (_cg_prob) {
254  // CG (it already has the core)
255  // copy over the parameter structure
256  _cg_prob->par = _tm_prob->slave_pars.cg;
257  // create the user universe
258  _cg_prob->user = user_init->cg_init(*_cg_prob);
259  _cg_prob->user->setCgProblemPointer(_cg_prob);
260  _cg_prob->packer = user_init->packer_init(_cg_prob->user);
261  _cg_prob->packer->user_class = _cg_prob->user;
262  // copy over the user info
263  _tm_prob->msg_buf.clear();
264  _tm_prob->user->pack_module_data(_tm_prob->msg_buf,
266  if (_cg_prob->user)
267  _cg_prob->user->unpack_module_data(_tm_prob->msg_buf);
268  }
269  //-------------------------------------------------------------------------
270  // VG
271  if (_vg_prob) {
272  // VG (it already has the core)
273  // copy over the parameter structure
274  _vg_prob->par = _tm_prob->slave_pars.vg;
275  // create the user universe
276  _vg_prob->user = user_init->vg_init(*_vg_prob);
277  _vg_prob->user->setVgProblemPointer(_vg_prob);
278  _vg_prob->packer = user_init->packer_init(_vg_prob->user);
279  _vg_prob->packer->user_class = _vg_prob->user;
280  // copy over the user info
281  _tm_prob->msg_buf.clear();
282  _tm_prob->user->pack_module_data(_tm_prob->msg_buf,
284  if (_vg_prob->user)
285  _vg_prob->user->unpack_module_data(_tm_prob->msg_buf);
286  }
287  //-------------------------------------------------------------------------
288  // CP
289  // VP
290 
291  //=========================================================================
292  // Back to TM
293  bool something_died = false;
294  try {
295  for ( _tm_prob->phase = 0; true ; ++_tm_prob->phase) {
296  // insert the nodes in next_phase_nodes into candidates, print out
297  // some statistics about the previous phase (if there was one) and
298  // do some other stuff, too.
300  // do one phase
301  // While there are nodes waiting to be processed (or being
302  // processed) we don't go to the next phase
303  something_died = false;
304  while (! _tm_prob->candidate_list.empty() ||
305  _tm_prob->lp_scheduler.numNodeIds() > 0){
306  // Fill up as many free LP processes as we can
307  if (BCP_tm_start_new_nodes(*_tm_prob) == BCP_NodeStart_Error) {
308  // Error indicates that something has died
309  something_died = true;
310  break;
311  }
312  // No need to process messages, they have all been processed
313  // (single environment!) Also all the "processes" are alive.
314  }
315  // If nothing is left for the next phase or if something has died
316  // then quit the infinite loop.
317  if (_tm_prob->next_phase_nodes.size() == 0 || something_died)
318  break;
319  }
320  }
321  catch (BCP_fatal_error& err) {
322  // there can be only one, a timeout
323  }
324 
325  // everything is done
326  BCP_tm_wrapup(_tm_prob, _lp_prob, _cg_prob, _vg_prob, true);
327  // sleep(7200);
328 
329  delete _lp_prob;
330 
331  if (_cg_prob) {
332  delete _cg_prob;
333  }
334  if (_vg_prob) {
335  delete _vg_prob;
336  }
337 
338  // if (_cp_prob)
339  // delete _cp_prob;
340  // if (_vp_prob)
341  // delete _vp_prob;
342 
343  delete _tm_prob;
344 
345  return 0; //fake, just to quiet the compiler
346 }
347 
348 //-----------------------------------------------------------------------------
349 
350 int
352  throw BCP_fatal_error("\
353 BCP_single_environment::parent_process() invoked.\n");
354  return 0; // to satisfy aCC on HP-UX
355 }
356 
357 bool
359 {
360  return true;
361 }
362 
363 const int*
364 BCP_single_environment::alive(int num, const int* pids)
365 {
366  return NULL;
367 }
368 
369 //-----------------------------------------------------------------------------
370 
371 void
373  const BCP_message_tag tag)
374 {
375  BCP_process* target_process = processes[target];
376  BCP_buffer& target_buf = target_process->get_message_buffer();
377  target_buf.clear();
378  target_buf._sender = _my_id;
379  target_buf._msgtag = tag;
380  target_process->process_message();
381 }
382 
383 void
385  const BCP_message_tag tag,
386  const BCP_buffer& buf)
387 {
388  BCP_process* target_process = processes[target];
389  BCP_buffer& target_buf = target_process->get_message_buffer();
390  target_buf = buf;
391  target_buf._sender = _my_id;
392  target_buf._msgtag = tag;
393  target_process->process_message();
394 }
395 
396 //-----------------------------------------------------------------------------
397 
398 void
399 BCP_single_environment::multicast(int num, const int* targets,
400  const BCP_message_tag tag)
401 {
402  for (int i = 0; i < num; ++i) {
403  send(targets[i], tag);
404  }
405 }
406 
407 void
408 BCP_single_environment::multicast(int num, const int* targets,
409  const BCP_message_tag tag,
410  const BCP_buffer& buf)
411 {
412  for (int i = 0; i < num; ++i) {
413  send(targets[i], tag, buf);
414  }
415 }
416 
417 //-----------------------------------------------------------------------------
418 
419 void
421  const BCP_message_tag tag,
422  BCP_buffer& buf, const double timeout)
423 {
424  // In the single_environment this is not really needed. Report if it's
425  // called with anything but:
426  // BCP_UpperBound, BCP_Msg_DivingInfo or BCP_Msg_PricedRoot.
427  if (tag != BCP_Msg_UpperBound &&
428  tag != BCP_Msg_DivingInfo)
429  printf("BCP_single_environment::receive() is called with %i as tag.\n",
430  tag);
431 }
432 
433 //-----------------------------------------------------------------------------
434 
435 bool
437  const BCP_message_tag tag)
438 {
439  // In the single_environment this is not needed.
440  return false;
441 }
442 
443 //-----------------------------------------------------------------------------
444 // These should never be invoked in a BCP_single_environment
445 
446 int
448  const bool debug)
449 {
450  throw BCP_fatal_error("start_process() called!\n");
451  return 0; // to satisfy aCC on HP-UX
452 }
453 
454 int
456  const BCP_string& machine,
457  const bool debug)
458 {
459  throw BCP_fatal_error("start_process() called!\n");
460  return 0; // to satisfy aCC on HP-UX
461 }
462 
463 bool
465  const int proc_num,
466  const bool debug,
467  int* ids)
468 {
469  throw BCP_fatal_error("start_processes() called!\n");
470  return false; // to satisfy aCC on HP-UX
471 }
472 
473 bool
475  const int proc_num,
476  const BCP_vec<BCP_string>& machines,
477  const bool debug,
478  int* ids)
479 {
480  throw BCP_fatal_error("start_processes() called!\n");
481  return false; // to satisfy aCC on HP-UX
482 }
483 
484 //-----------------------------------------------------------------------------
485 
486 // void BCP_single_environment::stop_process(const int process) {
487 // check_error( pvm_kill(BCP_is_single_id(process, "stop_process()")),
488 // "stop_process()");
489 // }
490 
491 // void BCP_single_environment::stop_processes(const BCP_proc_array* processes){
492 // BCP_vec<int>::const_iterator first = processes.procs.begin();
493 // BCP_vec<int>::const_iterator last = pprocesses.procs.end();
494 // while (first != last)
495 // check_error( pvm_kill(BCP_is_single_id(*first, "stop_processes()")),
496 // "stop_processes()");
497 // ++first;
498 // }
499 // }
BCP_tree search_tree
Definition: BCP_tm.hpp:239
This class describes changes in the core of the problem.
BCP_buffer msg_buf
members to measure how long it took to process the root node.
Definition: BCP_tm.hpp:183
BCP_problem_core * BCP_tm_create_core(BCP_tm_prob &p)
BCP_message_tag
This enumerative constant describes the message tags different processes of BCP understand.
BCP_vg_user * user
The user object holding the user&#39;s data.
Definition: BCP_vg.hpp:49
BCP_parameter_set< BCP_lp_par > par
Definition: BCP_lp.hpp:145
void set_arguments(const int argnum, const char *const *args)
Parameters related to scheduling the LP processes.
BCP_parameter_set< BCP_vg_par > vg
Definition: BCP_tm.hpp:67
BCP_parameter_set< BCP_cg_par > cg
Definition: BCP_tm.hpp:65
int start_process(const BCP_string &exe, const bool debug)
Spawn a new process.
bool alive(const int pid)
Test if the process given by the argument is alive or not.
virtual OsiSolverInterface * initialize_solver_interface()
Create LP solver environment.
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...
Definition: BCP_tm_user.cpp:52
int parent_process()
Return the process id of the parent process (the process that spawned the currnet process...
Parameters related to scheduling the LP processes.
double start_time
Definition: BCP_tm.hpp:203
void insert(BCP_tm_node *node)
Return the worst true lower bound in the search tree.
bool start_processes(const BCP_string &exe, const int proc_num, const bool debug, int *ids)
Spawn proc_num processes, all with the same executable.
BCP_message_environment * msg_env
The message passing environment.
Definition: BCP_vg.hpp:57
double ub() const
Definition: BCP_tm.hpp:321
Indicates whether message passing is serial (all processes are on the same processor) or not...
int _sender
The process id of the sender of the last received message.
Definition: BCP_buffer.hpp:73
virtual BCP_user_pack * packer_init(BCP_user_class *p)
Definition: BCP_USER.hpp:225
BCP_vec< std::pair< int, int > > leaves_per_cp
Definition: BCP_tm.hpp:259
OsiSolverInterface * master_lp
A class that holds the methods about how to pack things.
Definition: BCP_lp.hpp:135
void BCP_lp_process_core(BCP_lp_prob &p, BCP_buffer &buf)
Definition: BCP_lp_main.cpp:28
Indicates whether message passing is serial (all processes are on the same processor) or not...
The number of Variable Generator processes that should be spawned.
This class is the central class of the Cut Generator process.
Definition: BCP_cg.hpp:32
CoinSearchTreeManager candidate_list
Definition: BCP_tm.hpp:243
NO OLD DOC.
Definition: BCP_lp.hpp:102
void unpack(BCP_buffer &buf)
Unpack the contents of the core description from the buffer.
BCP_problem_core * core
Definition: BCP_tm.hpp:208
BCP_vec< BCP_tm_node * > next_phase_nodes
a vector of nodes to be processed in the next phase
Definition: BCP_tm.hpp:250
void reserve(const size_t n)
Reallocate the object to make space for n entries.
Indicates whether message passing is serial (all processes are on the same processor) or not...
This class is a very simple impelementation of a constant length string.
Definition: BCP_string.hpp:13
void add_free_ids(int numIds, const int *ids)
Pass in a list of freeIds_ to add.
Definition: BCP_process.cpp:67
void setTmProblemPointer(BCP_tm_prob *ptr)
Set the pointer.
Definition: BCP_tm_user.hpp:69
TM sends diving information.
Indicates whether message passing is serial (all processes are on the same processor) or not...
Parameters related to scheduling the LP processes.
void multicast(int num, const int *targets, const BCP_message_tag tag)
Send an empty message (message tag only) to all the processes in the process array.
void push_back(const_reference x)
Append x to the end of the vector.
virtual void process_message()=0
bool probe(const int source, const BCP_message_tag tag)
Probe if there are any messages from the given process with the given message tag.
double upper_bound
Definition: BCP_lp.hpp:222
void setVgProblemPointer(BCP_vg_prob *ptr)
Set the pointer.
Definition: BCP_vg_user.hpp:62
void BCP_tm_parse_command_line(BCP_tm_prob &p, const int argnum, const char *const *arglist)
#define BCP_DBL_MAX
Definition: BCP_math.hpp:6
int numNodeIds() const
Return the number of busy LP processes.
Definition: BCP_process.hpp:95
void receive(const int source, const BCP_message_tag tag, BCP_buffer &buf, const double timeout)
Blocking receive with timeout.
BCP_node_start_result BCP_tm_start_new_nodes(BCP_tm_prob &p)
void BCP_tm_tasks_before_new_phase(BCP_tm_prob &p)
BCP_lp_user * user
A class that holds the methods about how to pack things.
Definition: BCP_lp.hpp:131
The number of Cut Generator processes that should be spawned.
This class is an abstract base class for the initializer class the user has to provide.
Definition: BCP_USER.hpp:160
static std::map< int, BCP_process * > processes
BCP_vec< std::pair< int, int > > leaves_per_vp
Definition: BCP_tm.hpp:261
void set_entry(const chr_params key, const char val)
void pack(BCP_buffer &buf) const
Pack the contents of the core description into the buffer.
BCP_user_class * user_class
A pointer ot the usr class of the process from which the methods of this class are invoked from...
Definition: BCP_USER.hpp:55
NO OLD DOC.
Definition: BCP_tm.hpp:136
virtual void unpack_module_data(BCP_buffer &buf)
Unpack the initial information sent to the LP process by the Tree Manager.
virtual BCP_buffer & get_message_buffer()=0
void setLpProblemPointer(BCP_lp_prob *ptr)
Set the pointer.
Definition: BCP_lp_user.hpp:93
BCP_parameter_set< BCP_tm_par > par
Definition: BCP_tm.hpp:168
void clear()
Completely clear the buffer.
Definition: BCP_buffer.hpp:168
virtual BCP_vg_user * vg_init(BCP_vg_prob &p)
Definition: BCP_USER.hpp:205
void BCP_sanity_checks(BCP_tm_prob &p)
BCP_parameter_set< BCP_vg_par > par
The parameters controlling the Variable Generator process.
Definition: BCP_vg.hpp:63
void BCP_tm_wrapup(BCP_tm_prob *tm, BCP_lp_prob *lp, BCP_cg_prob *cg, BCP_vg_prob *vg, bool final_stat)
BCP_problem_core * core
The description of the core of the problem.
Definition: BCP_vg.hpp:66
Currently there isn&#39;t any error handling in BCP.
Definition: BCP_error.hpp:20
BCP_message_environment * msg_env
A class that holds the methods about how to pack things.
Definition: BCP_tm.hpp:156
virtual BCP_cg_user * cg_init(BCP_cg_prob &p)
Definition: BCP_USER.hpp:210
BCP_user_pack * packer
A class that holds the methods about how to pack things.
Definition: BCP_tm.hpp:153
virtual BCP_tm_user * tm_init(BCP_tm_prob &p, const int argnum, const char *const *arglist)
Definition: BCP_USER.hpp:187
size_t size() const
Return the current number of entries.
Definition: BCP_vector.hpp:116
std::vector< int > lp_procs
members to measure how long it took to process the root node.
Definition: BCP_tm.hpp:186
int register_process(USER_initialize *user_init)
A process can register (receive its process id) with the message passing environment.
This class describes the message buffer used for all processes of BCP.
Definition: BCP_buffer.hpp:39
virtual BCP_lp_user * lp_init(BCP_lp_prob &p)
Definition: BCP_USER.hpp:200
void unchecked_push_back(const_reference x)
Append x to the end of the vector.
BCP_scheduler lp_scheduler
members to measure how long it took to process the root node.
Definition: BCP_tm.hpp:188
BCP_parameter_set< BCP_lp_par > lp
Definition: BCP_tm.hpp:61
BCP_tm_user * user
A class that holds the methods about how to pack things.
Definition: BCP_tm.hpp:151
BCP_problem_core_change * core_as_change
Definition: BCP_tm.hpp:210
The number of Variable Pool processes that should be spawned.
BCP_slave_params slave_pars
Definition: BCP_tm.hpp:170
BCP_message_environment * msg_env
A class that holds the methods about how to pack things.
Definition: BCP_lp.hpp:139
BCP_user_pack * packer
A class that holds the methods about how to pack things.
Definition: BCP_vg.hpp:52
BCP_tm_node * BCP_tm_create_root(BCP_tm_prob &p)
Any process to TM or TM to any process: a new upper bound found.
This class is the central class of the Variable Generator process.
Definition: BCP_vg.hpp:32
Max how many SB nodes should the scheduler give to an LP process.
void setCgProblemPointer(BCP_cg_prob *ptr)
Set the pointer.
Definition: BCP_cg_user.hpp:61
char param(BCP_tm_par::chr_params key) const
Definition: BCP_tm.hpp:298
BCP_message_tag _msgtag
The message tag of the last received message.
Definition: BCP_buffer.hpp:70
The number of Cut Pool processes that should be spawned.
virtual void unpack_module_data(BCP_buffer &buf)
Unpack the initial information sent to the Variable Generator process by the Tree Manager...
Definition: BCP_vg_user.cpp:72
void send(const int target, const BCP_message_tag tag)
Send an empty message (message tag only) to the process given by the frist argument.
BCP_user_pack * packer
A class that holds the methods about how to pack things.
Definition: BCP_lp.hpp:133