Bcp 1.4.4
|
#include <BCP_process.hpp>
Public Member Functions | |
BCP_scheduler () | |
Default constructor. | |
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. | |
void | add_free_ids (int numIds, const int *ids) |
Pass in a list of freeIds_ to add. | |
int | request_sb_ids (int numIds, int *ids) |
Request for a number of id's to do some strong branching. | |
void | release_sb_id (int id) |
Gives back to scheduler an id used for strong branching. | |
int | request_node_id () |
Request an id for processing nodes. | |
void | release_node_id (int id) |
Give back an id to scheduler used for processing a node. | |
bool | has_free_node_id () const |
Decide if there is an id that can be returned for processin a node. | |
int | numNodeIds () const |
Return the number of busy LP processes. | |
int | maxNodeIds () const |
Return the maximum possible number of busy LP processes. | |
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. | |
void | update_idle_times () |
Update idle times with the last idle time. | |
Definition at line 49 of file BCP_process.hpp.
BCP_scheduler::BCP_scheduler | ( | ) |
Default constructor.
void BCP_scheduler::setParams | ( | double | OverEstimationStatic, |
double | SwitchToRateThreshold, | ||
double | TimeRootNodeSolve, | ||
double | FactorTimeHorizon, | ||
double | OverEstimationRate, | ||
double | MaxNodeIdRatio, | ||
int | MaxNodeIdNum, | ||
int | MaxSbIdNum, | ||
int | MinSbIdNum ) |
Method for setting scheduler parameters.
OverEstimationStatic | Factor for providing more IDs in static strategy. |
SwitchToRateThreshold | When more than SwitchToRateThreshold times the number of strong-branching CPUs are busy, which to rate-based strategy. |
TimeRootNodeSolve | Time to solve root node NLP (in secs) |
FactorTimeHorizon | This number times TimeRootNodeSolve is used to compute the rates |
OverEstimationRate | Factor for providing more IDs in rate-based strategy. |
MaxNodeIdRatio | At most this fraction of the total number of ids can be used as a nodeid. |
MaxNodeIdNum | At most this many ids can be used as a nodeid. |
void BCP_scheduler::add_free_ids | ( | int | numIds, |
const int * | ids ) |
Pass in a list of freeIds_ to add.
int BCP_scheduler::request_sb_ids | ( | int | numIds, |
int * | ids ) |
Request for a number of id's to do some strong branching.
NOTE: ids must be already allocated to be at least numIds
size.
numIds | : number of ids requested |
ids | : filled vector with the number of ids served. |
void BCP_scheduler::release_sb_id | ( | int | id | ) |
Gives back to scheduler an id used for strong branching.
int BCP_scheduler::request_node_id | ( | ) |
Request an id for processing nodes.
void BCP_scheduler::release_node_id | ( | int | id | ) |
Give back an id to scheduler used for processing a node.
|
inline |
Decide if there is an id that can be returned for processin a node.
Definition at line 91 of file BCP_process.hpp.
|
inline |
Return the number of busy LP processes.
Definition at line 95 of file BCP_process.hpp.
|
inline |
Return the maximum possible number of busy LP processes.
Definition at line 99 of file BCP_process.hpp.
|
inline |
Return how much time did process p spent idling as a node process.
Definition at line 103 of file BCP_process.hpp.
|
inline |
Return how much time did process p spent idling as a SB process.
Definition at line 107 of file BCP_process.hpp.
void BCP_scheduler::update_idle_times | ( | ) |
Update idle times with the last idle time.