10 #define TMDBG printf("TMDBG: %s:%i\n", __FILE__, __LINE__)
11 #define LPDBG printf("LPDBG: %s:%i\n", __FILE__, __LINE__)
47 #include "CoinHelperFunctions.hpp"
63 void setParams(
double OverEstimationStatic,
64 double SwitchToRateThreshold,
65 double TimeRootNodeSolve,
66 double FactorTimeHorizon,
67 double OverEstimationRate,
68 double MaxNodeIdRatio,
bool static_
flag indicating whether we are in the static or the rate-based phase
int maxSbIds_
Upper threshold for IDs returned at a request.
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.
int get_process_id() const
int maxNodeIdNum_
At most this many ids can be used as a nodeid.
int numNodeIds_
number of lp ids served.
std::map< int, double > sb_idle_time_
the SB idle time for each process
int maxNodeIds() const
Return the maximum possible number of busy LP processes.
std::map< int, double > node_idle_time_
the node idle time for each process
void update_idle_times()
Update idle times with the last idle time.
bool has_free_node_id() const
Decide if there is an id that can be returned for processin a node.
double maxNodeIdRatio_
At most this fraction of the total number of ids can be used as a nodeid.
int request_counts_tot_
total number of requests in considered time interval
int numSecRateInterval_
Number of seconds in time horizon for rate computation.
std::map< int, double > last_release_time_
when was the process release last time
void add_free_ids(int numIds, const int *ids)
Pass in a list of freeIds_ to add.
virtual void process_message()=0
int minSbIds_
Lower threshold for IDs returned at a request.
int request_sb_ids(int numIds, int *ids)
Request for a number of id's to do some strong branching.
int numNodeIds() const
Return the number of busy LP processes.
time_t time_last_action_
Time stamp of last request or release.
double rho_static_
overestimation factor for static strategy
int counts_ptr_
Array counter.
int request_node_id()
Request an id for processing nodes.
BCP_scheduler()
Default constructor.
BCP_process(int self, int my_parent)
virtual BCP_buffer & get_message_buffer()=0
int max_id_allocation(int numIds)
Compute max allowed allocation of CPUs.
void release_sb_id(int id)
Gives back to scheduler an id used for strong branching.
std::vector< int > freeIds_
List of free CPUs ids.
std::map< int, double > last_release_type_
the type of the last release (0: algo start, 1: from SB, 2: from node
double switch_thresh_
percentage threshold to swtich to rate-based strategy
int release_counts_tot_
total number of releases in considered time interval
This class describes the message buffer used for all processes of BCP.
int totalNumberIds_
Store the total number of CPUs.
double rho_rate_
overestimation factor for rate-based strategy
int maxNodeIds_
The maximum number of lp ids that can be served.
bool have_rates_
flag indicating whether we have rate information (i.e., the time horizon has passed at least once) ...
void update_rates(int add_req, int add_rel)
Update the counts and the static_ flag.
std::vector< int > release_counts_
vector for counting released sb id requests per time unit
void release_node_id(int id)
Give back an id to scheduler used for processing a node.
double node_idle(int p)
Return how much time did process p spent idling as a node process.
double sb_idle(int p)
Return how much time did process p spent idling as a SB process.
std::vector< int > request_counts_
vector for counting id requests per time unit