Scippy

UG

Ubiquity Generator framework

BbParaSolverStateTh Class Reference

class BbParaSolverStateTh (ParaSolver state object for notification message by thread communication) More...

#include <bbParaSolverStateTh.h>

+ Inheritance diagram for BbParaSolverStateTh:

Public Member Functions

 BbParaSolverStateTh ()
 default constructor More...
 
 BbParaSolverStateTh (int inRacingStage, unsigned int inNotificationId, int inLcId, int inGlobalSubtreeId, long long inNodesSolved, int inNodesLeft, double inBestDualBoundValue, double inGlobalBestPrimalBoundValue, double inDetTime, double inAverageDualBoundGain)
 constructor More...
 
 ~BbParaSolverStateTh ()
 destractor More...
 
void send (ParaComm *comm, int destination, int tag)
 send this object More...
 
void receive (ParaComm *comm, int source, int tag)
 receive this object More...
 
- Public Member Functions inherited from BbParaSolverState
 BbParaSolverState ()
 default constructor More...
 
 BbParaSolverState (int inRacingStage, unsigned int inNotificationId, int inLcId, int inGlobalSubtreeId, long long inNodesSolved, int inNodesLeft, double inBestDualBoundValue, double inGlobalBestPrimalBoundValue, double inDetTime, double inAverageDualBoundGain)
 constructor More...
 
virtual ~BbParaSolverState ()
 destractor More...
 
bool isRacingStage ()
 getter of isRacingStage More...
 
unsigned int getNotificaionId ()
 getter of notification id More...
 
int getLcId ()
 getter of LoadCoordintor id More...
 
int getGlobalSubtreeId ()
 getter of global subtree id More...
 
double getSolverLocalBestDualBoundValue ()
 gettter of best dual bound value More...
 
double getGlobalBestPrimalBoundValue ()
 get global best primal bound value that the notification Solver has More...
 
long long getNNodesSolved ()
 getter of number of nodes solved by the notification Solver More...
 
int getNNodesLeft ()
 getter of number of nodes left by the notification Solver More...
 
double getDeterministicTime ()
 getter of deterministic time More...
 
double getAverageDualBoundGain ()
 getter of average dual bound gain received More...
 
std::string toString ()
 stringfy BbParaSolverState More...
 
- Public Member Functions inherited from ParaSolverState
 ParaSolverState ()
 default constructor More...
 
 ParaSolverState (const ParaSolverState &paraSolverState)
 copy constructor More...
 
 ParaSolverState (int inRacingStage, unsigned int inNotificationId, int inLcId, int inGlobalSubtreeIdInLc, double inDetTime)
 constructor More...
 
virtual ~ParaSolverState ()
 destractor More...
 
bool isRacingStage ()
 getter of isRacingStage More...
 
unsigned int getNotificaionId ()
 getter of notification id More...
 
int getLcId ()
 getter of LoadCoordintor id More...
 
int getGlobalSubtreeId ()
 getter of global subtree id More...
 
double getDeterministicTime ()
 getter of deterministic time More...
 

Private Member Functions

BbParaSolverStateThcreateDatatype ()
 create BbParaSolverStateTh datatype More...
 

Additional Inherited Members

- Protected Attributes inherited from BbParaSolverState
long long nNodesSolved
 number of nodes solved More...
 
int nNodesLeft
 number of remaining nodes More...
 
double bestDualBoundValue
 best dual bound value in that of remaining nodes More...
 
double globalBestPrimalBoundValue
 global best primal bound value More...
 
double averageDualBoundGain
 average dual bound gain received More...
 
- Protected Attributes inherited from ParaSolverState
int racingStage
 if this value is 1, solver is in racing stage More...
 
unsigned int notificationId
 id for this notification More...
 
int lcId
 lc id of current ParaTask More...
 
int globalSubtreeIdInLc
 global subtree id of current ParaTask More...
 
double detTime
 deterministic time, -1: should be non-deterministic More...
 

Detailed Description

class BbParaSolverStateTh (ParaSolver state object for notification message by thread communication)

Definition at line 49 of file bbParaSolverStateTh.h.

Constructor & Destructor Documentation

◆ BbParaSolverStateTh() [1/2]

default constructor

Definition at line 63 of file bbParaSolverStateTh.h.

Referenced by BbParaSolverStateTh::createDatatype().

◆ BbParaSolverStateTh() [2/2]

BbParaSolverStateTh ( int  inRacingStage,
unsigned int  inNotificationId,
int  inLcId,
int  inGlobalSubtreeId,
long long  inNodesSolved,
int  inNodesLeft,
double  inBestDualBoundValue,
double  inGlobalBestPrimalBoundValue,
double  inDetTime,
double  inAverageDualBoundGain 
)

constructor

Parameters
inRacingStageindicate if Solver is in racing stage or not
inNotificationIdid for this notification
inLcIdlc id of current ParaNode
inGlobalSubtreeIdglobal subtree id of current ParaNode
inNodesSolvednumber of nodes solved
inNodesLeftnumber of remaining nodes
inBestDualBoundValuebest dual bound value in that of remaining nodes
inGlobalBestPrimalBoundValueglobal best primal bound value
inDetTimedeterministic time, -1: should be non-deterministic
inAverageDualBoundGainaverage dual bound gain received

Definition at line 71 of file bbParaSolverStateTh.h.

◆ ~BbParaSolverStateTh()

destractor

Definition at line 91 of file bbParaSolverStateTh.h.

References comm, BbParaSolverStateTh::receive(), and BbParaSolverStateTh::send().

Member Function Documentation

◆ createDatatype()

◆ receive()

◆ send()

void send ( ParaComm comm,
int  destination,
int  tag 
)
virtual

send this object

Returns
always 0 (for future extensions)
Parameters
commcommunicator used
destinationdestination rank
tagTagSolverState

Implements ParaSolverState.

Definition at line 60 of file bbParaSolverStateTh.cpp.

References BbParaSolverState::bestDualBoundValue, BbParaSolverStateTh::createDatatype(), DEF_PARA_COMM, BbParaSolverState::nNodesLeft, PARA_COMM_CALL, and UG::ParaSolverStateType.

Referenced by BbParaSolverStateTh::~BbParaSolverStateTh().