Scippy

UG

Ubiquity Generator framework

BbParaCalculationStateMpi Class Reference

Calculation state object for MPI communications. More...

#include <bbParaCalculationStateMpi.h>

Inheritance diagram for BbParaCalculationStateMpi:
BbParaCalculationState ParaCalculationState

Public Member Functions

 BbParaCalculationStateMpi ()
 default constructor of this object More...
 
 BbParaCalculationStateMpi (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...
 
 ~BbParaCalculationStateMpi ()
 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...
 
virtual std::string toString ()=0
 stringfy ParaCalculationState More...
 
virtual std::string toSimpleString ()=0
 stringfy ParaCalculationState (simple string version) More...
 
virtual void send (ParaComm *comm, int destination, int tag)=0
 send this object to destination More...
 
virtual void receive (ParaComm *comm, int source, int tag)=0
 send this object to destination More...
 

Private Member Functions

MPI_Datatype createDatatype ()
 create MPI 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 MPI communications.

Definition at line 50 of file bbParaCalculationStateMpi.h.

Constructor & Destructor Documentation

◆ BbParaCalculationStateMpi() [1/2]

default constructor of this object

Definition at line 65 of file bbParaCalculationStateMpi.h.

◆ BbParaCalculationStateMpi() [2/2]

BbParaCalculationStateMpi ( 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 73 of file bbParaCalculationStateMpi.h.

◆ ~BbParaCalculationStateMpi()

destructor of this object

Definition at line 108 of file bbParaCalculationStateMpi.h.

Member Function Documentation

◆ createDatatype()

◆ receive()

void receive ( ParaComm comm,
int  source,
int  tag 
)
virtual

receive this object from source

Parameters
commcommunicator used to receive this object
sourcesource rank to receive this object
tagtag to show this object

Implements ParaCalculationState.

Definition at line 220 of file bbParaCalculationStateMpi.cpp.

References comm, ParaCalculationState::compTime, BbParaCalculationStateMpi::createDatatype(), DEF_PARA_COMM, MPI_CALL, and PARA_COMM_CALL.

◆ 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 195 of file bbParaCalculationStateMpi.cpp.

References comm, ParaCalculationState::compTime, BbParaCalculationStateMpi::createDatatype(), DEF_PARA_COMM, MPI_CALL, and PARA_COMM_CALL.