46 printf(
" Core Vars (bvarnum %i)\n", bvarnum);
47 for (
int i = 0; i < bvarnum; ++i) {
48 printf(
" var %4i: bcpind %i, status %i, lb %f, ub %f\n",
49 i, vars[i]->bcpind(), vars[i]->status(),
50 vars[i]->lb(), vars[i]->ub());
56 printf(
" Core Cuts (bcutnum %i)\n", bcutnum);
57 for (
int i = 0; i < bcutnum; ++i) {
58 printf(
" cut %4i: bcpind %i, status %i, lb %f, ub %f\n",
59 i, cuts[i]->bcpind(), cuts[i]->status(),
60 cuts[i]->lb(), cuts[i]->ub());
84 if (exp_bc.pack_size() <= wrtparent_bc.
pack_size()){
85 if (exp_bc.pack_size() <= wrtcore_bc.
pack_size()){
119 printf(
" Extra Vars (extra varnum %i)\n", varnum - bvarnum);
120 for (
int i = bvarnum; i < varnum; ++i) {
121 printf(
" var %4i: bcpind %i, status %i, lb %f, ub %f\n",
122 i, vars[i]->bcpind(), vars[i]->status(),
123 vars[i]->lb(), vars[i]->ub());
137 if (new_added_num > 0) {
140 for (
int i = 0; i < new_added_num; ++i) {
142 const int bcpind = v->
bcpind();
161 int num = vars_to_tm.
size();
163 for (
int i = 0; i < num; ++i) {
164 assert(vars_to_tm[i]->bcpind() < 0);
166 vars_to_tm[i]->set_bcpind_flip();
185 const int old_added_num = old_added_bcpind.
size();
194 for (i = 0, j = 0; i < new_added_num && j < old_added_num; ++
j) {
195 const BCP_var*
const v = vars[i];
197 if (v->
bcpind() == old_added_bcpind[
j]) {
207 for ( ; j < old_added_num; ++
j) {
216 for ( ; i < new_added_num; ++i){
217 const int bcpind = vars[i]->
bcpind();
225 const int chnum = chpos.
size();
227 for (i = 0; i < chnum; ++i) {
228 const BCP_var*
const var = vars[chpos[i]];
263 printf(
" Extra Cuts (extra cutnum %i)\n", cutnum - bcutnum);
264 for (
int i = bcutnum; i < cutnum; ++i) {
265 printf(
" cut %4i: bcpind %i, status %i, lb %f, ub %f\n",
266 i, cuts[i]->bcpind(), cuts[i]->status(),
267 cuts[i]->lb(), cuts[i]->ub());
281 if (new_added_num > 0) {
284 for (
int i = 0; i < new_added_num; ++i) {
286 const int bcpind = c->
bcpind();
305 int num = cuts_to_tm.
size();
307 for (
int i = 0; i < num; ++i) {
308 assert(cuts_to_tm[i]->bcpind() < 0);
310 cuts_to_tm[i]->set_bcpind_flip();
329 const int old_added_num = old_added_bcpind.
size();
338 for (i = 0, j = 0; i < new_added_num && j < old_added_num; ++
j) {
341 if (c->
bcpind() == old_added_bcpind[
j]) {
351 for ( ; j < old_added_num; ++
j) {
360 for ( ; i < new_added_num; ++i){
361 const int bcpind = cuts[i]->
bcpind();
369 const int chnum = chpos.
size();
371 for (i = 0; i < chnum; ++i) {
372 const BCP_cut*
const cut = cuts[chpos[i]];
413 p.
lp_solver->getDblParam(OsiPrimalTolerance, petol);
414 p.
lp_solver->getDblParam(OsiDualTolerance, detol);
418 del_vars, del_cuts, petol, detol);
447 for (
int i = 0; i < child_num; ++i) {
461 for (
int i = 0; i < child_num; ++i) {
462 bool has_user_data = user_data[i] != 0;
463 buf.
pack(has_user_data);
474 for (
int i = child_num - 1; i >= 0; --i)
503 if (dumpcuts || dumpvars) {
504 printf(
"LP: FINISHED NODE %i DUMP START ===========================\n",
525 LP: there is ws info in BCP_lp_send_node_description()!\n");
528 CoinWarmStart*
ws = NULL;
533 if (node.
index == 0) {
559 if (dumpcuts || dumpvars) {
560 printf(
"LP: FINISHED NODE %i DUMP END ===========================\n",
int BCP_lp_send_node_description(BCP_lp_prob &p, BCP_presolved_lp_brobj *brobj, BCP_message_tag msgtag)
This class describes changes in the core of the problem.
BCP_message_tag
This enumerative constant describes the message tags different processes of BCP understand.
virtual void send(const int target, const BCP_message_tag tag)=0
Send an empty message (message tag only) to the process given by the frist argument.
BCP_warmstart * warmstart
this is always explicit, it's just that coding is simpler if we reuse the BCP_obj_set_change object ...
This child should be kept and dived into (provided diving is decided on.
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.
BCP_lp_node * node
Description he current search tree node.
Nonexistent diving status.
void BCP_lp_unpack_diving_info(BCP_lp_prob &p, BCP_buffer &buf)
The data stored is with respect to the original description of the base problem (as was given by the ...
BCP_lp_parent * parent
Description of the parent of the current node.
virtual void receive(const int source, const BCP_message_tag tag, BCP_buffer &buf, const double timeout)=0
Blocking receive with timeout.
void clear()
Delete every entry.
char param(BCP_lp_par::chr_params key) const
static void BCP_lp_pack_noncore_vars(BCP_lp_prob &p, BCP_vec< int > &deleted_pos)
Print out a message when the default version of an overridable method is executed.
Abstract base class that defines members common to all types of cuts.
BCP_node_storage_in_tm tm_storage
void pack(BCP_buffer &buf) const
Pack the core change into the buffer.
static int BCP_lp_pack_branching_info(BCP_lp_prob &p, BCP_presolved_lp_brobj *brobj)
static void BCP_lp_pack_core(BCP_lp_prob &p)
BCP_obj_set_change cut_set
this is always explicit, it's just that coding is simpler if we reuse the BCP_obj_set_change object ...
void pack(BCP_buffer &buf) const
iterator begin()
Return an iterator to the beginning of the object.
double ub() const
Return the upper bound on the cut.
BCP_warmstart * BCP_lp_convert_CoinWarmStart(BCP_lp_prob &p, CoinWarmStart *&ws)
void pack_var(const BCP_var &var)
void reserve(const size_t n)
Reallocate the object to make space for n entries.
Do not use any warmstart information.
TM sends diving information.
Warmstarting information for the LP solver.
void push_back(const_reference x)
Append x to the end of the vector.
This class is the internal representation of a branching object.
The data stored is an explicit listing of values.
size_t varnum() const
Return the number of variables in the core.
double lb() const
Return the lower bound on the cut.
Whether to send back the description of fathomed search tree nodes to the Tree Manager.
Specifies how warmstart information should be stored in the TM.
virtual void pack_warmstart(const BCP_warmstart *ws, BCP_buffer &buf, bool report_if_default=false)
Pack warmstarting information.
double ub() const
Return the upper bound.
BCP_vec< BCP_user_data * > & user_data()
Return a reference to the user data vector.
BCP_warmstart * warmstart
void keep_no_child()
Fill up obj with the lower bound on each child.
int pack_size() const
Return the buffer size needed to pack the data in the core change.
OsiSolverInterface * lp_solver
A class that holds the methods about how to pack things.
CoinWarmStart * warmstartRoot
Description of the warmstart info from the end of the root node.
int child_num
The number of children for this branching object.
size_t cutnum() const
Return the number of cuts in the core.
BCP_obj_set_change var_set
this is always explicit, it's just that coding is simpler if we reuse the BCP_obj_set_change object ...
The warmstart information at the end of the root.
Use the warmstart info from the end of the parent in the children.
BCP_obj_status status() const
Return the status of the cut.
The data stored is with respect to the same kind of data in the parent of the search tree node...
static void BCP_lp_pack_warmstart(BCP_lp_prob &p, BCP_vec< int > &del_vars, BCP_vec< int > &del_cuts)
BCP_problem_core_change core_as_change
this is always explicit, it's just that coding is simpler if we reuse the BCP_obj_set_change object ...
void clear()
Completely clear the buffer.
const BCP_lp_result & lpres(const int child_ind) const
Return a const reference to the presolved results of the child_ind-th child.
void fint fint fint real fint real real real real real real real real real fint real fint fint fint real * ws
In addition to the node description, branching information is sent as well so that the children of th...
Use the warmstart info from the end of the root in all search tree nodes.
void pack_cut(const BCP_cut &cut)
Abstract base class that defines members common to all types of variables.
virtual BCP_warmstart * as_change(const BCP_warmstart *const old_ws, const BCP_vec< int > &del_vars, const BCP_vec< int > &del_cuts, const double petol, const double detol) const =0
Return a pointer to a warmstart info describing the currently stored data as a change with respect to...
Currently there isn't any error handling in BCP.
BCP_storage_t core_change
A presolved branching object candidate.
int bcpind() const
Return the internal index of the variable.
size_t size() const
Return the current number of entries.
BCP_obj_status status() const
Return the status of the variable.
After branching all children must be returned to the Tree Manager and the LP process should wait for ...
This class describes the message buffer used for all processes of BCP.
void unchecked_push_back(const_reference x)
Append x to the end of the vector.
BCP_vec< int > _del_change_pos
void swap(BCP_problem_core_change &other)
Swap the contents of the current core change with that of other.
double lb() const
Return the lower bound.
BCP_vec< BCP_child_action > & action()
Return a reference to the actions to be taken.
void pack(BCP_buffer &buf) const
Pack the internal branching object into the buffer.
BCP_message_environment * msg_env
A class that holds the methods about how to pack things.
BCP_user_data * user_data
Data the user wants to pass along with the search tree node.
static void BCP_lp_pack_user_data(BCP_lp_prob &p)
static void BCP_lp_pack_noncore_cuts(BCP_lp_prob &p, BCP_vec< int > &deleted_pos)
iterator entry(const int i)
Return an iterator to the i-th entry.
BCP_problem_core_change * core_as_change
virtual void pack_user_data(const BCP_user_data *ud, BCP_buffer &buf)
Pack an user data.
BCP_vec< BCP_obj_change > _change
int bcpind() const
Return the internal index of the cut.
BCP_lp_branching_object * candidate()
Return a pointer to the candidate.
void append(const BCP_vec< T > &x)
Append the entries in x to the end of the vector.
BCP_user_pack * packer
A class that holds the methods about how to pack things.