UG

Ubiquity Generator framework

BbParaSolverState Class Reference

class BbParaSolverState (ParaSolver state object for notification message) More...

#include <bbParaSolverState.h>

Inheritance diagram for BbParaSolverState:
ParaSolverState BbParaSolverStateMpi BbParaSolverStateTh

Public Member Functions

 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 ()
 
virtual ~ParaSolverState ()
 
virtual bool isRacingStage ()=0
 getter of isRacingStage More...
 
virtual unsigned int getNotificaionId ()=0
 getter of notification id More...
 
virtual int getLcId ()=0
 getter of LoadCoordintor id More...
 
virtual int getGlobalSubtreeId ()=0
 getter of global subtree id More...
 
virtual double getDeterministicTime ()=0
 getter of deterministic time More...
 
virtual std::string toString ()=0
 stringfy ParaSolverState More...
 
virtual void send (ParaComm *comm, int destination, int tag)=0
 send this object More...
 
virtual void receive (ParaComm *comm, int source, int tag)=0
 receive this object More...
 

Protected Attributes

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 ParaNode More...
 
int globalSubtreeIdInLc
 global subtree id of current ParaNode More...
 
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 detTime
 deterministic time, -1: should be non-deterministic More...
 
double averageDualBoundGain
 average dual bound gain received More...
 

Detailed Description

class BbParaSolverState (ParaSolver state object for notification message)

Definition at line 51 of file bbParaSolverState.h.

Constructor & Destructor Documentation

◆ BbParaSolverState() [1/2]

default constructor

Definition at line 72 of file bbParaSolverState.h.

◆ BbParaSolverState() [2/2]

BbParaSolverState ( 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 91 of file bbParaSolverState.h.

◆ ~BbParaSolverState()

virtual ~BbParaSolverState ( )
virtual

destractor

Definition at line 120 of file bbParaSolverState.h.

Member Function Documentation

◆ getAverageDualBoundGain()

double getAverageDualBoundGain ( )

getter of average dual bound gain received

Returns
average dual bound gain

Definition at line 220 of file bbParaSolverState.h.

References BbParaSolverState::averageDualBoundGain.

Referenced by BbParaLoadCoordinator::processTagSolverState().

◆ getDeterministicTime()

double getDeterministicTime ( )
virtual

getter of deterministic time

Returns
deterministic time

Implements ParaSolverState.

Definition at line 210 of file bbParaSolverState.h.

References BbParaSolverState::detTime.

Referenced by BbParaLoadCoordinator::processRacingRampUpTagSolverState(), and BbParaLoadCoordinator::processTagSolverState().

◆ getGlobalBestPrimalBoundValue()

double getGlobalBestPrimalBoundValue ( )

get global best primal bound value that the notification Solver has

Returns
global best primal bound value

Definition at line 179 of file bbParaSolverState.h.

References BbParaSolverState::globalBestPrimalBoundValue.

Referenced by BbParaLoadCoordinator::processRacingRampUpTagSolverState(), and BbParaLoadCoordinator::processTagSolverState().

◆ getGlobalSubtreeId()

int getGlobalSubtreeId ( )
virtual

getter of global subtree id

Returns
global subtree id

Implements ParaSolverState.

Definition at line 159 of file bbParaSolverState.h.

References BbParaSolverState::globalSubtreeIdInLc.

◆ getLcId()

int getLcId ( )
virtual

getter of LoadCoordintor id

Returns
LoadCoordinator id

Implements ParaSolverState.

Definition at line 149 of file bbParaSolverState.h.

References BbParaSolverState::lcId.

◆ getNNodesLeft()

int getNNodesLeft ( )

getter of number of nodes left by the notification Solver

Returns
number of nodes left

Definition at line 200 of file bbParaSolverState.h.

References BbParaSolverState::nNodesLeft.

Referenced by BbParaLoadCoordinator::processRacingRampUpTagSolverState(), and BbParaLoadCoordinator::processTagSolverState().

◆ getNNodesSolved()

long long getNNodesSolved ( )

getter of number of nodes solved by the notification Solver

Returns
number of nodes solved

Definition at line 189 of file bbParaSolverState.h.

References BbParaSolverState::nNodesSolved.

Referenced by BbParaLoadCoordinator::processRacingRampUpTagSolverState(), and BbParaLoadCoordinator::processTagSolverState().

◆ getNotificaionId()

unsigned int getNotificaionId ( )
virtual

getter of notification id

Returns
notification id

Implements ParaSolverState.

Definition at line 139 of file bbParaSolverState.h.

References BbParaSolverState::notificationId.

Referenced by BbParaLoadCoordinator::processRacingRampUpTagSolverState(), and BbParaLoadCoordinator::processTagSolverState().

◆ getSolverLocalBestDualBoundValue()

double getSolverLocalBestDualBoundValue ( )

gettter of best dual bound value

Returns
best dual bound value

Definition at line 169 of file bbParaSolverState.h.

References BbParaSolverState::bestDualBoundValue.

Referenced by BbParaLoadCoordinator::processRacingRampUpTagSolverState(), and BbParaLoadCoordinator::processTagSolverState().

◆ isRacingStage()

bool isRacingStage ( )
virtual

getter of isRacingStage

Returns
true if the Solver notified this message is in racing stage, false otherwise

Implements ParaSolverState.

Definition at line 129 of file bbParaSolverState.h.

References BbParaSolverState::racingStage.

Referenced by BbParaLoadCoordinator::processRacingRampUpTagSolverState(), and BbParaLoadCoordinator::processTagSolverState().

◆ toString()

Member Data Documentation

◆ averageDualBoundGain

double averageDualBoundGain
protected

◆ bestDualBoundValue

◆ detTime

double detTime
protected

◆ globalBestPrimalBoundValue

double globalBestPrimalBoundValue
protected

◆ globalSubtreeIdInLc

int globalSubtreeIdInLc
protected

◆ lcId

◆ nNodesLeft

◆ nNodesSolved

◆ notificationId

◆ racingStage