20 const double lb = cut.
lb();
21 const double ub = cut.
ub();
41 BCP: saving root cuts does not work at the moment. Must collect cuts from \n\
42 the TMS processes before the root cuts could be saved. \n");
45 if (cutfile.
length() > 0 &&
55 for (
int i = 0; i < num; ++i) {
58 FILE*
f = fopen(cutfile.
c_str(),
"w");
59 size_t size = buf.
size();
60 if (fwrite(&size, 1,
sizeof(size), f) !=
sizeof(size))
62 if (fwrite(buf.
data(), 1, size,
f) != size)
82 const std::vector<int>& lps = tm->
lp_procs;
83 const int num_lp = lps.size();
88 for (i = 0; i < num_lp; ++i) {
105 for (i = 0; i < num_lp; ++i) {
106 printf(
"LP # %i : node idle: %12.6f SB idle: %12.6f\n",
BCP_buffer msg_buf
members to measure how long it took to process the root node.
BCP_message_tag
This enumerative constant describes the message tags different processes of BCP understand.
This class stores data about how an object set (set of vars or set of cuts) changes.
BCP_buffer & pack(const T &value)
Pack a single object of type T.
void print(bool final, double t)
Used to indicate that there is no message in the buffer of a process.
std::map< int, int > cuts_remote
virtual void receive(const int source, const BCP_message_tag tag, BCP_buffer &buf, const double timeout)=0
Blocking receive with timeout.
void add(const BCP_lp_statistics &stat)
Add the argument statistics to this one.
std::map< int, Coin::SmartPtr< BCP_cut > > cuts_local
The message contains the statistics the LP process collected.
Abstract base class that defines members common to all types of cuts.
virtual void display_final_information(const BCP_lp_statistics &lp_stat)
Display information after BCP finished processing the search tree.
const char * c_str() const
static void BCP_tm_pack_root_cut(BCP_tm_prob *tm, const BCP_cut &cut)
This class is the central class of the Cut Generator process.
double ub() const
Return the upper bound on the cut.
The name of the file where those cuts should be saved that were in the root node in the 0-th phase at...
This class is a very simple impelementation of a constant length string.
void fint fint fint real fint real real real real * f
BCP_obj_status
This enumerative constant gives the status of an object (variable or cut).
The data stored is an explicit listing of values.
double lb() const
Return the lower bound on the cut.
virtual void pack_cut_algo(const BCP_cut_algo *cut, BCP_buffer &buf)
Pack an algorithmic cut.
void fint fint fint real fint real real real real real real real real real fint real fint * lp
Coin::SmartPtr< BCP_node_change > _desc
BCP_lp_statistics * lp_stat
void unpack(BCP_buffer &buf)
BCP_obj_status status() const
Return the status of the cut.
virtual BCP_object_t obj_type() const =0
Return the type of the variable.
void clear()
Completely clear the buffer.
BCP_message_tag msgtag() const
Return the message tag of the message in the buffer.
void BCP_tm_wrapup(BCP_tm_prob *tm, BCP_lp_prob *lp, BCP_cg_prob *cg, BCP_vg_prob *vg, bool final_stat)
BCP_storage_t storage() const
Currently there isn't any error handling in BCP.
BCP_message_environment * msg_env
A class that holds the methods about how to pack things.
BCP_user_pack * packer
A class that holds the methods about how to pack things.
size_t size() const
Return the current number of entries.
std::vector< int > lp_procs
members to measure how long it took to process the root node.
This class describes the message buffer used for all processes of BCP.
void BCP_tm_save_root_cuts(BCP_tm_prob *tm)
BCP_scheduler lp_scheduler
members to measure how long it took to process the root node.
const char * data() const
Return a const pointer to the data stored in the buffer.
BCP_tm_user * user
A class that holds the methods about how to pack things.
virtual bool alive(const int pid)=0
Test if the process given by the argument is alive or not.
This class is the central class of the Variable Generator process.
BCP_object_t
This enumerative constant describes the possible types of objects (variables and cuts).
double node_idle(int p)
Return how much time did process p spent idling as a node process.
char param(BCP_tm_par::chr_params key) const
double sb_idle(int p)
Return how much time did process p spent idling as a SB process.
int size() const
Return the size of the current message in the buffer.