Scippy

UG

Ubiquity Generator framework

BbParaCalculationStateTh Class Reference

Calculation state object for thread communications. More...

#include <bbParaCalculationStateTh.h>

+ Inheritance diagram for BbParaCalculationStateTh:

Public Member Functions

 BbParaCalculationStateTh ()
 default constructor of this object More...
 
 BbParaCalculationStateTh (double inCompTime, double inRootTime, int inNSolved, int inNSent, int inNImprovedIncumbent, int inTerminationState, int inNSolvedWithNoPreprocesses, int inNSimplexIterRoot, double inAverageSimplexIter, int inNTransferredLocalCuts, int inMinTransferredLocalCuts, int inMaxTransferredLocalCuts, int inNTransferredBendersCuts, int inMinTransferredBendersCuts, int inMaxTransferredBendersCuts, int inNRestarts, double inMinIisum, double inMaxIisum, int inMinNii, int inMaxNii, double inDualBound, int inNSelfSplitNodesLeft)
 constructor of this object More...
 
 ~BbParaCalculationStateTh ()
 destructor of this object More...
 
void send (ParaComm *comm, int destination, int tag)
 send this object to destination More...
 
void receive (ParaComm *comm, int source, int tag)
 receive this object from source More...
 
- Public Member Functions inherited from BbParaCalculationState
 BbParaCalculationState ()
 Default Constructor. More...
 
 BbParaCalculationState (double inCompTime, double inRootTime, int inNSolved, int inNSent, int inNImprovedIncumbent, int inTerminationState, int inNSolvedWithNoPreprocesses, int inNSimplexIterRoot, double inAverageSimplexIter, int inNTransferredLocalCuts, int inMinTransferredLocalCuts, int inMaxTransferredLocalCuts, int inNTransferredBendersCuts, int inMinTransferredBendersCuts, int inMaxTransferredBendersCuts, int inNRestarts, double inMinIisum, double inMaxIisum, int inMinNii, int inMaxNii, double inDualBound, int inNSelfSplitNodesLeft)
 Constructor. More...
 
virtual ~BbParaCalculationState ()
 Destructor. More...
 
double getRootTime ()
 getter of root node computing time More...
 
int getNRestarts ()
 getter of the number of restart occurred in solving a subproblem More...
 
double getAverageNodeCompTimeExcpetRoot ()
 getter of average computing time of a node except root node More...
 
int getNSent ()
 getter of the number of nodes transferred from the subproblem solving More...
 
int getNImprovedIncumbent ()
 getter of the number of improved incumbents during solving the subproblem More...
 
int getTerminationState ()
 getter of the termination state for solving the subproblem More...
 
int getNSolvedWithNoPreprocesses ()
 getter of the number of solved nodes in the case that a node is solved without presolving. This is an experimental routine only used for SCIP parallelization More...
 
double getDualBoundValue ()
 getter of the final dual bound value More...
 
double getNSelfSplitNodesLeft ()
 getter of the number of self-split nodes left More...
 
std::string toString ()
 stringfy BbParaCalculationState More...
 
std::string toSimpleString ()
 stringfy BbParaCalculationState (simple string version) More...
 
- Public Member Functions inherited from ParaCalculationState
 ParaCalculationState ()
 Default Constructor. More...
 
 ParaCalculationState (double inCompTime, int inNSolved, int inTerminationState)
 Constructor. More...
 
virtual ~ParaCalculationState ()
 Destructor. More...
 
double getCompTime ()
 getter of computing time of a subproblem More...
 
int getNSolved ()
 geeter of the number of tasks solved in a subproblem More...
 
int getTerminationState ()
 getter of the termination state for solving the subproblem More...
 

Private Member Functions

BbParaCalculationStateThcreateDatatype ()
 create thread object datatype of this object More...
 

Additional Inherited Members

- Protected Attributes inherited from BbParaCalculationState
double rootTime
 computation time of the root node More...
 
int nSent
 the number of ParaNodes sent More...
 
int nImprovedIncumbent
 the number of improved solution generated in this ParaSolver More...
 
int nSolvedWithNoPreprocesses
 number of nodes solved when it is solved with no preprocesses More...
 
int nSimplexIterRoot
 number of simplex iteration at root node More...
 
double averageSimplexIter
 average number of simplex iteration except root node More...
 
int nTransferredLocalCuts
 number of local cuts transferred from a ParaNode More...
 
int minTransferredLocalCuts
 minimum number of local cuts transferred from a ParaNode More...
 
