Bcp 1.4.4
Loading...
Searching...
No Matches
BCP_scheduler Class Reference

#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.
 

Detailed Description

Definition at line 49 of file BCP_process.hpp.

Constructor & Destructor Documentation

◆ BCP_scheduler()

BCP_scheduler::BCP_scheduler ( )

Default constructor.

Member Function Documentation

◆ setParams()

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.

Parameters
OverEstimationStaticFactor for providing more IDs in static strategy.
SwitchToRateThresholdWhen more than SwitchToRateThreshold times the number of strong-branching CPUs are busy, which to rate-based strategy.
TimeRootNodeSolveTime to solve root node NLP (in secs)
FactorTimeHorizonThis number times TimeRootNodeSolve is used to compute the rates
OverEstimationRateFactor for providing more IDs in rate-based strategy.
MaxNodeIdRatioAt most this fraction of the total number of ids can be used as a nodeid.
MaxNodeIdNumAt most this many ids can be used as a nodeid.

◆ add_free_ids()

void BCP_scheduler::add_free_ids ( int numIds,
const int * ids )

Pass in a list of freeIds_ to add.

◆ request_sb_ids()

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.

Parameters
numIds: number of ids requested
ids: filled vector with the number of ids served.
Returns
number of ids served.

◆ release_sb_id()

void BCP_scheduler::release_sb_id ( int id)

Gives back to scheduler an id used for strong branching.

◆ request_node_id()

int BCP_scheduler::request_node_id ( )

Request an id for processing nodes.

Returns
id number or -1 if none is available.

◆ release_node_id()

void BCP_scheduler::release_node_id ( int id)

Give back an id to scheduler used for processing a node.

◆ has_free_node_id()

bool BCP_scheduler::has_free_node_id ( ) const
inline

Decide if there is an id that can be returned for processin a node.

Definition at line 91 of file BCP_process.hpp.

◆ numNodeIds()

int BCP_scheduler::numNodeIds ( ) const
inline

Return the number of busy LP processes.

Definition at line 95 of file BCP_process.hpp.

◆ maxNodeIds()

int BCP_scheduler::maxNodeIds ( ) const
inline

Return the maximum possible number of busy LP processes.

Definition at line 99 of file BCP_process.hpp.

◆ node_idle()

double BCP_scheduler::node_idle ( int p)
inline

Return how much time did process p spent idling as a node process.

Definition at line 103 of file BCP_process.hpp.

◆ sb_idle()

double BCP_scheduler::sb_idle ( int p)
inline

Return how much time did process p spent idling as a SB process.

Definition at line 107 of file BCP_process.hpp.

◆ update_idle_times()

void BCP_scheduler::update_idle_times ( )

Update idle times with the last idle time.


The documentation for this class was generated from the following file: