22 #define BM_DISREGARD_SOS
133 (double)(listLength-chosenIndex)/(double)listLength;
229 CoinSearchTreeBase*& candidates);
237 bool write_file,
bool write_screen);
258 #include <OsiAuxInfo.hpp>
259 #include <OsiCuts.hpp>
260 #include "CglGomory.hpp"
261 #include "CglProbing.hpp"
262 #include "CglKnapsackCover.hpp"
263 #include "CglMixedIntegerRounding.hpp"
337 return (dynamic_cast<BM_node*>(
get_user_data()))->numNlpFailed_;
348 virtual OsiSolverInterface *
404 bool force_branch =
false);
417 OsiSolverInterface* solver,
421 OsiSolverInterface* solver,
422 const CoinWarmStart* cws,
424 const int* pids,
const int pidNum);
427 OsiSolverInterface* solver,
429 OsiBranchingObject*& branchObject);
431 OsiSolverInterface* solver,
433 OsiBranchingObject*& branchObject,
466 const char *
const * arglist);
BCP_object_origin
This enumerative constant describes the origin (originating process) of an object (variable or cut)...
BM_SB_result * bestSbResult_
A pointer to the entry that got selected.
virtual void display_feasible_solution(const BCP_solution *sol)
Print a feasible solution.
virtual void cuts_to_rows(const BCP_vec< BCP_var * > &vars, BCP_vec< BCP_cut * > &cuts, BCP_vec< BCP_row * > &rows, const BCP_lp_result &lpres, BCP_object_origin origin, bool allow_multiple)
Convert (and possibly lift) a set of cuts into corresponding rows for the current LP relaxation...
This class describes the core of the MIP problem, the variables/cuts in it as well as the matrix corr...
BCP_branching_decision bbBranch(OsiBranchingInformation &brInfo, BCP_vec< BCP_lp_branching_object * > &cands)
BCP_buffer & pack(const T &value)
Pack a single object of type T.
virtual void set_user_data_for_children(BCP_presolved_lp_brobj *best, const int selected)
For each child create a user data object and put it into the appropriate entry in best->user_data()...
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...
BCP_buffer & unpack(T &value)
Unpack a single object of type T.
This class chooses a variable to branch on.
virtual BCP_solution * test_feasibility(const BCP_lp_result &lp_result, const BCP_vec< BCP_var * > &vars, const BCP_vec< BCP_cut * > &cuts)
Evaluate and return MIP feasibility of the current solution.
virtual void process_message(BCP_buffer &buf)
Process a message that has been sent by another process' user part to this process' user part...
virtual void load_problem(OsiSolverInterface &osi, BCP_problem_core *core, BCP_var_set &vars, BCP_cut_set &cuts)
Load the problem specified by core, vars, and cuts into the solver interface.
void updateStrongBrachingInfo(int chosenIndex, int listLength)
void pack_pseudo_costs(BCP_buffer &buf)
int branchEval
0: Not done 1: Only down 2: only up 3: both ways
This is the class from which the user should derive her own algorithmic cuts.
BCP_process_t
This enumerative constant describes the various process types.
void write_AMPL_solution(const BCP_solution *sol, bool write_file, bool write_screen)
auxilliary method for handling output for AMPL
void collect_branch_data(OsiBranchingInformation &branchInfo, OsiSolverInterface *solver, const int branchNum, BM_BranchData *branchData)
virtual BCP_tm_user * tm_init(BCP_tm_prob &p, const int argnum, const char *const *arglist)
int process_SB_results(OsiBranchingInformation &branchInfo, OsiSolverInterface *solver, Bonmin::BonChooseVariable *choose, OsiBranchingObject *&branchObject)
double node_start_time
The time when we started to process the node.
BCP_string nl_file_content
This class is just a collection of pointers to cuts with a number of methods to manipulate these cuts...
void do_distributed_SB(OsiBranchingInformation &branchInfo, OsiSolverInterface *solver, const CoinWarmStart *cws, const int branchNum, const int *pids, const int pidNum)
This class is a very simple impelementation of a constant length string.
BCP_branching_decision hybridBranch()
The BCP_lp_user class is the base class from which the user can derive a problem specific class to be...
BM_stats bm_stats
Class for collecting statistics.
virtual void modify_lp_parameters(OsiSolverInterface *lp, bool in_strong_branching)
void unpack_pseudo_costs(BCP_buffer &buf)
int numNlpFailed_
A counter for how many times in a row did the NLP code fail.
virtual OsiSolverInterface * initialize_solver_interface()
Create LP solver environment.
Bonmin::BonminAmplSetup bonmin_
This contains the setup for running Bonmin in particular nlp solver, continuous solver, cut generators,...
virtual BCP_lp_user * lp_init(BCP_lp_prob &p)
double sumStrongBranchingListPositions_
Sum of all relative list positions.
virtual void process_message(BCP_buffer &buf)
Process a message that has been sent by another process' user part to this process' user part...
int * infInd_
Every time when branching decisions are to be made, we create 6 arrays, 3 for those objects that are ...
int numNlpFailed_
A counter for how many times in a row did the NLP code fail.
void pack(BCP_buffer &buf) const
BCP_solution * test_feasibility_hybrid(const BCP_lp_result &lp_result, const BCP_vec< BCP_var * > &vars, const BCP_vec< BCP_cut * > &cuts)
BCP_user_data * get_user_data()
Return a pointer to the BCP_user_data structure the user (may have) stored in this node...
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
This class is an abstract base class for the initializer class the user has to provide.
virtual BCP_user_pack * packer_init(BCP_user_class *p)
virtual ~BM_tm()
Default destructor.
int numberSbSolves_
Total number of NLP solves for strong-branching.
void fint fint fint * phase
virtual void initialize_new_search_tree_node(const BCP_vec< BCP_var * > &vars, const BCP_vec< BCP_cut * > &cuts, const BCP_vec< BCP_obj_status > &vs, const BCP_vec< BCP_obj_status > &cs, BCP_vec< int > &var_changed_pos, BCP_vec< double > &var_new_bd, BCP_vec< int > &cut_changed_pos, BCP_vec< double > &cut_new_bd)
Initializing a new search tree node.
BM_tm()
Default constructor.
BCP_string ipopt_file_content
virtual void init_new_phase(int phase, BCP_column_generation &colgen, CoinSearchTreeBase *&candidates)
Do whatever initialization is necessary before the phase-th phase.
virtual BCP_branching_decision select_branching_candidates(const BCP_lp_result &lpres, const BCP_vec< BCP_var * > &vars, const BCP_vec< BCP_cut * > &cuts, const BCP_lp_var_pool &local_var_pool, const BCP_lp_cut_pool &local_cut_pool, BCP_vec< BCP_lp_branching_object * > &cans, bool force_branch=false)
Decide whether to branch or not and select a set of branching candidates if branching is decided upon...
BCP_branching_decision
This enumerative constant is the return value of the select_branching_candidates() method in [BCP_lp_...
virtual void pack_user_data(const BCP_user_data *ud, BCP_buffer &buf)
Pack an user data.
void send_pseudo_cost_update(OsiBranchingInformation &branchInfo)
Methods invoked from bbBranch()
int * objInd_
These are the indices of the integral (i.e., things that can be branched on) objects in the solver...
virtual BCP_cut_algo * unpack_cut_algo(BCP_buffer &buf)
Unpack an algorithmic cut.
int numberFixed_
Total number of times variables were fixed due to strong branching.
virtual void display_final_information(const BCP_lp_statistics &lp_stat)
Output the final solution.
A presolved branching object candidate.
BCP_string ipopt_file_content
virtual void generate_cuts_in_lp(const BCP_lp_result &lpres, const BCP_vec< BCP_var * > &vars, const BCP_vec< BCP_cut * > &cuts, BCP_vec< BCP_cut * > &new_cuts, BCP_vec< BCP_row * > &new_rows)
Generate cuts within the LP process.
void incNumberSbSolves(int cnt)
This class is just a collection of pointers to variables with a number of methods to manipulate these...
int try_to_branch(OsiBranchingInformation &branchInfo, OsiSolverInterface *solver, Bonmin::BonChooseVariable *choose, OsiBranchingObject *&branchObject, bool allowVarFix)
BCP_parameter_set< BM_par > par
This class describes the message buffer used for all processes of BCP.
BCP_parameter_set< BM_par > par
virtual BCP_user_data * unpack_user_data(BCP_buffer &buf)
Unpack an user data.
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_solution * test_feasibility_BB(const BCP_lp_result &lp_result, const BCP_vec< BCP_var * > &vars)
int sumStrongBranchingListIndices_
Sum of all list indices.
BCP_column_generation
This enumerative constant describes what to do when a search tree node becomes fathomable for the cur...
BM_SB_result * sbResult_
This is where we keep the results in case of distributed strong branching.
void incNumberNodeSolves()
The BCP_tm_user class is the base class from which the user can derive a problem specific class to be...
void receive_pseudo_cost_update(BCP_buffer &buf)
This class holds the results after solving an LP relaxation.
virtual double compute_lower_bound(const double old_lower_bound, const BCP_lp_result &lpres, const BCP_vec< BCP_var * > &vars, const BCP_vec< BCP_cut * > &cuts)
Compute a true lower bound for the subproblem.
bool isBranchFathomable(int status, double obj)
int numberNodeSolves_
Total number of NLP solves as node solves.
int sort_objects(OsiBranchingInformation &branchInfo, Bonmin::BonChooseVariable *choose, int &branchNum)
An object of type BCP_lp_relax holds the description of an lp relaxation.
OsiPseudoCosts pseudoCosts_
virtual void unpack_module_data(BCP_buffer &buf)
Unpack the initial information sent to the LP process by the Tree Manager.
virtual void initialize_core(BCP_vec< BCP_var_core * > &vars, BCP_vec< BCP_cut_core * > &cuts, BCP_lp_relax *&matrix)
Pass the core constraints and core variables to bcp.
This is the abstract base class for a solution to a Mixed Integer Programming problem.
BCP_string nl_file_content
int numberStrongBranching_
Total number of times this node did strong branching.