int maxTransferredLocalCuts
 maximum number of local cuts transferred from a ParaNode More...
 
int nTransferredBendersCuts
 number of benders cuts transferred from a ParaNode More...
 
int minTransferredBendersCuts
 minimum number of benders cuts transferred from a ParaNode More...
 
int maxTransferredBendersCuts
 maximum number of benders cuts transferred from a ParaNode More...
 
int nRestarts
 number of restarts More...
 
double minIisum
 minimum sum of integer infeasibility More...
 
double maxIisum
 maximum sum of integer infeasibility More...
 
int minNii
 minimum number of integer infeasibility More...
 
int maxNii
 maximum number of integer infeasibility More...
 
double dualBound
 final dual bound value More...
 
int nSelfSplitNodesLeft
 number of self-split nodes left More...
 
- Protected Attributes inherited from ParaCalculationState
double compTime
 computation time of this ParaTask More...
 
int nSolved
 the number of tasks solved More...
 
int terminationState
 indicate whether if this computation is terminationState or not. 0: no, 1: terminationState meaning can be defined in derived class More...
 

Detailed Description

Calculation state object for thread communications.

Definition at line 48 of file bbParaCalculationStateTh.h.

Constructor & Destructor Documentation

◆ BbParaCalculationStateTh() [1/2]

default constructor of this object

Definition at line 63 of file bbParaCalculationStateTh.h.

Referenced by BbParaCalculationStateTh::createDatatype().

◆ BbParaCalculationStateTh() [2/2]

BbParaCalculationStateTh ( double  inCompTime,
double  inRootTime,
int  inNSolved,
int  inNSent,
int  inNImprovedIncumbent,
int  inTerminationState,
int  inNSolvedWithNoPreprocesses,
int  inNSimplexIterRoot,
double  inAverageSimplexIter,
int  inNTransferredLocalCuts,
int  inMinTransferredLocalCuts,
int  inMaxTransferredLocalCuts,
int  inNTransferredBendersCuts,
int  inMinTransferredBendersCuts,
int  inMaxTransferredBendersCuts,
int  inNRestarts,
double  inMinIisum,
double  inMaxIisum,
int  inMinNii,
int  inMaxNii,
double  inDualBound,
int  inNSelfSplitNodesLeft 
)

constructor of this object

Parameters
inCompTimecomputation time of this ParaNode
inRootTimecomputation time of the root node
inNSolvedthe number of nodes solved
inNSentthe number of ParaNodes sent
inNImprovedIncumbentthe number of improved solution generated in this ParaSolver
inTerminationStateindicate whether if this computation is terminationState or not. 0: no, 1: terminationState
inNSolvedWithNoPreprocessesnumber of nodes solved when it is solved with no preprocesses
inNSimplexIterRootnumber of simplex iteration at root node
inAverageSimplexIteraverage number of simplex iteration except root node
inNTransferredLocalCutsnumber of local cuts transferred from a ParaNode
inMinTransferredLocalCutsminimum number of local cuts transferred from a ParaNode
inMaxTransferredLocalCutsmaximum number of local cuts transferred from a ParaNode
inNTransferredBendersCutsnumber of benders cuts transferred from a ParaNode
inMinTransferredBendersCutsminimum number of benders cuts transferred from a ParaNode
inMaxTransferredBendersCutsmaximum number of benders cuts transferred from a ParaNode
inNRestartsnumber of restarts
inMinIisumminimum sum of integer infeasibility
inMaxIisummaximum sum of integer infeasibility
inMinNiiminimum number of integer infeasibility
inMaxNiimaximum number of integer infeasibility
inDualBoundfinal dual Bound value
inNSelfSplitNodesLeftnumber of self-split nodes left

Definition at line 71 of file bbParaCalculationStateTh.h.

◆ ~BbParaCalculationStateTh()

destructor of this object

Definition at line 106 of file bbParaCalculationStateTh.h.

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

Member Function Documentation

◆ createDatatype()

◆ receive()

◆ send()

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

send this object to destination

Parameters
commcommunicator used to send this object
destinationdestination rank to send
tagtag to show this object

Implements ParaCalculationState.

Definition at line 72 of file bbParaCalculationStateTh.cpp.

References BbParaCalculationStateTh::createDatatype(), DEF_PARA_COMM, PARA_COMM_CALL, and UG::ParaCalculationStateType.

Referenced by BbParaCalculationStateTh::~BbParaCalculationStateTh().