#include <scipParaSolutionMpi.h>
Public Member Functions | |
ScipParaSolutionMpi () | |
ScipParaSolutionMpi (ScipParaSolver *solver, SCIP_Real objval, int inNvars, SCIP_VAR **vars, SCIP_Real *vals) | |
ScipParaSolutionMpi (double inObjectiveFunctionValue, int inNVars, int *inIndicesAmongSolvers, SCIP_Real *inValues) | |
~ScipParaSolutionMpi () | |
ScipParaSolutionMpi * | clone (UG::ParaComm *comm) |
void | bcast (UG::ParaComm *comm, int root) |
void | send (UG::ParaComm *comm, int destination) |
void | receive (UG::ParaComm *comm, int source) |
Public Member Functions inherited from ScipParaSolution | |
ScipParaSolution () | |
ScipParaSolution (ScipParaSolver *solver, SCIP_Real objval, int inNvars, SCIP_VAR **vars, SCIP_Real *vals) | |
ScipParaSolution (double inObjectiveFunctionValue, int inNVars, int *inIndicesAmongSolvers, SCIP_Real *inValues) | |
virtual | ~ScipParaSolution () |
double | getObjectiveFunctionValue () |
void | setObjectiveFuntionValue (SCIP_Real val) |
int | getNVars () |
int | indexAmongSolvers (int index) |
SCIP_Real * | getValues () |
void | setValue (int i, SCIP_Real val) |
void | write (gzstream::ogzstream &out) |
bool | read (UG::ParaComm *comm, gzstream::igzstream &in) |
const std::string | toString () |
Public Member Functions inherited from BbParaSolution | |
BbParaSolution () | |
DO NOT HAVE DATA MEMBER!! More... | |
virtual | ~BbParaSolution () |
destructor More... | |
virtual double | getObjectiveFunctionValue ()=0 |
get objective function value More... | |
virtual double | getCutOffValue () |
get cutoff value More... | |
Public Member Functions inherited from ParaSolution | |
ParaSolution () | |
DO NOT HAVE DATA MEMBER!! More... | |
virtual | ~ParaSolution () |
destructor More... | |
virtual double | getObjectiveFunctionValue ()=0 |
get objective function value More... | |
virtual ParaSolution * | clone (ParaComm *comm)=0 |
create clone of this object More... | |
virtual void | bcast (ParaComm *comm, int root)=0 |
broadcast solution data More... | |
virtual void | send (ParaComm *comm, int destination)=0 |
send solution data More... | |
virtual void | receive (ParaComm *comm, int source)=0 |
receive solution data More... | |
virtual void | write (gzstream::ogzstream &out)=0 |
function to write ParaSolution object to checkpoint file More... | |
virtual bool | read (ParaComm *comm, gzstream::igzstream &in)=0 |
function to read ParaSolution object from checkpoint file More... | |
virtual const std::string | toString () |
stringfy ParaSolution object More... | |
Private Member Functions | |
MPI_Datatype | createPreDatatype () |
MPI_Datatype | createDatatype (bool memAllocNecessary) |
Additional Inherited Members | |
Protected Attributes inherited from ScipParaSolution | |
double | objectiveFunctionValue |
int | nVars |
int * | indicesAmongSolvers |
SCIP_Real * | values |
ScipSolution class
Definition at line 49 of file scipParaSolutionMpi.h.
default constructor
Definition at line 59 of file scipParaSolutionMpi.h.
Referenced by ScipParaSolutionMpi::clone().
ScipParaSolutionMpi | ( | ScipParaSolver * | solver, |
SCIP_Real | objval, | ||
int | inNvars, | ||
SCIP_VAR ** | vars, | ||
SCIP_Real * | vals | ||
) |
constructor
Definition at line 65 of file scipParaSolutionMpi.h.
ScipParaSolutionMpi | ( | double | inObjectiveFunctionValue, |
int | inNVars, | ||
int * | inIndicesAmongSolvers, | ||
SCIP_Real * | inValues | ||
) |
constructor
inObjectiveFunctionValue | objective function value |
inNVars | number of variables |
inIndicesAmongSolvers | array of variable indices ( probindex ) |
inValues | array of bounds which the branchings |
Definition at line 75 of file scipParaSolutionMpi.h.
~ScipParaSolutionMpi | ( | ) |
destructor
Definition at line 83 of file scipParaSolutionMpi.h.
|
virtual |
broadcast solution data to from the root rank
send solution data to the rank
Implements ParaSolution.
Definition at line 137 of file scipParaSolutionMpi.cpp.
References comm, ScipParaSolutionMpi::createDatatype(), ScipParaSolutionMpi::createPreDatatype(), DEF_PARA_COMM, ParaCommCPP11::getRank(), ScipParaSolution::indicesAmongSolvers, MPI_CALL, ScipParaSolution::nVars, ScipParaSolution::objectiveFunctionValue, and PARA_COMM_CALL.
|
virtual |
create clone of this object
Implements ParaSolution.
Definition at line 46 of file scipParaSolutionMpi.cpp.
References ScipParaSolution::indicesAmongSolvers, ScipParaSolution::nVars, ScipParaSolution::objectiveFunctionValue, ScipParaSolutionMpi::ScipParaSolutionMpi(), and ScipParaSolution::values.
|
private |
create scipSolutionDatatype
create ScipDiffSubproblemDatatype
Definition at line 91 of file scipParaSolutionMpi.cpp.
References ScipParaSolution::indicesAmongSolvers, MPI_CALL, ScipParaSolution::nVars, and ScipParaSolution::values.
Referenced by ScipParaSolutionMpi::bcast(), ScipParaSolutionMpi::receive(), and ScipParaSolutionMpi::send().
|
private |
create scipSolutionPreDatatype
create ScipDiffSubproblemPreDatatype
Definition at line 53 of file scipParaSolutionMpi.cpp.
References MPI_CALL, ScipParaSolution::nVars, and ScipParaSolution::objectiveFunctionValue.
Referenced by ScipParaSolutionMpi::bcast(), ScipParaSolutionMpi::receive(), and ScipParaSolutionMpi::send().
|
virtual |
receive solution data from the source rank
Implements ParaSolution.
Definition at line 209 of file scipParaSolutionMpi.cpp.
References comm, ScipParaSolutionMpi::createDatatype(), ScipParaSolutionMpi::createPreDatatype(), DEF_PARA_COMM, ScipParaSolution::indicesAmongSolvers, MPI_CALL, ScipParaSolution::nVars, ScipParaSolution::objectiveFunctionValue, PARA_COMM_CALL, UG::TagSolution, and ParaSCIP::TagSolution1.
|
virtual |
send solution data to the rank
Implements ParaSolution.
Definition at line 177 of file scipParaSolutionMpi.cpp.
References comm, ScipParaSolutionMpi::createDatatype(), ScipParaSolutionMpi::createPreDatatype(), DEF_PARA_COMM, ScipParaSolution::indicesAmongSolvers, MPI_CALL, ScipParaSolution::nVars, ScipParaSolution::objectiveFunctionValue, PARA_COMM_CALL, UG::TagSolution, and ParaSCIP::TagSolution1.