10 #define TMDBG printf("TMDBG: %s:%i\n", __FILE__, __LINE__) 11 #define LPDBG printf("LPDBG: %s:%i\n", __FILE__, __LINE__) 21 BCP_process(
int self,
int my_parent) : me(self), parent(my_parent) {}
47 #include "CoinHelperFunctions.hpp" 63 void setParams(
double OverEstimationStatic,
64 double SwitchToRateThreshold,
65 double TimeRootNodeSolve,
66 double FactorTimeHorizon,
67 double OverEstimationRate,
68 double MaxNodeIdRatio,
92 return (!freeIds_.empty() && maxNodeIds_ > numNodeIds_);
104 return node_idle_time_[p];
108 return sb_idle_time_[p];
115 int max_id_allocation(
int numIds);
117 void update_rates(
int add_req,
int add_rel);
121 std::map<int, double> sb_idle_time_;
123 std::map<int, double> node_idle_time_;
125 std::map<int, double> last_release_type_;
127 std::map<int, double> last_release_time_;
131 std::vector<int> freeIds_;
139 double maxNodeIdRatio_;
153 double switch_thresh_;
155 int numSecRateInterval_;
157 std::vector<int> request_counts_;
159 int request_counts_tot_;
161 std::vector<int> release_counts_;
163 int release_counts_tot_;
167 time_t time_last_action_;
void update_idle_times()
Update idle times with the last idle time.
void release_sb_id(int id)
Gives back to scheduler an id used for strong branching.
int numNodeIds() const
Return the number of busy LP processes.
virtual void process_message()=0
double sb_idle(int p)
Return how much time did process p spent idling as a SB process.
void setParams(double OverEstimationStatic, double SwitchToRateThreshold, double TimeRootNodeSolve, double FactorTimeHorizon, double OverEstimationRate, double MaxNodeIdRatio, int MaxNodeIdNum, int MaxSbIdNum, int MinSbIdNum)
Method for setting scheduler parameters.
This class describes the message buffer used for all processes of BCP.
bool has_free_node_id() const
Decide if there is an id that can be returned for processin a node.
void release_node_id(int id)
Give back an id to scheduler used for processing a node.
virtual BCP_buffer & get_message_buffer()=0
double node_idle(int p)
Return how much time did process p spent idling as a node process.
int request_sb_ids(int numIds, int *ids)
Request for a number of id's to do some strong branching.
int request_node_id()
Request an id for processing nodes.
void add_free_ids(int numIds, const int *ids)
Pass in a list of freeIds_ to add.
int maxNodeIds() const
Return the maximum possible number of busy LP processes.
BCP_scheduler()
Default constructor.
int get_process_id() const
BCP_process(int self, int my_parent)